From daebdee9726b5571ee7b0ccfd2c1f9798bec976f Mon Sep 17 00:00:00 2001 From: Nick Sanders Date: Tue, 2 Aug 2011 03:42:04 -0700 Subject: [PATCH] Add HWID bundle into buildbot output Add bundle to factory_shim/hwid BUG=chromium-os:16734 TEST=archive_build, with and without hwid present Change-Id: I70eeca5ce9cd99d229081a92af5bc0c3c997dce7 Reviewed-on: http://gerrit.chromium.org/gerrit/5189 Reviewed-by: Rong Chang Tested-by: Nick Sanders --- archive_build.sh | 6 +++--- make_netboot.sh | 17 ++++++++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/archive_build.sh b/archive_build.sh index 41c079c8a1..e04f915f1a 100755 --- a/archive_build.sh +++ b/archive_build.sh @@ -236,7 +236,7 @@ fi # Zip the build echo "Compressing and archiving build..." cd "$FLAGS_from" -MANIFEST=`ls | grep -v factory | grep -v netboot` +MANIFEST=`ls | grep -v factory | grep -v netboot | grep -v hwid` rm -f "${ZIPFILE}" zip -r "${ZIPFILE}" ${MANIFEST} @@ -256,8 +256,8 @@ if [ $FLAGS_factory_test_mod -eq $FLAGS_TRUE ] || \ # throughout the build scripts rather than explicitly specifying an image. touch "${IMG_DIR}" [ -n "${IMG_DIR}" ] && rm -f latest && ln -s "${IMG_DIR}" latest - FACTORY_MANIFEST=`find factory_shim factory_test -follow \ - -type f | grep -E "(factory_image|factory_install|partition|netboot)"` + FACTORY_MANIFEST=$(find factory_shim factory_test -follow -type f | + grep -E "(factory_image|factory_install|partition|netboot|hwid)") rm -f "${FACTORY_ZIPFILE}" zip "${FACTORY_ZIPFILE}" ${FACTORY_MANIFEST} echo "Zipped" diff --git a/make_netboot.sh b/make_netboot.sh index b512d73185..1627567c64 100755 --- a/make_netboot.sh +++ b/make_netboot.sh @@ -80,9 +80,24 @@ if [ -r "${SYSROOT}/u-boot/legacy_image.bin" ]; then cp "${SYSROOT}/u-boot/legacy_image.bin" "netboot" cp "${GCLIENT_ROOT}/chroot/usr/bin/update_firmware_vars.py" "netboot" else - echo "Skipping: ${SYSROOT}/u-boot/legacy_image.bin firmware not present?" + echo "Skipping legacy fw: ${SYSROOT}/u-boot/legacy_image.bin not present?" fi +# Get HWID bundle if available. +hwid_dir="usr/share/chromeos-hwid" +sudo rm -rf hwid +mkdir -p hwid +if updater_files=$(ls "${SYSROOT}/${hwid_dir}/" | grep updater_); then + echo "Copying HWID bundles: $updater_files" + for file in $updater_files; do + cp "${SYSROOT}/${hwid_dir}/${file}" "hwid/" + done +else + echo "Skipping HWID: ${SYSROOT}/${hwid_dir}/" \ + "does not contain updater" +fi + + # Prepare to mount rootfs. umount_loop() { sudo umount r || true