Translate extra_boot_params into disk boot kernel options

The extra_boot_params install value is presented as a single boot
parameter in the initial miniboot ISO boot. This kickstart change
translates the install value into proper disk boot kernel options, so
that the provided extra_boot_params are applied as boot options for the
main /boot parameters in grub and syslinux.

Although the extra_boot_params value must be a single string, multiple
extra boot parameters can be specified by separating individual args
by a comma. Example: extra_boot_params=arg1=1,arg2=2. This change splits
the args by comma and ensures that the kernel boot options are separate
for the main boot.

Test Plan
PASS:
- Verify that extra_boot_params is parsed into separate kernel options
- Verify that disk kernel options are applied when subcloud is installed
  (i.e., the final install boots with the configured extra options)
- Verify comma-separated input values are translated into proper
  kernel options:
    - extra_boot_params=arg1=1,arg2=2 -> kernel options: arg1=1 arg2=2
    - extra_boot_params=arg1=1 -> kernel options: arg1=1
    - extra_boot_params=arg1 -> kernel options: arg1

Partial-Bug: 2023407
Depends-On: https://review.opendev.org/c/starlingx/distcloud/+/885758

Change-Id: I8ed10f7ffe8af51ae7b77eaa398b824347a0a998
Signed-off-by: Kyle MacLeod <kyle.macleod@windriver.com>
This commit is contained in:
Kyle MacLeod 2023-06-08 23:25:46 -04:00
parent a1acf1a0d1
commit 5f34e2843d

View File

@ -2534,6 +2534,13 @@ if [ ! -z "${insthwsettle}" ]; then
fi
fi
if [ -n "${extra_boot_params}" ]; then
# Strip out any commas and replace with space.
extra_boot_params=${extra_boot_params//,/ } # replace all ',' with ' '
ilog "Adding extra_boot_params to kernel options: ${extra_boot_params}"
add_kernel_option "${extra_boot_params}"
fi
########################################################################################
ilog "Adding these kernel params to disk boot: ${KERN_OPTS}"