diff options
author | Adam Muhle <armuhle@us.ibm.com> | 2012-08-20 13:46:47 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-08-22 12:32:29 -0500 |
commit | 15d7334edd194226337059fde6923a596b56c31f (patch) | |
tree | 8c8bbb7782ab9c711baba0aaf6d08c6cf3a4a67a /src/build/tools/hb | |
parent | bd8c8b39b880424a9622910795d6f0e975cf09aa (diff) | |
download | talos-hostboot-15d7334edd194226337059fde6923a596b56c31f.tar.gz talos-hostboot-15d7334edd194226337059fde6923a596b56c31f.zip |
Verify sandbox build during hb prime before proceeding.
hb prime was not comparing the sandbox driver to bbuild value
before runing hbDistribute. This can lead to confusing errors
if the hostboot content has requirements on what FSP drivers
can be used. I've made the hb prime checking the same as hb
startsimics to avoid this confusion.
Change-Id: If491900fe944537deed93957527a6cb939a6c86e
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1568
Tested-by: Jenkins Server
Reviewed-by: Terry J. Opie <opiet@us.ibm.com>
Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build/tools/hb')
-rwxr-xr-x | src/build/tools/hb | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/build/tools/hb b/src/build/tools/hb index f605f5c9e..2ebebc134 100755 --- a/src/build/tools/hb +++ b/src/build/tools/hb @@ -258,16 +258,26 @@ hb_workon() hb_prime() { - if [ -n "${SANDBOXBASE}" ]; then - if [ ! -d "${SANDBOXBASE}" ]; then - echo "Sandbox does not exist. Create with 'hb simsetup." - exit -1 - fi - hbDistribute $* - else - echo "SANDBOXBASE not set." + [ -z "${SANDBOXBASE}" ] && echo "Missing SANDBOXBASE." && exit -1 + [ -z "${HOSTBOOTROOT}" ] && echo "Missing HOSTBOOTROOT." && exit -1 + + if [ ! -d "${SANDBOXBASE}" ]; then + echo "Sandbox does not exist. Create with 'hb simsetup." exit -1 fi + + SBDRIVER=`cat ${SANDBOXBASE}/rc_files/sb.conf | \ + grep "backing_build" | awk '{ print $3 }'` + DRIVER=`cat ${HOSTBOOTROOT}/src/build/citest/etc/bbuild` + + if [ ${SBDRIVER} != ${DRIVER} ]; then + echo "Driver mismatch between sandbox and src/build/citest/etc/bbuild." + echo "Sandbox at ${SBDRIVER}" + echo "Update sandbox with 'hb simsetup'." + exit -1 + fi + + hbDistribute $* } hb_simsetup() |