Remove normal/rollback toggle code from stx grub menu

Modify the stx grub template file to remove the
normal / rollback image switching/toggle algorithm.
Also remove the temporary sed based method in the
kickstart code.

Effectively, this moved the previous change introduced by

  https://review.opendev.org/c/starlingx/metal/+/861461

... to a grub.cfg 'code block remove' rather
than 'on the fly sed modification' by the kickstart.

Test Plan:

PASS: Verify build and install
PASS: Verify on target code removed from /boot/efi/EFI/BOOT/grub.cfg
PASS: Verify normal image is selected after 10 back to back reboots

Story: 2009968
Task: 46886
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
Change-Id: Id8799dff6eef7ef8aa6f66180d6ed971c005618d
This commit is contained in:
Eric MacDonald 2022-11-20 23:09:48 +00:00
parent d24c008374
commit 04e9723dbb
3 changed files with 2 additions and 33 deletions

View File

@ -20,23 +20,8 @@ fi
if [ -e ${boot_env_path}/boot.env ]; then
load_env -s -f ${boot_env_path}/boot.env
if [ "${boot_tried_count}" -eq "0" ]; then
set boot_tried_count="1"
elif [ "${boot_tried_count}" -eq "1" ]; then
set boot_tried_count="2"
elif [ "${boot_tried_count}" -eq "2" ]; then
set boot_tried_count="3"
elif [ "${boot_tried_count}" -eq "3" ]; then
if [ "${default}" -eq "1" ]; then
set default="0"
else
set default="1"
fi
save_env -f ${boot_env_path}/boot.env default
set boot_tried_count="0"
fi
save_env -f ${boot_env_path}/boot.env boot_tried_count
set default="0"
save_env -f ${boot_env_path}/boot.env default
fi
search --no-floppy --label --set=avol ${boot_part}${boot_mode}

View File

@ -2342,14 +2342,6 @@ else
wlog "no kernel options added"
fi
wlog "Disable LAT's automatic image selection toggle algorithm"
sed -i '/^search --no-floppy/i \
set default="0" \
save_env -f ${boot_env_path}/boot.env default \
set boot_tried_count="0" \
save_env -f ${boot_env_path}/boot.env boot_tried_count \
' /boot/efi/EFI/BOOT/grub.cfg
ilog "Override LAT grub file"
GRUB_PATH_N_FILE="/boot/efi/EFI/BOOT/grub.cfg"
if [ ! -e ${GRUB_PATH_N_FILE}.lat ] ; then

View File

@ -2484,14 +2484,6 @@ else
wlog "no kernel options added"
fi
wlog "Disable LAT's automatic image selection toggle algorithm"
sed -i '/^search --no-floppy/i \
set default="0" \
save_env -f ${boot_env_path}/boot.env default \
set boot_tried_count="0" \
save_env -f ${boot_env_path}/boot.env boot_tried_count \
' /boot/efi/EFI/BOOT/grub.cfg
ilog "Override LAT grub file"
GRUB_PATH_N_FILE="/boot/efi/EFI/BOOT/grub.cfg"
if [ ! -e ${GRUB_PATH_N_FILE}.lat ] ; then