Merge "Cleanup obsolete out-of-tree parameters"
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2016-2023 Wind River Systems, Inc.
|
||||
# Copyright (c) 2016-2025 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -32,7 +32,6 @@ Arguments:
|
||||
-T <tboot value> : Specify whether or not to use tboot (optional)
|
||||
-k <kernel args> : Specify any extra kernel boot arguments (optional)
|
||||
-l <base url> : Specify installer base URL
|
||||
-v <intel driver ver> : Specify intel driver ver to load
|
||||
-d : Update Debian grub menus ; rather than centos menus
|
||||
|
||||
EOF
|
||||
@@ -72,7 +71,7 @@ parms=$@
|
||||
logger -t $0 " $parms"
|
||||
debian_menus=false
|
||||
|
||||
while getopts "i:o:tgc:b:r:H:u:s:T:k:l:v:h:d" opt
|
||||
while getopts "i:o:tgc:b:r:H:u:s:T:k:l:h:d" opt
|
||||
do
|
||||
case $opt in
|
||||
i)
|
||||
@@ -122,9 +121,6 @@ do
|
||||
l)
|
||||
base_url=$OPTARG
|
||||
;;
|
||||
v)
|
||||
driver_ver=$OPTARG
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 1
|
||||
@@ -204,10 +200,6 @@ if [ -n "$kernal_extra_args" ]; then
|
||||
APPEND_OPTIONS="$APPEND_OPTIONS $kernal_extra_args"
|
||||
fi
|
||||
|
||||
if [ -n "$driver_ver" ]; then
|
||||
APPEND_OPTIONS="$APPEND_OPTIONS multi-drivers-switch=$driver_ver"
|
||||
fi
|
||||
|
||||
BASE_URL=$base_url
|
||||
|
||||
generate_config $input_file $output_file
|
||||
|
||||
@@ -2468,18 +2468,6 @@ if [ ! -z "${insthwsettle}" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Search the install kernel command line for the out-of-tree-drivers=
|
||||
# option and if present propagate that to the disk boot kernel options.
|
||||
CMDLINE=`cat /proc/cmdline`
|
||||
param="out-of-tree-drivers"
|
||||
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}"
|
||||
|
||||
@@ -1539,39 +1539,6 @@ done
|
||||
# Override installer variable to not prompt for erasing the disk
|
||||
export INSTW=0
|
||||
|
||||
# If multi-drivers-switch= is in boot parameters then we need to revert the
|
||||
# kernel modules to the legacy version. This is a workaround for the LAT
|
||||
# /install script not supporting multi-drivers-switch
|
||||
driver_version=
|
||||
if grep -s -q '\smulti-drivers-switch=' /proc/cmdline ; then
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
case "${arg}" in
|
||||
multi-drivers-switch=*)
|
||||
driver_version=${arg##*=}
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
# Only proceed if we have a valid driver_version
|
||||
if [ -n "${driver_version}" ] && \
|
||||
[ -f "/lib/modules/$(uname -r)/extra/ice-${driver_version}/ice.ko" ] && \
|
||||
[ -f "/lib/modules/$(uname -r)/extra/i40e-${driver_version}/i40e.ko" ] && \
|
||||
[ -f "/lib/modules/$(uname -r)/extra/iavf-${driver_version}/iavf.ko" ]; then
|
||||
ilog "Found multi-drivers-switch: replacing ice/i40e/iavf with driver_version='${driver_version}'"
|
||||
modprobe -r ice
|
||||
modprobe -r i40e
|
||||
modprobe -r iavf
|
||||
sleep 2
|
||||
insmod "/lib/modules/$(uname -r)/extra/ice-${driver_version}/ice.ko"
|
||||
insmod "/lib/modules/$(uname -r)/extra/i40e-${driver_version}/i40e.ko"
|
||||
insmod "/lib/modules/$(uname -r)/extra/iavf-${driver_version}/iavf.ko"
|
||||
sleep 2
|
||||
ilog "Finished multi-drivers-switch module replacement"
|
||||
else
|
||||
elog "Found multi-drivers-switch but no modules exist for driver_version='${driver_version}' (ignoring)"
|
||||
fi
|
||||
fi
|
||||
|
||||
ilog "Setting up initial IP address for ostree pull"
|
||||
parse_miniboot_network_params
|
||||
|
||||
@@ -2707,18 +2674,6 @@ if [ -n "${extra_boot_params}" ]; then
|
||||
add_kernel_option "${extra_boot_params}"
|
||||
fi
|
||||
|
||||
# Search the install kernel command line for the out-of-tree-drivers=
|
||||
# option and if present propagate that to the disk boot kernel options.
|
||||
CMDLINE=`cat /proc/cmdline`
|
||||
param="out-of-tree-drivers"
|
||||
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}"
|
||||
|
||||
Reference in New Issue
Block a user