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