From 04ec68ab5c8b115f716adf2459f7904aaf7f4486 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Fri, 15 May 2020 08:44:36 +0100 Subject: [PATCH] Temporarily revert EEPROM config changes This reverts commit 089f4f033ca894f2313593bf999ff27ae4ad17ea. This reverts commit 0b91529ef60a9b5749b25ea1323ce48aa12bb651. This reverts commit 4eb2224f0f095b489ff11b23d0bc304dcb79b583. This reverts commit b56fe9f8d742bb5196767a4115ecb834eaa44281. --- raspi-config | 67 ---------------------------------------------------- 1 file changed, 67 deletions(-) diff --git a/raspi-config b/raspi-config index c561828..66df6b5 100755 --- a/raspi-config +++ b/raspi-config @@ -1184,65 +1184,6 @@ EOF fi } -do_boot_order() { - if [ "$INTERACTIVE" = True ]; then - BOOTOPT=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Boot Device Order" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT \ - "B1 USB Boot" "Boot from USB device if SD card boot fails" \ - "B2 Network Boot" "Boot from network if SD card boot fails" \ - 3>&1 1>&2 2>&3) - else - BOOTOPT=$1 - true - fi - if [ $? -eq 0 ]; then - CURDATE=$(date -d "`vcgencmd bootloader_version | head -n 1`" +%Y%m%d) - FILNAME="none" - for filename in /lib/firmware/raspberrypi/bootloader/critical/pieeprom*.bin ; do - FILDATE=$(date -d "`echo $filename | cut -d - -f 2- | cut -d . -f 1`" +%Y%m%d) - if [ $FILDATE -eq $CURDATE ]; then - FILNAME=$filename - fi - done - if [ "$FILNAME" = "none" ]; then - if [ "$INTERACTIVE" = True ]; then - whiptail --msgbox "No EEPROM bin file found for version `date -d $CURDATE +%Y-%m-%d` - aborting" 20 60 2 - fi - return 1 - fi - EECFG=$(mktemp) - vcgencmd bootloader_config > $EECFG - case "$BOOTOPT" in - B1*) - if ! grep -q "BOOT_ORDER" $EECFG ; then - sed $EECFG -i -e "\$a[all]\nBOOT_ORDER=0xf41" - else - sed $EECFG -i -e "s/^BOOT_ORDER=.*/BOOT_ORDER=0xf41/" - fi - STATUS="USB device" - ;; - B2*) - if ! grep -q "BOOT_ORDER" $EECFG ; then - sed $EECFG -i -e "\$a[all]\nBOOT_ORDER=0xf21" - else - sed $EECFG -i -e "s/^BOOT_ORDER=.*/BOOT_ORDER=0xf21/" - fi - STATUS="Network" - ;; - *) - whiptail --msgbox "Programmer error, unrecognised boot option" 20 60 2 - return 1 - ;; - esac - EEBIN=$(mktemp) - rpi-eeprom-config --config $EECFG --out $EEBIN $FILNAME - rpi-eeprom-update -d -f $EEBIN - ASK_TO_REBOOT=1 - if [ "$INTERACTIVE" = True ]; then - whiptail --msgbox "$STATUS is default boot device" 20 60 1 - fi - fi -} - get_boot_wait() { if test -e /etc/systemd/system/dhcpcd.service.d/wait.conf; then echo 0 @@ -2436,13 +2377,6 @@ do_boot_menu() { "B1 Desktop / CLI" "Choose whether to boot into a desktop environment or the command line" \ "B2 Wait for Network at Boot" "Choose whether to wait for network connection during boot" \ 3>&1 1>&2 2>&3) - elif is_pifour ; then - FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Boot Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ - "B1 Desktop / CLI" "Choose whether to boot into a desktop environment or the command line" \ - "B2 Wait for Network at Boot" "Choose whether to wait for network connection during boot" \ - "B3 Splash Screen" "Choose graphical splash screen or text boot" \ - "B4 Boot Order" "Choose network or USB device boot" \ - 3>&1 1>&2 2>&3) else FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Boot Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ "B1 Desktop / CLI" "Choose whether to boot into a desktop environment or the command line" \ @@ -2458,7 +2392,6 @@ do_boot_menu() { B1\ *) do_boot_behaviour ;; B2\ *) do_boot_wait ;; B3\ *) do_boot_splash ;; - B4\ *) do_boot_order ;; *) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;; esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1 fi