mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 07:01:13 +02:00
arm: kernel cmdline use root=PARTUUID=UUID/PARTNROFF=%d
Since now the arm firmware can parse %U as x86 bios, and kernel can parse PARTNROFF=%d, we are able to generate kernel command line with such construct. BUG=chromium-os:14022,15683 TEST=manual 1. Build image with root filesystem verification turns off 2. Boot successfully 3. Run 'cat /proc/cmdline' and validate its output 4. Run 'rootdev' and validate its output Change-Id: I11de0a30928efe9d9b0149feb3389a2f30063516 Reviewed-on: http://gerrit.chromium.org/gerrit/1104 Tested-by: Che-Liang Chiou <clchiou@chromium.org> Reviewed-by: <nsanders@google.com> Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
This commit is contained in:
parent
cf93237b86
commit
93b6effb0b
@ -157,12 +157,8 @@ make_image_bootable() {
|
||||
local image="$1"
|
||||
local use_dev_keys=
|
||||
|
||||
# Default to non-verified, non-UUID boot unless verified.
|
||||
# Long term we want root=PARTUUID=uuid+1.
|
||||
cros_root=/dev/sd%D%P
|
||||
if [[ "${FLAGS_arch}" = "arm" ]]; then
|
||||
cros_root='/dev/${devname}${rootpart}'
|
||||
fi
|
||||
# Default to non-verified
|
||||
cros_root="PARTUUID=%U/PARTNROFF=1"
|
||||
if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then
|
||||
cros_root=/dev/dm-0
|
||||
fi
|
||||
|
@ -54,7 +54,7 @@ DEFINE_string boot_args "noinitrd" \
|
||||
# By default, we use a firmware enumerated value, but it isn't reliable for
|
||||
# production use. If +%d can be added upstream, then we can use:
|
||||
# root=PARTUID=uuid+1
|
||||
DEFINE_string root "/dev/sd%D%P" \
|
||||
DEFINE_string root "PARTUUID=%U/PARTNROFF=1" \
|
||||
"Expected device root partition"
|
||||
# If provided, will automatically add verified boot arguments.
|
||||
DEFINE_string rootfs_image "" \
|
||||
|
@ -215,10 +215,7 @@ create_recovery_kernel_image() {
|
||||
|
||||
trap "sudo losetup -d $root_dev" EXIT
|
||||
|
||||
cros_root=/dev/sd%D%P # only used for non-verified images
|
||||
if [[ "${ARCH}" = "arm" ]]; then
|
||||
cros_root='/dev/${devname}${rootpart}'
|
||||
fi
|
||||
cros_root="PARTUUID=%U/PARTNROFF=1" # only used for non-verified images
|
||||
if grep -q enable_rootfs_verification "${IMAGE_DIR}/boot.desc"; then
|
||||
cros_root=/dev/dm-0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user