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 image="$1"
|
||||||
local use_dev_keys=
|
local use_dev_keys=
|
||||||
|
|
||||||
# Default to non-verified, non-UUID boot unless verified.
|
# Default to non-verified
|
||||||
# Long term we want root=PARTUUID=uuid+1.
|
cros_root="PARTUUID=%U/PARTNROFF=1"
|
||||||
cros_root=/dev/sd%D%P
|
|
||||||
if [[ "${FLAGS_arch}" = "arm" ]]; then
|
|
||||||
cros_root='/dev/${devname}${rootpart}'
|
|
||||||
fi
|
|
||||||
if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then
|
if [[ ${FLAGS_enable_rootfs_verification} -eq ${FLAGS_TRUE} ]]; then
|
||||||
cros_root=/dev/dm-0
|
cros_root=/dev/dm-0
|
||||||
fi
|
fi
|
||||||
|
@ -54,7 +54,7 @@ DEFINE_string boot_args "noinitrd" \
|
|||||||
# By default, we use a firmware enumerated value, but it isn't reliable for
|
# 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:
|
# production use. If +%d can be added upstream, then we can use:
|
||||||
# root=PARTUID=uuid+1
|
# root=PARTUID=uuid+1
|
||||||
DEFINE_string root "/dev/sd%D%P" \
|
DEFINE_string root "PARTUUID=%U/PARTNROFF=1" \
|
||||||
"Expected device root partition"
|
"Expected device root partition"
|
||||||
# If provided, will automatically add verified boot arguments.
|
# If provided, will automatically add verified boot arguments.
|
||||||
DEFINE_string rootfs_image "" \
|
DEFINE_string rootfs_image "" \
|
||||||
|
@ -215,10 +215,7 @@ create_recovery_kernel_image() {
|
|||||||
|
|
||||||
trap "sudo losetup -d $root_dev" EXIT
|
trap "sudo losetup -d $root_dev" EXIT
|
||||||
|
|
||||||
cros_root=/dev/sd%D%P # only used for non-verified images
|
cros_root="PARTUUID=%U/PARTNROFF=1" # only used for non-verified images
|
||||||
if [[ "${ARCH}" = "arm" ]]; then
|
|
||||||
cros_root='/dev/${devname}${rootpart}'
|
|
||||||
fi
|
|
||||||
if grep -q enable_rootfs_verification "${IMAGE_DIR}/boot.desc"; then
|
if grep -q enable_rootfs_verification "${IMAGE_DIR}/boot.desc"; then
|
||||||
cros_root=/dev/dm-0
|
cros_root=/dev/dm-0
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user