mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 07:31:01 +02:00
AU: when generating payload, don't patch kernel by default
Normally, images are signed for USB boot and the HD boot patch is in the stateful partition. Official image are resigned, and the kernel partition needs no patch for HD boot. Since folks generating updates generally don't need to patch, this CL turns off patching by default. BUG=5975 TEST=Generated update payload Review URL: http://codereview.chromium.org/3167035
This commit is contained in:
parent
46bbd36ec8
commit
393266b499
@ -100,6 +100,8 @@ DEFINE_string src_image "" "Optional: a source image. If specified, this makes\
|
|||||||
a delta update."
|
a delta update."
|
||||||
DEFINE_boolean old_style "$FLAGS_TRUE" "Generate an old-style .gz full update."
|
DEFINE_boolean old_style "$FLAGS_TRUE" "Generate an old-style .gz full update."
|
||||||
DEFINE_string output "" "Output file"
|
DEFINE_string output "" "Output file"
|
||||||
|
DEFINE_boolean patch_kernel "$FLAGS_FALSE" "Whether or not to patch the kernel \
|
||||||
|
with the patch from the stateful partition (default: false)"
|
||||||
|
|
||||||
# Parse command line
|
# Parse command line
|
||||||
FLAGS "$@" || exit 1
|
FLAGS "$@" || exit 1
|
||||||
@ -131,7 +133,9 @@ if [ "$DELTA" -eq "$FLAGS_TRUE" ]; then
|
|||||||
|
|
||||||
trap cleanup INT TERM EXIT
|
trap cleanup INT TERM EXIT
|
||||||
SRC_KERNEL=$(extract_partition_to_temp_file "$FLAGS_src_image" 2)
|
SRC_KERNEL=$(extract_partition_to_temp_file "$FLAGS_src_image" 2)
|
||||||
|
if [ "$FLAGS_patch_kernel" -eq "$FLAGS_TRUE" ]; then
|
||||||
patch_kernel "$FLAGS_src_image" "$SRC_KERNEL"
|
patch_kernel "$FLAGS_src_image" "$SRC_KERNEL"
|
||||||
|
fi
|
||||||
SRC_ROOT=$(extract_partition_to_temp_file "$FLAGS_src_image" 3)
|
SRC_ROOT=$(extract_partition_to_temp_file "$FLAGS_src_image" 3)
|
||||||
|
|
||||||
echo md5sum of src kernel:
|
echo md5sum of src kernel:
|
||||||
@ -140,7 +144,9 @@ if [ "$DELTA" -eq "$FLAGS_TRUE" ]; then
|
|||||||
md5sum "$SRC_ROOT"
|
md5sum "$SRC_ROOT"
|
||||||
|
|
||||||
DST_KERNEL=$(extract_partition_to_temp_file "$FLAGS_image" 2)
|
DST_KERNEL=$(extract_partition_to_temp_file "$FLAGS_image" 2)
|
||||||
|
if [ "$FLAGS_patch_kernel" -eq "$FLAGS_TRUE" ]; then
|
||||||
patch_kernel "$FLAGS_image" "$DST_KERNEL"
|
patch_kernel "$FLAGS_image" "$DST_KERNEL"
|
||||||
|
fi
|
||||||
DST_ROOT=$(extract_partition_to_temp_file "$FLAGS_image" 3)
|
DST_ROOT=$(extract_partition_to_temp_file "$FLAGS_image" 3)
|
||||||
|
|
||||||
SRC_MNT=$(mktemp -d /tmp/src_root.XXXXXX)
|
SRC_MNT=$(mktemp -d /tmp/src_root.XXXXXX)
|
||||||
@ -162,7 +168,9 @@ else
|
|||||||
|
|
||||||
trap cleanup INT TERM EXIT
|
trap cleanup INT TERM EXIT
|
||||||
DST_KERNEL=$(extract_partition_to_temp_file "$FLAGS_image" 2)
|
DST_KERNEL=$(extract_partition_to_temp_file "$FLAGS_image" 2)
|
||||||
|
if [ "$FLAGS_patch_kernel" -eq "$FLAGS_TRUE" ]; then
|
||||||
patch_kernel "$FLAGS_image" "$DST_KERNEL"
|
patch_kernel "$FLAGS_image" "$DST_KERNEL"
|
||||||
|
fi
|
||||||
DST_ROOT=$(extract_partition_to_temp_file "$FLAGS_image" 3)
|
DST_ROOT=$(extract_partition_to_temp_file "$FLAGS_image" 3)
|
||||||
|
|
||||||
GENERATOR="$(dirname "$0")/mk_memento_images.sh"
|
GENERATOR="$(dirname "$0")/mk_memento_images.sh"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user