mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 22:51:03 +02:00
crosutils: Revert "crosutils: refine make_factory_package"
This partially reverts commit cfc4720c28a17a04ea833809178bda540d44dfa4 ( http://gerrit.chromium.org/gerrit/7904 ) Currently we store the hash generated by compress_and_hash_memento_image in a shell variable, and sub shell "(cmd)" can't export the variables. It would require more rewriting of scripts to fix this issue, so let's first revert it. BUG=chrome-os-partner:5979 TEST=./make_factory_package --config config/mp_factory.config cd ../platform/dev; python deverserver.py --factory_config mini_omaha.conf # then start whole factory installation process on DUT, and passed. Change-Id: I1c7d8de61427733b1dff61dcd7e1c01fea7c4de6 Reviewed-on: http://gerrit.chromium.org/gerrit/7916 Tested-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Tammo Spalink <tammo@chromium.org>
This commit is contained in:
parent
545dc57e97
commit
ab4c4e1c69
@ -474,40 +474,41 @@ generate_omaha() {
|
|||||||
echo "Output omaha config to ${OMAHA_CONF}"
|
echo "Output omaha config to ${OMAHA_CONF}"
|
||||||
|
|
||||||
# Get the release image.
|
# Get the release image.
|
||||||
( set -e
|
# TODO(hungte) deprecate pushd and use temporary folders
|
||||||
cd "${RELEASE_DIR}"
|
pushd "${RELEASE_DIR}" >/dev/null
|
||||||
prepare_dir "."
|
prepare_dir "."
|
||||||
|
|
||||||
kernel="${RELEASE_KERNEL:-${RELEASE_IMAGE}:2}"
|
kernel="${RELEASE_KERNEL:-${RELEASE_IMAGE}:2}"
|
||||||
rootfs="${RELEASE_IMAGE}:3"
|
rootfs="${RELEASE_IMAGE}:3"
|
||||||
release_hash="$(compress_and_hash_memento_image "$kernel" "$rootfs")"
|
release_hash="$(compress_and_hash_memento_image "$kernel" "$rootfs")"
|
||||||
mv ./update.gz "${OMAHA_DATA_DIR}/rootfs-release.gz"
|
mv ./update.gz "${OMAHA_DATA_DIR}/rootfs-release.gz"
|
||||||
echo "release: ${release_hash}"
|
echo "release: ${release_hash}"
|
||||||
|
|
||||||
oem_hash="$(compress_and_hash_partition "${RELEASE_IMAGE}" 8 "oem.gz")"
|
oem_hash="$(compress_and_hash_partition "${RELEASE_IMAGE}" 8 "oem.gz")"
|
||||||
mv oem.gz "${OMAHA_DATA_DIR}"
|
mv oem.gz "${OMAHA_DATA_DIR}"
|
||||||
echo "oem: ${oem_hash}"
|
echo "oem: ${oem_hash}"
|
||||||
)
|
|
||||||
|
popd >/dev/null
|
||||||
|
|
||||||
# Go to retrieve the factory test image.
|
# Go to retrieve the factory test image.
|
||||||
( set -e
|
pushd "${FACTORY_DIR}" >/dev/null
|
||||||
cd "${FACTORY_DIR}"
|
prepare_dir "."
|
||||||
prepare_dir "."
|
|
||||||
|
|
||||||
kernel="${FACTORY_IMAGE}:2"
|
kernel="${FACTORY_IMAGE}:2"
|
||||||
rootfs="${FACTORY_IMAGE}:3"
|
rootfs="${FACTORY_IMAGE}:3"
|
||||||
test_hash="$(compress_and_hash_memento_image "$kernel" "$rootfs")"
|
test_hash="$(compress_and_hash_memento_image "$kernel" "$rootfs")"
|
||||||
mv ./update.gz "${OMAHA_DATA_DIR}/rootfs-test.gz"
|
mv ./update.gz "${OMAHA_DATA_DIR}/rootfs-test.gz"
|
||||||
echo "test: ${test_hash}"
|
echo "test: ${test_hash}"
|
||||||
|
|
||||||
state_hash="$(compress_and_hash_partition "${FACTORY_IMAGE}" 1 "state.gz")"
|
state_hash="$(compress_and_hash_partition "${FACTORY_IMAGE}" 1 "state.gz")"
|
||||||
mv state.gz "${OMAHA_DATA_DIR}"
|
mv state.gz "${OMAHA_DATA_DIR}"
|
||||||
echo "state: ${state_hash}"
|
echo "state: ${state_hash}"
|
||||||
|
|
||||||
efi_hash="$(compress_and_hash_partition "${FACTORY_IMAGE}" 12 "efi.gz")"
|
efi_hash="$(compress_and_hash_partition "${FACTORY_IMAGE}" 12 "efi.gz")"
|
||||||
mv efi.gz "${OMAHA_DATA_DIR}"
|
mv efi.gz "${OMAHA_DATA_DIR}"
|
||||||
echo "efi: ${efi_hash}"
|
echo "efi: ${efi_hash}"
|
||||||
)
|
|
||||||
|
popd >/dev/null
|
||||||
|
|
||||||
if [ -n "${FLAGS_firmware_updater}" ]; then
|
if [ -n "${FLAGS_firmware_updater}" ]; then
|
||||||
firmware_hash="$(compress_and_hash_file "${FLAGS_firmware_updater}" \
|
firmware_hash="$(compress_and_hash_file "${FLAGS_firmware_updater}" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user