File tree Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Expand file tree Collapse file tree 4 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,8 @@ if [[ "${PROD_IMAGE}" -eq 1 ]]; then
177
177
if [[ ${FLAGS_extract_update} -eq ${FLAGS_TRUE} ]]; then
178
178
extract_update " ${FLATCAR_PRODUCTION_IMAGE_NAME} " " ${DISK_LAYOUT} "
179
179
fi
180
- if [[ ${FLAGS_generate_update} -eq ${FLAGS_TRUE} ]]; then
180
+ # TODO: Un-nobble this later when we have passed the shim review.
181
+ if [[ ${FLAGS_generate_update} -eq ${FLAGS_TRUE} ]]; then # && ${COREOS_OFFICIAL:-0} -ne 1 ]]; then
181
182
generate_update " ${FLATCAR_PRODUCTION_IMAGE_NAME} " " ${DISK_LAYOUT} "
182
183
fi
183
184
if [[ " ${PROD_TAR} " -eq 1 ]]; then
Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ generate_update() {
79
79
local devkey=" /usr/share/update_engine/update-payload-key.key.pem"
80
80
81
81
# Extract the partition if it isn't extracted already.
82
- [[ -s ${update} ]] || extract_update " ${image_name} " " ${disk_layout} "
82
+ [[ -s ${update} ]] ||
83
+ " ${BUILD_LIBRARY_DIR} /disk_util" --disk_layout=" ${disk_layout} " \
84
+ extract " ${BUILD_DIR} /${image_name} " " USR-A" " ${update} "
83
85
84
86
echo " Generating update payload, signed with a dev key"
85
87
delta_generator \
Original file line number Diff line number Diff line change @@ -82,14 +82,17 @@ function _sbsign_image_impl() {
82
82
local sdk_image=" $( docker_image_fullname " ${sdk_name} " " ${docker_sdk_vernum} " ) "
83
83
echo " docker image rm -f '${sdk_image} '" >> ./ci-cleanup.sh
84
84
85
- ./run_sdk_container -x ./ci-cleanup.sh -v " ${FLATCAR_VERSION} " -U -C " ${sdk_image} " \
85
+ local docker_vernum=" $( vernum_to_docker_image_version " ${FLATCAR_VERSION} " ) "
86
+ local sbsign_container=" flatcar-sbsign-image-${arch} -${docker_vernum} "
87
+ ./run_sdk_container -x ./ci-cleanup.sh -n " ${sbsign_container} " -v " ${FLATCAR_VERSION} " -U -C " ${sdk_image} " \
86
88
./sbsign_image --board=" ${arch} -usr" \
87
89
--group=" ${channel} " --version=" ${FLATCAR_VERSION} " \
88
90
--output_root=" ${CONTAINER_IMAGE_ROOT} " \
89
91
--only_store_compressed
90
92
91
93
# Delete uncompressed generic image before signing and upload
92
- rm " ${images_local} /flatcar_production_image.bin"
94
+ # Also delete update image because it will be unchanged
95
+ rm " ${images_local} " /flatcar_production_{image,update}.bin
93
96
create_digests " ${SIGNER} " " ${images_local} " /*
94
97
sign_artifacts " ${SIGNER} " " ${images_local} " /*
95
98
copy_to_buildcache " ${images_remote} " / " ${images_local} " /*
Original file line number Diff line number Diff line change @@ -61,8 +61,11 @@ switch_to_strict_mode
61
61
# Create the output directory and temporary mount points.
62
62
mkdir -p " ${BUILD_DIR} "
63
63
64
+ DISK_LAYOUT=" ${FLAGS_disk_layout:- base} "
65
+
64
66
fix_mtab
65
- sbsign_prod_image " ${FLATCAR_PRODUCTION_IMAGE_NAME} " " ${FLAGS_disk_layout:- base} "
67
+ sbsign_prod_image " ${FLATCAR_PRODUCTION_IMAGE_NAME} " " ${DISK_LAYOUT} "
68
+ generate_update " ${FLATCAR_PRODUCTION_IMAGE_NAME} " " ${DISK_LAYOUT} "
66
69
67
70
echo " Done. ${FLATCAR_PRODUCTION_IMAGE_NAME} and associated files are now signed for Secure Boot in ${BUILD_DIR} ."
68
71
command_completed
You can’t perform that action at this time.
0 commit comments