update raspi-config after upgrading to raspberrypi-eeprom-2024.04.20-1
This commit is contained in:
parent
17ad69a9cb
commit
1fa9d05ec8
301
openEuler.patch
301
openEuler.patch
@ -1,5 +1,5 @@
|
||||
diff --git a/raspi-config b/raspi-config
|
||||
index bf24fa9..c6599aa 100755
|
||||
index bf24fa9..bac530a 100755
|
||||
--- a/raspi-config
|
||||
+++ b/raspi-config
|
||||
@@ -12,8 +12,8 @@ USER=${SUDO_USER:-$(who -m | awk '{ print $1 }')}
|
||||
@ -13,7 +13,46 @@ index bf24fa9..c6599aa 100755
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
@@ -117,15 +117,18 @@ has_analog() {
|
||||
@@ -22,7 +22,7 @@ is_pi () {
|
||||
|
||||
if is_pi ; then
|
||||
if [ -e /proc/device-tree/chosen/os_prefix ]; then
|
||||
- PREFIX="$(cat /proc/device-tree/chosen/os_prefix)"
|
||||
+ PREFIX="$(cat /proc/device-tree/chosen/os_prefix | tr -d '\0')"
|
||||
fi
|
||||
CMDLINE="/boot/${PREFIX}cmdline.txt"
|
||||
else
|
||||
@@ -63,6 +63,11 @@ is_pifour() {
|
||||
return $?
|
||||
}
|
||||
|
||||
+is_pifive() {
|
||||
+ grep -q "^Revision\s*:\s*[ 123][0-9a-fA-F][0-9a-fA-F]4[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]$" /proc/cpuinfo
|
||||
+ return $?
|
||||
+}
|
||||
+
|
||||
get_pi_type() {
|
||||
if is_pione; then
|
||||
echo 1
|
||||
@@ -72,6 +77,8 @@ get_pi_type() {
|
||||
echo 3
|
||||
elif is_pifour; then
|
||||
echo 4
|
||||
+ elif is_pifive; then
|
||||
+ echo 5
|
||||
elif is_pizero; then
|
||||
echo 0
|
||||
else
|
||||
@@ -85,7 +92,7 @@ is_live() {
|
||||
}
|
||||
|
||||
is_ssh() {
|
||||
- if pstree -p | egrep --quiet --extended-regexp ".*sshd.*\($$\)"; then
|
||||
+ if pstree -p | grep -E --quiet --extended-regexp ".*sshd.*\($$\)"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
@@ -117,15 +124,18 @@ has_analog() {
|
||||
}
|
||||
|
||||
is_installed() {
|
||||
@ -35,7 +74,7 @@ index bf24fa9..c6599aa 100755
|
||||
echo $ver
|
||||
}
|
||||
|
||||
@@ -152,7 +155,7 @@ configuration of the Raspberry Pi. Although it can be run
|
||||
@@ -152,7 +162,7 @@ configuration of the Raspberry Pi. Although it can be run
|
||||
at any time, some of the options may have difficulties if
|
||||
you have heavily customised your installation.
|
||||
|
||||
@ -44,7 +83,7 @@ index bf24fa9..c6599aa 100755
|
||||
" 20 70 1
|
||||
return 0
|
||||
}
|
||||
@@ -163,7 +166,7 @@ get_can_expand() {
|
||||
@@ -163,7 +173,7 @@ get_can_expand() {
|
||||
|
||||
PART_NUM="$(echo "$ROOT_PART" | grep -o "[[:digit:]]*$")"
|
||||
|
||||
@ -53,7 +92,7 @@ index bf24fa9..c6599aa 100755
|
||||
echo 1
|
||||
exit
|
||||
fi
|
||||
@@ -182,14 +185,25 @@ do_expand_rootfs() {
|
||||
@@ -182,14 +192,25 @@ do_expand_rootfs() {
|
||||
|
||||
PART_NUM="$(echo "$ROOT_PART" | grep -o "[[:digit:]]*$")"
|
||||
|
||||
@ -82,7 +121,7 @@ index bf24fa9..c6599aa 100755
|
||||
[ "$PART_START" ] || return 1
|
||||
# Return value will likely be error for fdisk as it fails to reload the
|
||||
# partition table because the root fs is mounted
|
||||
@@ -205,6 +219,15 @@ $PART_START
|
||||
@@ -205,6 +226,15 @@ $PART_START
|
||||
p
|
||||
w
|
||||
EOF
|
||||
@ -98,7 +137,7 @@ index bf24fa9..c6599aa 100755
|
||||
ASK_TO_REBOOT=1
|
||||
|
||||
# now set up an init.d script
|
||||
@@ -241,6 +264,7 @@ EOF
|
||||
@@ -241,6 +271,7 @@ EOF
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
whiptail --msgbox "Root partition has been resized.\nThe filesystem will be enlarged upon the next reboot" 20 60 2
|
||||
fi
|
||||
@ -106,7 +145,7 @@ index bf24fa9..c6599aa 100755
|
||||
}
|
||||
|
||||
set_config_var() {
|
||||
@@ -397,9 +421,12 @@ do_overscan_kms() {
|
||||
@@ -397,9 +428,12 @@ do_overscan_kms() {
|
||||
echo "xrandr --output HDMI-$DEV --set \"left margin\" $PIX --set \"right margin\" $PIX --set \"top margin\" $PIX --set \"bottom margin\" $PIX" >> /usr/share/ovscsetup.sh
|
||||
fi
|
||||
else
|
||||
@ -120,7 +159,7 @@ index bf24fa9..c6599aa 100755
|
||||
sed /usr/share/dispsetup.sh -i -e "s#exit#if [ -e /usr/share/ovscsetup.sh ] ; then\n. /usr/share/ovscsetup.sh\nfi\nexit#"
|
||||
fi
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
@@ -424,8 +451,9 @@ do_blanking() {
|
||||
@@ -424,8 +458,9 @@ do_blanking() {
|
||||
CURRENT=1
|
||||
fi
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
@ -132,7 +171,7 @@ index bf24fa9..c6599aa 100755
|
||||
fi
|
||||
whiptail --yesno "Would you like to enable screen blanking?" $DEFAULT 20 60 2
|
||||
RET=$?
|
||||
@@ -577,69 +605,74 @@ do_change_timezone() {
|
||||
@@ -577,69 +612,74 @@ do_change_timezone() {
|
||||
|
||||
get_wifi_country() {
|
||||
CODE=${1:-0}
|
||||
@ -148,15 +187,15 @@ index bf24fa9..c6599aa 100755
|
||||
+ whiptail --msgbox "No wireless interface found" 20 60
|
||||
+ fi
|
||||
+ return 1
|
||||
+ fi
|
||||
fi
|
||||
- if [ -z "$REGDOMAIN" ] \
|
||||
- || ! grep -q "^${REGDOMAIN}[[:space:]]" /usr/share/zoneinfo/iso3166.tab; then
|
||||
+ if ! wpa_cli -i "$IFACE" status > /dev/null 2>&1; then
|
||||
+ if [ "$INTERACTIVE" = True ]; then
|
||||
+ whiptail --msgbox "Could not communicate with wpa_supplicant" 20 60
|
||||
+ fi
|
||||
+ return 1
|
||||
fi
|
||||
- if [ -z "$REGDOMAIN" ] \
|
||||
- || ! grep -q "^${REGDOMAIN}[[:space:]]" /usr/share/zoneinfo/iso3166.tab; then
|
||||
+ fi
|
||||
+ wpa_cli -i "$IFACE" save_config > /dev/null 2>&1
|
||||
+ COUNTRY="$(wpa_cli -i "$IFACE" get country)"
|
||||
+ if [ "$COUNTRY" = "FAIL" ]; then
|
||||
@ -252,7 +291,7 @@ index bf24fa9..c6599aa 100755
|
||||
}
|
||||
|
||||
get_hostname() {
|
||||
@@ -664,7 +697,7 @@ No other symbols, punctuation characters, or blank spaces are permitted.\
|
||||
@@ -664,7 +704,7 @@ No other symbols, punctuation characters, or blank spaces are permitted.\
|
||||
true
|
||||
fi
|
||||
if [ "$?" -eq 0 ]; then
|
||||
@ -261,7 +300,7 @@ index bf24fa9..c6599aa 100755
|
||||
hostnamectl set-hostname "$NEW_HOSTNAME" 2> /dev/null
|
||||
else
|
||||
echo "$NEW_HOSTNAME" > /etc/hostname
|
||||
@@ -826,7 +859,7 @@ clear_overclock () {
|
||||
@@ -826,7 +866,7 @@ clear_overclock () {
|
||||
}
|
||||
|
||||
get_ssh() {
|
||||
@ -270,7 +309,7 @@ index bf24fa9..c6599aa 100755
|
||||
echo 1
|
||||
else
|
||||
echo 0
|
||||
@@ -852,12 +885,12 @@ do_ssh() {
|
||||
@@ -852,12 +892,12 @@ do_ssh() {
|
||||
fi
|
||||
if [ $RET -eq 0 ]; then
|
||||
ssh-keygen -A &&
|
||||
@ -287,7 +326,7 @@ index bf24fa9..c6599aa 100755
|
||||
STATUS=disabled
|
||||
else
|
||||
return $RET
|
||||
@@ -868,7 +901,7 @@ do_ssh() {
|
||||
@@ -868,7 +908,7 @@ do_ssh() {
|
||||
}
|
||||
|
||||
get_vnc() {
|
||||
@ -296,7 +335,7 @@ index bf24fa9..c6599aa 100755
|
||||
echo 0
|
||||
else
|
||||
echo 1
|
||||
@@ -880,33 +913,39 @@ do_vnc() {
|
||||
@@ -880,33 +920,39 @@ do_vnc() {
|
||||
if [ $(get_vnc) -eq 0 ]; then
|
||||
DEFAULT=
|
||||
fi
|
||||
@ -345,7 +384,7 @@ index bf24fa9..c6599aa 100755
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1095,8 +1134,7 @@ disable_raspi_config_at_boot() {
|
||||
@@ -1095,8 +1141,7 @@ disable_raspi_config_at_boot() {
|
||||
}
|
||||
|
||||
get_boot_cli() {
|
||||
@ -355,7 +394,7 @@ index bf24fa9..c6599aa 100755
|
||||
echo 1
|
||||
else
|
||||
echo 0
|
||||
@@ -1409,6 +1447,9 @@ do_boot_behaviour() {
|
||||
@@ -1409,6 +1454,9 @@ do_boot_behaviour() {
|
||||
;;
|
||||
B2*)
|
||||
systemctl --quiet set-default multi-user.target
|
||||
@ -365,7 +404,7 @@ index bf24fa9..c6599aa 100755
|
||||
cat > /etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF
|
||||
[Service]
|
||||
ExecStart=
|
||||
@@ -1416,19 +1457,22 @@ ExecStart=-/sbin/agetty --autologin $USER --noclear %I \$TERM
|
||||
@@ -1416,19 +1464,22 @@ ExecStart=-/sbin/agetty --autologin $USER --noclear %I \$TERM
|
||||
EOF
|
||||
;;
|
||||
B3*)
|
||||
@ -391,7 +430,7 @@ index bf24fa9..c6599aa 100755
|
||||
cat > /etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF
|
||||
[Service]
|
||||
ExecStart=
|
||||
@@ -1437,7 +1481,7 @@ EOF
|
||||
@@ -1437,7 +1488,7 @@ EOF
|
||||
sed /etc/lightdm/lightdm.conf -i -e "s/^\(#\|\)autologin-user=.*/autologin-user=$USER/"
|
||||
disable_raspi_config_at_boot
|
||||
else
|
||||
@ -400,7 +439,176 @@ index bf24fa9..c6599aa 100755
|
||||
return 1
|
||||
fi
|
||||
;;
|
||||
@@ -1738,7 +1782,7 @@ EOF
|
||||
@@ -1456,54 +1507,69 @@ EOF
|
||||
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 SD Card Boot" "Boot from SD Card if available, otherwise boot from USB" \
|
||||
- "B2 USB Boot" "Boot from USB if available, otherwise boot from SD Card" \
|
||||
- "B3 Network Boot" "Boot from network if SD card boot fails" \
|
||||
+ "B1 SD Card Boot " "Boot from SD Card before trying NVMe and then USB (RECOMMENDED)" \
|
||||
+ "B2 NVMe/USB Boot" "Boot from NVMe before trying USB and then SD Card" \
|
||||
+ "B3 Network Boot " "Boot from Network unless override by SD Card" \
|
||||
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)
|
||||
+ CURDATE=$(date -d "$(vcgencmd bootloader_version | head -n 1)" +%Y%m%d)
|
||||
FILNAME="none"
|
||||
- if grep -q "stable" /etc/default/rpi-eeprom-update ; then
|
||||
- EEPATH="/lib/firmware/raspberrypi/bootloader/stable/pieeprom*.bin"
|
||||
+ EEBASE=$(rpi-eeprom-update | grep RELEASE | sed 's/.*(//g' | sed 's/[^\/]*)//g')
|
||||
+ if grep FIRMWARE_RELEASE_STATUS /etc/default/rpi-eeprom-update | grep -Eq "stable|latest"; then
|
||||
+ EEPATH="${EEBASE}/latest/pieeprom*.bin"
|
||||
else
|
||||
- EEPATH="/lib/firmware/raspberrypi/bootloader/critical/pieeprom*.bin"
|
||||
+ EEPATH="${EEBASE}/default/pieeprom*.bin"
|
||||
fi
|
||||
- for filename in $EEPATH ; do
|
||||
- FILDATE=$(date -d "`echo $filename | cut -d - -f 2- | cut -d . -f 1`" +%Y%m%d)
|
||||
+ for filename in $(find $EEPATH -name "pieeprom*.bin" 2>/dev/null | sort); do
|
||||
+ FILDATE=$(date -d "$(echo $filename | sed 's/.*\///g' | cut -d - -f 2- | cut -d . -f 1)" +%Y%m%d)
|
||||
if [ $FILDATE -eq $CURDATE ]; then
|
||||
FILNAME=$filename
|
||||
+ break
|
||||
+ elif [ "$FILDATE" ">" "$CURDATE" ]; then
|
||||
+ # If there is no exact match then try an upgrade
|
||||
+ 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
|
||||
+ whiptail --msgbox "Current EEPROM version $(date -d $CURDATE +%Y-%m-%d) or newer not found - aborting.\n\nTry updating the rpi-eeprom APT package." 20 70 2
|
||||
fi
|
||||
return 1
|
||||
fi
|
||||
EECFG=$(mktemp)
|
||||
- vcgencmd bootloader_config > $EECFG
|
||||
+ rpi-eeprom-config > $EECFG
|
||||
sed $EECFG -i -e "/SD_BOOT_MAX_RETRIES/d"
|
||||
sed $EECFG -i -e "/NET_BOOT_MAX_RETRIES/d"
|
||||
case "$BOOTOPT" in
|
||||
B1*)
|
||||
+ if is_pifive; then
|
||||
+ ORD=0xf461
|
||||
+ else
|
||||
+ ORD=0xf41
|
||||
+ fi
|
||||
if ! grep -q "BOOT_ORDER" $EECFG ; then
|
||||
- sed $EECFG -i -e "\$a[all]\nBOOT_ORDER=0xf41"
|
||||
+ sed $EECFG -i -e "\$a[all]\nBOOT_ORDER=${ORD}"
|
||||
else
|
||||
- sed $EECFG -i -e "s/^BOOT_ORDER=.*/BOOT_ORDER=0xf41/"
|
||||
+ sed $EECFG -i -e "s/^BOOT_ORDER=.*/BOOT_ORDER=${ORD}/"
|
||||
fi
|
||||
STATUS="SD Card"
|
||||
;;
|
||||
B2*)
|
||||
+ if is_pifive; then
|
||||
+ ORD=0xf146
|
||||
+ else
|
||||
+ ORD=0xf14
|
||||
+ fi
|
||||
if ! grep -q "BOOT_ORDER" $EECFG ; then
|
||||
- sed $EECFG -i -e "\$a[all]\nBOOT_ORDER=0xf14"
|
||||
+ sed $EECFG -i -e "\$a[all]\nBOOT_ORDER=${ORD}"
|
||||
else
|
||||
- sed $EECFG -i -e "s/^BOOT_ORDER=.*/BOOT_ORDER=0xf14/"
|
||||
+ sed $EECFG -i -e "s/^BOOT_ORDER=.*/BOOT_ORDER=${ORD}/"
|
||||
fi
|
||||
- STATUS="USB"
|
||||
+ STATUS="NVMe/USB"
|
||||
;;
|
||||
B3*)
|
||||
if ! grep -q "BOOT_ORDER" $EECFG ; then
|
||||
@@ -1518,9 +1584,7 @@ do_boot_order() {
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
- EEBIN=$(mktemp)
|
||||
- rpi-eeprom-config --config $EECFG --out $EEBIN $FILNAME
|
||||
- rpi-eeprom-update -d -f $EEBIN
|
||||
+ rpi-eeprom-config --apply $EECFG $FILNAME
|
||||
ASK_TO_REBOOT=1
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
whiptail --msgbox "$STATUS is default boot device" 20 60 1
|
||||
@@ -1531,9 +1595,9 @@ do_boot_order() {
|
||||
|
||||
do_boot_rom() {
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
- BOOTOPT=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Boot ROM Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT \
|
||||
- "E1 Latest" "Use the latest version boot ROM software" \
|
||||
- "E2 Default" "Use the factory default boot ROM software" \
|
||||
+ BOOTOPT=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Bootloader Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT \
|
||||
+ "E1 Latest" "Use the latest bootloader image" \
|
||||
+ "E2 Default" "Use the factory default bootloader image" \
|
||||
3>&1 1>&2 2>&3)
|
||||
else
|
||||
BOOTOPT=$1
|
||||
@@ -1542,46 +1606,47 @@ do_boot_rom() {
|
||||
if [ $? -eq 0 ]; then
|
||||
case "$BOOTOPT" in
|
||||
E1*)
|
||||
- sed /etc/default/rpi-eeprom-update -i -e "s/^FIRMWARE_RELEASE_STATUS.*/FIRMWARE_RELEASE_STATUS=\"stable\"/"
|
||||
+ sed /etc/default/rpi-eeprom-update -i -e "s/^FIRMWARE_RELEASE_STATUS.*/FIRMWARE_RELEASE_STATUS=\"latest\"/"
|
||||
EETYPE="Latest version"
|
||||
;;
|
||||
E2*)
|
||||
- sed /etc/default/rpi-eeprom-update -i -e "s/^FIRMWARE_RELEASE_STATUS.*/FIRMWARE_RELEASE_STATUS=\"critical\"/"
|
||||
+ sed /etc/default/rpi-eeprom-update -i -e "s/^FIRMWARE_RELEASE_STATUS.*/FIRMWARE_RELEASE_STATUS=\"default\"/"
|
||||
EETYPE="Factory default"
|
||||
;;
|
||||
*)
|
||||
- whiptail --msgbox "Programmer error, unrecognised boot ROM option" 20 60 2
|
||||
+ whiptail --msgbox "Programmer error, unrecognised bootloader option" 20 60 2
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
- whiptail --yesno "$EETYPE boot ROM selected - will be loaded at next reboot.\n\nReset boot ROM to defaults?" 20 60 2
|
||||
+ whiptail --yesno "$EETYPE bootloader selected - will be loaded at next reboot.\n\nReset bootloader to default configuration?" 20 60 2
|
||||
DEFAULTS=$?
|
||||
else
|
||||
DEFAULTS=$2
|
||||
fi
|
||||
if [ "$DEFAULTS" -eq 0 ]; then # yes
|
||||
- if grep -q "stable" /etc/default/rpi-eeprom-update ; then
|
||||
- EEPATH="/lib/firmware/raspberrypi/bootloader/stable/"
|
||||
+ EEBASE=$(rpi-eeprom-update | grep RELEASE | sed 's/.*(//g' | sed 's/[^\/]*)//g')
|
||||
+ if grep FIRMWARE_RELEASE_STATUS /etc/default/rpi-eeprom-update | grep -Eq "stable|latest"; then
|
||||
+ EEPATH="${EEBASE}/latest/"
|
||||
else
|
||||
- EEPATH="/lib/firmware/raspberrypi/bootloader/critical/"
|
||||
+ EEPATH="${EEBASE}/default/"
|
||||
fi
|
||||
MATCH=".*/pieeprom-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].bin"
|
||||
- FILNAME="$(find "${EEPATH}" -maxdepth 1 -type f -size 524288c -regex "${MATCH}" | sort -r | head -n1)"
|
||||
+ FILNAME="$(find "${EEPATH}" -maxdepth 1 -type f -regex "${MATCH}" | sort -r | head -n1)"
|
||||
if [ -z "$FILNAME" ]; then
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
- whiptail --msgbox "No EEPROM bin file found - cannot reset to defaults" 20 60 2
|
||||
+ whiptail --msgbox "No EEPROM bin file found - cannot reset to defaults,\n\nTry updating APT rpi-eeprom package and selecting the latest release." 20 60 2
|
||||
fi
|
||||
else
|
||||
rpi-eeprom-update -d -f $FILNAME
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
- whiptail --msgbox "Boot ROM reset to defaults" 20 60 2
|
||||
+ whiptail --msgbox "Bootloader reset to default configuration" 20 60 2
|
||||
fi
|
||||
fi
|
||||
else
|
||||
rpi-eeprom-update
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
- whiptail --msgbox "Boot ROM not reset to defaults" 20 60 2
|
||||
+ whiptail --msgbox "Bootloader not reset to defaults" 20 60 2
|
||||
fi
|
||||
fi
|
||||
ASK_TO_REBOOT=1
|
||||
@@ -1738,7 +1803,7 @@ EOF
|
||||
}
|
||||
|
||||
get_camera() {
|
||||
@ -409,7 +617,7 @@ index bf24fa9..c6599aa 100755
|
||||
CAM=$(get_config_var start_x $CONFIG)
|
||||
if [ $CAM -eq 1 ]; then
|
||||
echo 0
|
||||
@@ -1760,7 +1804,7 @@ get_camera() {
|
||||
@@ -1760,7 +1825,7 @@ get_camera() {
|
||||
}
|
||||
|
||||
do_camera() {
|
||||
@ -418,7 +626,7 @@ index bf24fa9..c6599aa 100755
|
||||
whiptail --msgbox "Your firmware appears to be out of date (no start_x.elf). Please update" 20 60 2
|
||||
return 1
|
||||
fi
|
||||
@@ -1783,7 +1827,7 @@ do_camera() {
|
||||
@@ -1783,7 +1848,7 @@ do_camera() {
|
||||
ASK_TO_REBOOT=1
|
||||
fi
|
||||
if [ $RET -eq 0 ]; then
|
||||
@ -427,7 +635,7 @@ index bf24fa9..c6599aa 100755
|
||||
set_config_var start_x 1 $CONFIG
|
||||
CUR_GPU_MEM=$(get_config_var gpu_mem $CONFIG)
|
||||
if [ -z "$CUR_GPU_MEM" ] || [ "$CUR_GPU_MEM" -lt 128 ]; then
|
||||
@@ -1794,7 +1838,7 @@ do_camera() {
|
||||
@@ -1794,7 +1859,7 @@ do_camera() {
|
||||
fi
|
||||
STATUS=enabled
|
||||
elif [ $RET -eq 1 ]; then
|
||||
@ -436,7 +644,7 @@ index bf24fa9..c6599aa 100755
|
||||
set_config_var start_x 0 $CONFIG
|
||||
sed $CONFIG -i -e "s/^start_file/#start_file/"
|
||||
else
|
||||
@@ -1912,19 +1956,19 @@ do_legacy() {
|
||||
@@ -1912,19 +1977,19 @@ do_legacy() {
|
||||
}
|
||||
|
||||
do_gldriver() {
|
||||
@ -469,7 +677,7 @@ index bf24fa9..c6599aa 100755
|
||||
GLOPT=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "GL Driver" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT \
|
||||
"G1 Legacy" "Original non-GL desktop driver" \
|
||||
"G2 GL (Full KMS)" "OpenGL desktop driver with full KMS" \
|
||||
@@ -2153,6 +2197,7 @@ do_net_names () {
|
||||
@@ -2153,6 +2218,7 @@ do_net_names () {
|
||||
rm -f /etc/systemd/network/73-usb-net-by-mac.link
|
||||
STATUS=enabled
|
||||
elif [ $RET -eq 1 ]; then
|
||||
@ -477,7 +685,7 @@ index bf24fa9..c6599aa 100755
|
||||
ln -sf /dev/null /etc/systemd/network/99-default.link
|
||||
ln -sf /dev/null /etc/systemd/network/73-usb-net-by-mac.link
|
||||
STATUS=disabled
|
||||
@@ -2165,8 +2210,8 @@ do_net_names () {
|
||||
@@ -2165,8 +2231,8 @@ do_net_names () {
|
||||
}
|
||||
|
||||
do_update() {
|
||||
@ -488,7 +696,7 @@ index bf24fa9..c6599aa 100755
|
||||
printf "Sleeping 5 seconds before reloading raspi-config\n" &&
|
||||
sleep 5 &&
|
||||
exec raspi-config
|
||||
@@ -2211,7 +2256,7 @@ do_audio() {
|
||||
@@ -2211,7 +2277,7 @@ do_audio() {
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
n=0
|
||||
array=""
|
||||
@ -497,7 +705,7 @@ index bf24fa9..c6599aa 100755
|
||||
do
|
||||
CARD=$(LC_ALL=C aplay -l | grep "card $n" | cut -d [ -f 2 | cut -d ] -f 1)
|
||||
if [ -z "$CARD" ] ; then
|
||||
@@ -2377,12 +2422,69 @@ EOF
|
||||
@@ -2377,12 +2443,69 @@ EOF
|
||||
list_wlan_interfaces() {
|
||||
for dir in /sys/class/net/*/wireless; do
|
||||
if [ -d "$dir" ]; then
|
||||
@ -571,7 +779,7 @@ index bf24fa9..c6599aa 100755
|
||||
}
|
||||
|
||||
do_wifi_ssid_passphrase() {
|
||||
@@ -2883,8 +2985,8 @@ do_proxy() {
|
||||
@@ -2883,8 +3006,8 @@ do_proxy() {
|
||||
sed -i "/^export ${SCHEME}_/Id" /etc/profile.d/proxy.sh
|
||||
fi
|
||||
if [ "${SCHEME#*http}" != "$SCHEME" ]; then
|
||||
@ -582,7 +790,7 @@ index bf24fa9..c6599aa 100755
|
||||
fi
|
||||
fi
|
||||
if [ -z "$ADDRESS" ]; then
|
||||
@@ -2898,7 +3000,7 @@ do_proxy() {
|
||||
@@ -2898,7 +3021,7 @@ do_proxy() {
|
||||
echo "export ${SCHEME}_proxy=\"$ADDRESS\"" >> /etc/profile.d/proxy.sh
|
||||
fi
|
||||
if [ "${SCHEME#*http}" != "$SCHEME" ]; then
|
||||
@ -591,7 +799,7 @@ index bf24fa9..c6599aa 100755
|
||||
fi
|
||||
done
|
||||
if [ "$INTERACTIVE" = True ]; then
|
||||
@@ -2929,7 +3031,9 @@ do
|
||||
@@ -2929,7 +3052,9 @@ do
|
||||
--expand-rootfs)
|
||||
INTERACTIVE=False
|
||||
do_expand_rootfs
|
||||
@ -602,7 +810,7 @@ index bf24fa9..c6599aa 100755
|
||||
exit 0
|
||||
;;
|
||||
--apply-os-config)
|
||||
@@ -2975,8 +3079,8 @@ do_system_menu() {
|
||||
@@ -2975,8 +3100,8 @@ do_system_menu() {
|
||||
"S3 Password" "Change password for the '$USER' user" \
|
||||
"S4 Hostname" "Set name for this computer on a network" \
|
||||
"S5 Boot / Auto Login" "Select boot into desktop or to command line" \
|
||||
@ -613,7 +821,7 @@ index bf24fa9..c6599aa 100755
|
||||
"S8 Power LED" "Set behaviour of power LED" \
|
||||
3>&1 1>&2 2>&3)
|
||||
elif is_live ; then
|
||||
@@ -2985,7 +3089,7 @@ do_system_menu() {
|
||||
@@ -2985,7 +3110,7 @@ do_system_menu() {
|
||||
"S3 Password" "Change password for the '$USER' user" \
|
||||
"S4 Hostname" "Set name for this computer on a network" \
|
||||
"S5 Boot / Auto Login" "Select boot into desktop or to command line" \
|
||||
@ -622,7 +830,7 @@ index bf24fa9..c6599aa 100755
|
||||
3>&1 1>&2 2>&3)
|
||||
else
|
||||
FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "System Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \
|
||||
@@ -2993,8 +3097,8 @@ do_system_menu() {
|
||||
@@ -2993,8 +3118,8 @@ do_system_menu() {
|
||||
"S3 Password" "Change password for the '$USER' user" \
|
||||
"S4 Hostname" "Set name for this computer on a network" \
|
||||
"S5 Boot / Auto Login" "Select boot into desktop or to command line" \
|
||||
@ -633,7 +841,7 @@ index bf24fa9..c6599aa 100755
|
||||
3>&1 1>&2 2>&3)
|
||||
fi
|
||||
RET=$?
|
||||
@@ -3002,7 +3106,7 @@ do_system_menu() {
|
||||
@@ -3002,7 +3127,7 @@ do_system_menu() {
|
||||
return 0
|
||||
elif [ $RET -eq 0 ]; then
|
||||
case "$FUN" in
|
||||
@ -642,7 +850,7 @@ index bf24fa9..c6599aa 100755
|
||||
S2\ *) do_audio ;;
|
||||
S3\ *) do_change_pass ;;
|
||||
S4\ *) do_hostname ;;
|
||||
@@ -3071,7 +3175,7 @@ do_interface_menu() {
|
||||
@@ -3071,7 +3196,7 @@ do_interface_menu() {
|
||||
FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Interfacing Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \
|
||||
"I1 Legacy Camera" "Enable/disable legacy camera support" \
|
||||
"I2 SSH" "Enable/disable remote command line access using SSH" \
|
||||
@ -651,7 +859,7 @@ index bf24fa9..c6599aa 100755
|
||||
"I4 SPI" "Enable/disable automatic loading of SPI kernel module" \
|
||||
"I5 I2C" "Enable/disable automatic loading of I2C kernel module" \
|
||||
"I6 Serial Port" "Enable/disable shell messages on the serial connection" \
|
||||
@@ -3105,7 +3209,7 @@ do_performance_menu() {
|
||||
@@ -3105,7 +3230,7 @@ do_performance_menu() {
|
||||
FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Performance Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \
|
||||
"P1 Overclock" "Configure CPU overclocking" \
|
||||
"P2 GPU Memory" "Change the amount of memory made available to the GPU" \
|
||||
@ -660,7 +868,7 @@ index bf24fa9..c6599aa 100755
|
||||
"P4 Fan" "Set behaviour of GPIO fan" \
|
||||
3>&1 1>&2 2>&3)
|
||||
RET=$?
|
||||
@@ -3147,41 +3251,41 @@ do_advanced_menu() {
|
||||
@@ -3147,41 +3272,41 @@ do_advanced_menu() {
|
||||
if is_pifour ; then
|
||||
FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Advanced Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \
|
||||
"A1 Expand Filesystem" "Ensures that all of the SD card is available" \
|
||||
@ -669,9 +877,10 @@ index bf24fa9..c6599aa 100755
|
||||
"A4 Network Interface Names" "Enable/disable predictable network i/f names" \
|
||||
"A5 Network Proxy Settings" "Configure network proxy settings" \
|
||||
"A6 Boot Order" "Choose network or USB device boot" \
|
||||
"A7 Bootloader Version" "Select latest or default boot ROM software" \
|
||||
- "A7 Bootloader Version" "Select latest or default boot ROM software" \
|
||||
- "A9 Wayland" "Enable experimental Wayland backend" \
|
||||
- "AA Network Config" "Set network configuration tool" \
|
||||
+ "A7 Bootloader Version" "Select latest or factory default bootloader software" \
|
||||
+ `# "A9 Wayland" "Enable experimental Wayland backend"` \
|
||||
+ `# "AA Network Config" "Set network configuration tool"` \
|
||||
3>&1 1>&2 2>&3)
|
||||
@ -714,7 +923,7 @@ index bf24fa9..c6599aa 100755
|
||||
3>&1 1>&2 2>&3)
|
||||
fi
|
||||
RET=$?
|
||||
@@ -3200,7 +3304,7 @@ do_advanced_menu() {
|
||||
@@ -3200,7 +3325,7 @@ do_advanced_menu() {
|
||||
A9\ *) do_wayland ;;
|
||||
AA\ *) do_netconf ;;
|
||||
*) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;;
|
||||
@ -723,7 +932,7 @@ index bf24fa9..c6599aa 100755
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -3237,17 +3341,17 @@ if [ "$INTERACTIVE" = True ]; then
|
||||
@@ -3237,17 +3362,17 @@ if [ "$INTERACTIVE" = True ]; then
|
||||
calc_wt_size
|
||||
while [ "$USER" = "root" ] || [ -z "$USER" ]; do
|
||||
if ! USER=$(whiptail --inputbox "raspi-config could not determine the default user.\\n\\nWhat user should these settings apply to?" 20 60 pi 3>&1 1>&2 2>&3); then
|
||||
@ -744,7 +953,7 @@ index bf24fa9..c6599aa 100755
|
||||
"6 Advanced Options" "Configure advanced settings" \
|
||||
"8 Update" "Update this tool to the latest version" \
|
||||
"9 About raspi-config" "Information about this configuration tool" \
|
||||
@@ -3257,7 +3361,7 @@ if [ "$INTERACTIVE" = True ]; then
|
||||
@@ -3257,7 +3382,7 @@ if [ "$INTERACTIVE" = True ]; then
|
||||
"1 System Options" "Configure system settings" \
|
||||
"2 Display Options" "Configure display settings" \
|
||||
"3 Interface Options" "Configure connections to peripherals" \
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
Name: raspi-config
|
||||
Version: 20230320
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Raspberry Pi configuration tool
|
||||
License: MIT
|
||||
URL: https://github.com/RPi-Distro/raspi-config
|
||||
@ -64,6 +64,9 @@ cd -
|
||||
%{_etc_path}/*
|
||||
|
||||
%changelog
|
||||
* Thu Apr 25 2024 Yafen Fang <yafen@iscas.ac.cn> - 20230320-2
|
||||
- update script: raspi-config after upgrading to raspberrypi-eeprom-2024.04.20-1.
|
||||
|
||||
* Mon Mar 20 2023 Yafen Fang <yafen@iscas.ac.cn> - 20230320-1
|
||||
- update to upstream's last commit (408bde537671de6df2d9b91564e67132f98ffa71): do_wifi_ssid_passphrase: set scan_ssid on hidden network in dhcpcd case
|
||||
- adjust for openEuler
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user