diff --git a/bin/cros_make_image_bootable b/bin/cros_make_image_bootable index f56b14d7ca..7179b89a6b 100755 --- a/bin/cros_make_image_bootable +++ b/bin/cros_make_image_bootable @@ -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} \ diff --git a/build_image b/build_image index 49e921dfc3..3b3f061df6 100755 --- a/build_image +++ b/build_image @@ -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 < ${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} diff --git a/create_legacy_bootloader_templates.sh b/create_legacy_bootloader_templates.sh index 9cfd48f8fd..2585fed289 100755 --- a/create_legacy_bootloader_templates.sh +++ b/create_legacy_bootloader_templates.sh @@ -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}"