summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2012-03-01 13:52:34 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-03-07 12:41:00 -0600
commit7838a7409307f1106aaa6df42f1909e6824de197 (patch)
tree72876fb20f15d8749fcb6c50635710b2ee49f29c /src
parent630f7ba9928d0cd9a6e80a0635269dc83c9ecd64 (diff)
downloadtalos-hostboot-7838a7409307f1106aaa6df42f1909e6824de197.tar.gz
talos-hostboot-7838a7409307f1106aaa6df42f1909e6824de197.zip
Tools for managing binary files in git.
Change-Id: I420803b36707e877a4ba35f6f484c74c9ed4eb43 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/711 Tested-by: Jenkins Server Reviewed-by: Terry J. Opie <opiet@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/build/tools/hb76
-rw-r--r--src/usr/pore/makefile2
-rw-r--r--src/usr/spd/dimmspd.datbin257 -> 0 bytes
-rw-r--r--src/usr/spd/makefile6
4 files changed, 78 insertions, 6 deletions
diff --git a/src/build/tools/hb b/src/build/tools/hb
index 9179966e9..0ea3cdad7 100755
--- a/src/build/tools/hb
+++ b/src/build/tools/hb
@@ -175,6 +175,26 @@ hb_helptext()
echo " Prepares a copy of FipS errl tool that is hostboot aware,"
echo " places it in simics directory."
;;
+ cachesync)
+ echo " Topic 'cachesync'"
+ echo
+ echo " Usage:"
+ echo " hb cachesync"
+ echo
+ echo " Synchronizes the repository's binary file cache with the"
+ echo " project repository."
+ ;;
+ cacheadd)
+ echo " Topic 'cacheadd'"
+ echo
+ echo " Usage:"
+ echo " hb cacheadd [--local] <file> \"<msg>\""
+ echo
+ echo " Inserts a file into the project binary file cache."
+ echo
+ echo " Options:"
+ echo " --local: Indicates file should be put only in local cache."
+ ;;
customrc)
echo " Topic 'customrc'"
echo
@@ -205,7 +225,7 @@ hb_helptext()
echo
echo " Available Commands:"
echo " workon, simsetup, prime, startsimics, rsync, objsizes,"
- echo " copyright_check, errlparser"
+ echo " copyright_check, errlparser, cachesync, cacheadd"
echo
echo " Additional Help Topics:"
echo " customrc"
@@ -474,10 +494,58 @@ hb_errlparser()
ln -sf ../obj/x86.nfp/errl/nfp/tool/errl
}
+hb_cachesync()
+{
+ [ -z "${HOSTBOOTROOT}" ] && echo "Missing HOSTBOOTROOT." && exit -1
+
+ rsync -av /gsa/ausgsa/projects/h/hostboot/.binary_cache/ \
+ ${HOSTBOOTROOT}/.git/hb_cache
+
+ failure=0
+ for files in ${HOSTBOOTROOT}/.git/hb_cache/data/*; do
+ echo "`basename $files` $files" | sha1sum --check >> /dev/null
+ if [ $? -ne 0 ]; then
+ echo "Failed SHA1 verification! $files"
+ failure=-1
+ fi
+ done
+
+ exit $failure
+}
+
+hb_cacheadd()
+{
+ [ -z "${HOSTBOOTROOT}" ] && echo "Missing HOSTBOOTROOT." && exit -1
+
+ CACHE_PATH=/gsa/ausgsa/projects/h/hostboot/.binary_cache/
+ FILE=$1
+ shift
+ if [ $FILE == "--local" ]; then
+ echo "Adding as local copy."
+ CACHE_PATH=${HOSTBOOTROOT}/.git/hb_cache/
+
+ FILE=$1
+ shift
+ fi
+ MESSAGE=$*
+ [ ! -e "${FILE}" ] && echo "File $FILE does not exist." && exit -1
+ [ -z "${MESSAGE}" ] && echo "No message given." && exit -1
+ FILE_BASE=`basename $FILE`
+ SHA1SUM=`sha1sum -b $FILE | sed 's/ .*//'`
+
+ echo $FILE $SHA1SUM
+
+ cp $FILE $CACHE_PATH/data/$SHA1SUM
+ echo $SHA1SUM : `whoami` : `date` : $MESSAGE \
+ >> $CACHE_PATH/files/$FILE_BASE
+
+ echo "Added $FILE_BASE as $SHA1SUM"
+
+}
@@ -514,6 +582,12 @@ copyright_check)
errlparser)
hb_errlparser $*
;;
+cachesync)
+ hb_cachesync $*
+ ;;
+cacheadd)
+ hb_cacheadd $*
+ ;;
*)
hb_helptext $*
exit -1
diff --git a/src/usr/pore/makefile b/src/usr/pore/makefile
index c544e8efb..6097b74cb 100644
--- a/src/usr/pore/makefile
+++ b/src/usr/pore/makefile
@@ -24,4 +24,6 @@ ROOTPATH = ../../..
SUBDIRS = fapiporeve.d poreve.d test.d
+BINARY_FILES = $(IMGDIR)/sbe_pnor.bin:76398b3859c8395b0e73c2df9a76ee28bad185fc
+
include ${ROOTPATH}/config.mk
diff --git a/src/usr/spd/dimmspd.dat b/src/usr/spd/dimmspd.dat
deleted file mode 100644
index cb4f85c83..000000000
--- a/src/usr/spd/dimmspd.dat
+++ /dev/null
Binary files differ
diff --git a/src/usr/spd/makefile b/src/usr/spd/makefile
index 9cb0b14cb..9c9f96d5b 100644
--- a/src/usr/spd/makefile
+++ b/src/usr/spd/makefile
@@ -27,10 +27,6 @@ OBJS = spd.o dimmPres.o
SUBDIRS = test.d
-DIMM_SPD_DATA = dimmspd.dat
-EXTRA_PARTS = $(addprefix $(IMGDIR)/, $(DIMM_SPD_DATA))
+BINARY_FILES = $(IMGDIR)/dimmspd.dat:70ba15165f78487ed870333891ae983167afd546
include ${ROOTPATH}/config.mk
-
-${EXTRA_PARTS}: ${IMGDIR}/% : ./%
- cp -f $^ $@
OpenPOWER on IntegriCloud