Skip to content

Commit

Permalink
v9.8
Browse files Browse the repository at this point in the history
- DietPi-Config | Fix SPI bootloader flash option for Orange Pi 5 and probably other SBCs, where the flashing script does not contain the SPI device anymore, but requires it as 2nd argument instead.
  • Loading branch information
MichaIng committed Oct 11, 2024
1 parent 87c1247 commit 64af7e9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dietpi/dietpi-config
Original file line number Diff line number Diff line change
Expand Up @@ -933,15 +933,13 @@ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the
fi

# Odroid N2, ROCK 4, ROCK 5B, Orange Pi 5 (Plus) and Orange Pi 3B: https://dietpi.com/forum/t/orange-pi-5-boot-from-nvme/16457
elif [[ $G_HW_MODEL =~ ^(15|72|78|80|82|87)$ ]]
elif [[ $G_HW_MODEL =~ ^(15|72|78|80|82|87)$ && -f '/usr/lib/u-boot/platform_install.sh' ]]
then
# Odroid N2/ROCK 4: Device tree overlay required
local spidev='/dev/mtdblock0'
(( $G_HW_MODEL == 15 || $G_HW_MODEL == 72 )) || {
[[ -f '/usr/lib/u-boot/platform_install.sh' ]] && {
{ [[ -e '/dev/mtd0' ]] && grep -q '/dev/mtd0' /usr/lib/u-boot/platform_install.sh && spidev='/dev/mtd0'; } ||
{ [[ -b '/dev/mtdblock0' ]] && grep -q '/dev/mtdblock0' /usr/lib/u-boot/platform_install.sh; }
}
{ [[ -e '/dev/mtd0' ]] && grep -q 'flashcp' /usr/lib/u-boot/platform_install.sh && spidev='/dev/mtd0'; } ||
{ [[ -b '/dev/mtdblock0' ]] && ! grep -q 'flashcp' /usr/lib/u-boot/platform_install.sh; }
} && G_WHIP_MENU_ARRAY+=('Update SPI bootloader' ": Flash current U-Boot to $spidev")

# VisionFive 2/Star64: https://doc-en.rvspace.org/VisionFive2/PDF/VisionFive2_QSG.pdf
Expand Down Expand Up @@ -1143,7 +1141,7 @@ Further information: https://www.raspberrypi.org/documentation/hardware/raspberr
. /usr/lib/u-boot/platform_install.sh
eval "$(declare -f write_uboot_platform_mtd | sed -e 's| > /dev/null 2>&1||g' -e 's|status=none|status=progress|g' -e 's/^[[:blank:]]*dd /dd oflag=direct conv=notrunc status=progress /')"
# shellcheck disable=SC2154
write_uboot_platform_mtd "$DIR"
write_uboot_platform_mtd "$DIR" "$spidev"

elif [[ $G_WHIP_RETURNED_VALUE == 'Update bootloader' ]]; then

Expand Down

0 comments on commit 64af7e9

Please sign in to comment.