mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 15:11:19 +02:00
Add complete script channel in make_factory_package.sh
A new parameter --complete_script is added a script to support the last-step execution of factory install. This script is supported by a separated channel in mini-omaha server. BUG=chrome-os-partner:4229 TEST=./make_factory_package --release RELEASE --factory FACTORY \ --firmware FIRMWARE --complete complete.sh # success $ cat ../platform/dev/miniomaha.conf config = [ { 'qual_ids': set(["tegra2_kaen"]), 'factory_image': 'rootfs-test.gz', 'factory_checksum': 'jNk+g6VurGVmnW7kehvIK1gpkjw=', 'release_image': 'rootfs-release.gz', 'release_checksum': 'vkds6CqN8M+gTofM8VFefeG2o1Y=', 'oempartitionimg_image': 'oem.gz', 'oempartitionimg_checksum': '8ED3wHGIrxy/g81StZhJvHy7fJA=', 'efipartitionimg_image': 'efi.gz', 'efipartitionimg_checksum': 'eyoAysb4WkLmKagb515mlM3jhts=', 'stateimg_image': 'state.gz', 'stateimg_checksum': 'MD7X6Yc5Gipkqt3i7jMn5hoWBvM=', 'firmware_image': 'firmware.gz', 'firmware_checksum': 'yAdtPbG7vjwsCPO6AUJ+fyw8z78=', 'complete_image': 'complete.gz', 'complete_checksum': '8Nq3fhtK+mTZk3PkaVS47tqEHCI=', }, ] $ ls -l ../platform/dev/static/ total 473828 drwxr-xr-x 2 waihong eng 4096 May 5 15:43 cache/ -rw-r--r-- 1 waihong eng 56 Jun 2 17:25 complete.gz -rw-r--r-- 1 waihong eng 26606 Jun 2 17:25 efi.gz -rw-r--r-- 1 waihong eng 827934 Jun 2 17:25 firmware.gz -rw-r--r-- 1 waihong eng 26125 Jun 2 17:25 oem.gz lrwxrwxrwx 1 waihong eng 6 May 5 11:35 pkgroot -> /build -rw-rw-rw- 1 root root 222747636 Jun 2 17:25 rootfs-release.gz -rw-rw-rw- 1 root root 222767859 Jun 2 17:25 rootfs-test.gz -rw-r--r-- 1 waihong eng 38284201 Jun 2 17:25 state.gz Change-Id: I3ab36835c3d1cd564429d6d646dca80501986b14 Reviewed-on: http://gerrit.chromium.org/gerrit/2026 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
This commit is contained in:
parent
c291a48995
commit
06165e0880
@ -52,6 +52,8 @@ DEFINE_string firmware_updater "" \
|
||||
"If set, include the firmware shellball into the server configuration"
|
||||
DEFINE_string hwid_updater "" \
|
||||
"If set, include the component list updater for HWID validation"
|
||||
DEFINE_string complete_script "" \
|
||||
"If set, include the script for the last-step execution of factory install"
|
||||
DEFINE_string release "" \
|
||||
"Directory and file containing release image: /path/chromiumos_image.bin"
|
||||
DEFINE_string subfolder "" \
|
||||
@ -88,6 +90,12 @@ if [ -n "${FLAGS_hwid_updater}" ] &&
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -n "${FLAGS_complete_script}" ] &&
|
||||
[ ! -f "${FLAGS_complete_script}" ]; then
|
||||
echo "Cannot find complete script ${FLAGS_complete_script}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Convert args to paths. Need eval to un-quote the string so that shell
|
||||
# chars like ~ are processed; just doing FOO=`readlink -f ${FOO}` won't work.
|
||||
OMAHA_DIR="${SRC_ROOT}/platform/dev"
|
||||
@ -360,6 +368,13 @@ generate_omaha() {
|
||||
echo "hwid: ${hwid_hash}"
|
||||
fi
|
||||
|
||||
if [ -n "${FLAGS_complete_script}" ]; then
|
||||
complete_hash="$(compress_and_hash_file "${FLAGS_complete_script}" \
|
||||
"complete.gz")"
|
||||
mv complete.gz "${OMAHA_DATA_DIR}"
|
||||
echo "complete: ${complete_hash}"
|
||||
fi
|
||||
|
||||
# If the file does exist and we are using the subfolder flag we are going to
|
||||
# append another config.
|
||||
if [ -n "${FLAGS_subfolder}" ] &&
|
||||
@ -419,6 +434,12 @@ generate_omaha() {
|
||||
'hwid_checksum': '${hwid_hash}'," >>"${OMAHA_CONF}"
|
||||
fi
|
||||
|
||||
if [ -n "${FLAGS_complete_script}" ] ; then
|
||||
echo -n "
|
||||
'complete_image': '${subfolder}complete.gz',
|
||||
'complete_checksum': '${complete_hash}'," >>"${OMAHA_CONF}"
|
||||
fi
|
||||
|
||||
echo -n "
|
||||
},
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user