build_image & make_bootable: allow additional kernel cmdline args

In order to more easily test kernel commandline tweaks, ensure that
--boot_args is propagated to all kernel cmdline sinks.

This is useful for changing default schedulers and any other kernel argument
tweaks we may want to quickly test out.

TEST=build and tested x86-generic
BUG=none

Change-Id: I5138755aa8c5e32e7f117f18291d2ae197e95bef

Review URL: http://codereview.chromium.org/3644004
This commit is contained in:
Will Drewry 2010-10-11 15:37:17 -05:00
parent 3a4a6bbfb9
commit 32d8c11747
3 changed files with 9 additions and 1 deletions

View File

@ -68,6 +68,9 @@ DEFINE_string usb_disk "/dev/sdb3" \
DEFINE_boolean cleanup_dirs ${FLAGS_TRUE} \
"Whether the mount dirs should be removed on completion."
DEFINE_string boot_args "noinitrd" \
"Additional boot arguments to pass to the commandline"
DEFINE_integer rootfs_size 720 \
"rootfs filesystem size in MBs."
# ceil(0.1 * rootfs_size) is a good minimum.
@ -157,6 +160,7 @@ make_image_bootable() {
--hd_vblock="${FLAGS_output_dir}/vmlinuz_hd.vblock" \
--vmlinuz="${FLAGS_rootfs_mountpoint}/boot/vmlinuz" \
--working_dir="${FLAGS_output_dir}" \
--boot_args="${FLAGS_boot_args}" \
--keep_work \
--rootfs_image=${root_dev} \
--rootfs_hash=${FLAGS_rootfs_hash} \

View File

@ -63,6 +63,8 @@ DEFINE_boolean preserve ${FLAGS_FALSE} \
kernel/firmware not updated)"
DEFINE_boolean fast ${DEFAULT_FAST} \
"Call many emerges in parallel"
DEFINE_string boot_args "noinitrd" \
"Additional boot arguments to pass to the commandline"
DEFINE_string usb_disk /dev/sdb3 \
"Path syslinux should use to do a usb boot. Default: /dev/sdb3"
@ -346,6 +348,7 @@ create_boot_desc() {
cat <<EOF > ${OUTPUT_DIR}/boot.desc
--arch="${ARCH}"
--output_dir="${OUTPUT_DIR}"
--boot_args="${FLAGS_boot_args}"
--rootfs_size="${FLAGS_rootfs_size}"
--rootfs_hash_pad="${FLAGS_rootfs_hash_pad}"
--rootfs_hash="${ROOT_FS_HASH}"
@ -615,6 +618,7 @@ create_base_image() {
${SCRIPTS_DIR}/create_legacy_bootloader_templates.sh \
--arch=${ARCH} \
--to="${ROOT_FS_DIR}"/boot \
--boot_args="${FLAGS_boot_args}" \
--install \
${enable_rootfs_verification}

View File

@ -37,7 +37,7 @@ set -e
# Common kernel command-line args
common_args="quiet console=tty2 init=/sbin/init boot=local rootwait ro noresume"
common_args="${common_args} noswap loglevel=1"
common_args="${common_args} noswap loglevel=1 ${FLAGS_boot_args}"
# Common verified boot command-line args
verity_common="dm_verity.error_behavior=${FLAGS_verity_error_behavior}"