From 61bad300f7f0d0a33a664f0793f21fffec437b5a Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Tue, 16 May 2023 19:31:40 +0000 Subject: [PATCH] Add intel multi-drivers-switch kernel parameter support to kickstarts This update adds support to the Debian kickstarts to search the install kernel command line for the multi-drivers-switch= option. If that option is found, then the full option with the specified version, ex: multi-drivers-switch=2.54 , will be added to the disk boot kernel command line options. Test Plan: PASS: Verify Build and Install SX system PASS: Unit test of code block function over an install PASS: Verify if the multi-drivers-switch parameter exists on the the node install command line then the same option is propagated to the disk boot command line. PASS: Verify the opposite of the above is true. Closes-Bug: 2026893 Change-Id: I648b16dbc5aa2a0a7b8368c1b89a5d46418ab1e5 Signed-off-by: Eric MacDonald --- kickstart/files/kickstart.cfg | 12 ++++++++++++ kickstart/files/miniboot.cfg | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg index bf77da99..1669505c 100644 --- a/kickstart/files/kickstart.cfg +++ b/kickstart/files/kickstart.cfg @@ -2406,6 +2406,18 @@ if [ ! -z "${insthwsettle}" ]; then fi fi +# Search the install kernel command line for the multi-drivers-switch= +# option and if present propagate that to the disk boot kernel options. +CMDLINE=`cat /proc/cmdline` +param="multi-drivers-switch" +for option in ${CMDLINE} ; do + opt=${option%%=*} + if [ "${param}" = "${opt}" ]; then + add_kernel_option "${option}" + break + fi +done + ######################################################################################## ilog "Adding these kernel params to disk boot: ${KERN_OPTS}" diff --git a/kickstart/files/miniboot.cfg b/kickstart/files/miniboot.cfg index 4aa48efa..970e46ea 100644 --- a/kickstart/files/miniboot.cfg +++ b/kickstart/files/miniboot.cfg @@ -2595,6 +2595,18 @@ if [ -n "${extra_boot_params}" ]; then add_kernel_option "${extra_boot_params}" fi +# Search the install kernel command line for the multi-drivers-switch= +# option and if present propagate that to the disk boot kernel options. +CMDLINE=`cat /proc/cmdline` +param="multi-drivers-switch" +for option in ${CMDLINE} ; do + opt=${option%%=*} + if [ "${param}" = "${opt}" ]; then + add_kernel_option "${option}" + break + fi +done + ######################################################################################## ilog "Adding these kernel params to disk boot: ${KERN_OPTS}"