Skip to content

Commit

Permalink
v9.4
Browse files Browse the repository at this point in the history
- Orange Pi 3 LTS/Radxa ZERO 3 | Add support
  • Loading branch information
MichaIng committed Apr 25, 2024
1 parent b544a70 commit b18a71e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ case $HW_MODEL in
85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1008;;
87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=892;;
90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1008;;
*) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;;
esac

Expand Down
18 changes: 11 additions & 7 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,12 @@ _EOF_
'72.3' ': ROCK 4C Plus'
'73' ': ROCK Pi S'
'74' ': Radxa Zero'
'90' ': Radxa ZERO 3'
'77' ': ROCK 3A'
'78' ': ROCK 5B'
'85' ': ROCK 5A'
'87' ': Orange Pi 3B'
'89' ': Orange Pi 3 LTS'
'80' ': Orange Pi 5'
'82' ': Orange Pi 5 Plus'
'83.1' ': Orange Pi Zero 3'
Expand Down Expand Up @@ -619,7 +621,7 @@ _EOF_
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot
G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot

elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87)$ ]]
elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|89|90)$ ]]
then
armbian_repo=1
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd
Expand Down Expand Up @@ -660,7 +662,7 @@ setenv rootuuid "true"' /boot/boot.cmd
(( $G_HW_MODEL == 15 )) && G_EXEC eval 'echo '\''meson_rng'\'' > /etc/modules-load.d/dietpi-hwrng.conf'

# Rockchip 64-bit (configs work with Amlogic OOTB)
elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87)$ ]]
elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87|90)$ ]]
then
G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd
G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd
Expand Down Expand Up @@ -706,7 +708,7 @@ setenv rootuuid "true"' /boot/boot.cmd
G_EXEC sed --follow-symlinks -i -e 's/ttyAML0/ttyS2/' -e '/^extraargs=/s/$/ systemd.unified_cgroup_hierarchy=0/' /boot/dietpiEnv.txt

# Allwinner 64-bit
elif [[ $G_HW_MODEL =~ ^(40|44|45|57|65|67|83)$ ]]
elif [[ $G_HW_MODEL =~ ^(40|44|45|57|65|67|83|89)$ ]]
then
G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd
G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x45000000"' /boot/boot.cmd
Expand Down Expand Up @@ -1110,6 +1112,8 @@ _EOF_
85) model='rock-5a' kernel='rk35xx' branch='legacy';;
86) model='tinkerboard-2' kernel='rockchip64';;
87) model='orangepi3b' kernel='rockchip64' branch='edge';;
89) model='orangepi3-lts' kernel='sunxi64';;
90) model='radxazero3' kernel='rockchip64' branch='vendor' dietpi_uboot=1;;
*) :;;
esac

Expand Down Expand Up @@ -1940,13 +1944,13 @@ _EOF_'
/boot/dietpi/func/dietpi-set_hardware serialconsole enable ttySAC0
/boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyGS0

# ROCKPro64, ROCK64, Pinebook Pro, NanoPi R4S, Quartz64, ASUS Tinker Board, NanoPi R2S, NanoPi NEO3, NanoPi M4V2, NanoPi M4/T4/NEO4, ROCK 4, NanoPi R5S/R5C, ROCK 3A, ASUS Tinker Board 2, Orange Pi 3B
elif [[ $G_HW_MODEL =~ ^(42|43|46|47|49|52|55|56|58|68|72|76|77|86|87)$ ]]
# ROCKPro64, ROCK64, Pinebook Pro, NanoPi R4S, Quartz64, ASUS Tinker Board, NanoPi R2S, NanoPi NEO3, NanoPi M4V2, NanoPi M4/T4/NEO4, ROCK 4, NanoPi R5S/R5C, ROCK 3A, ASUS Tinker Board 2, Orange Pi 3B, Radxa ZERO 3
elif [[ $G_HW_MODEL =~ ^(42|43|46|47|49|52|55|56|58|68|72|76|77|86|87|90)$ ]]
then
/boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS2

# PINE A64, Pinebook, PINE H64, NenoPi NEO Plus2, ZeroPi, NanoPi NEO, NanoPi M1, NanoPi NEO Air, NenoPi NEO2, NanoPi M1 Plus, NanoPi K1 Plus, ROCK Pi S, VisionFive 2, Orange Pi Zero 3, Star64
elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|83|84)$ ]]
# PINE A64, Pinebook, PINE H64, NenoPi NEO Plus2, ZeroPi, NanoPi NEO, NanoPi M1, NanoPi NEO Air, NenoPi NEO2, NanoPi M1 Plus, NanoPi K1 Plus, ROCK Pi S, VisionFive 2, Orange Pi Zero 3, Star64, Orange Pi 3 LTS
elif [[ $G_HW_MODEL =~ ^(40|44|45|57|59|60|63|64|65|66|67|73|81|83|84|89)$ ]]
then
/boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS0

Expand Down
2 changes: 1 addition & 1 deletion dietpi/func/dietpi-set_hardware
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ Do you want to continue and disable the serial login console?' || return 1
elif (( $DIETPIENV || $G_HW_MODEL == 49 || $G_HW_MODEL == 76 || $G_HW_MODEL == 79 ))
then
local baudrate='115200'
if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|76|77|87)$ && $INPUT_ADDITIONAL == 'ttyS2' ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] || [[ $G_HW_MODEL =~ ^(76|78|79|80|82|85)$ && $INPUT_ADDITIONAL == 'ttyFIQ0' ]]
if [[ $G_HW_MODEL =~ ^(42|43|46|47|49|55|56|58|68|72|76|77|87|90)$ && $INPUT_ADDITIONAL == 'ttyS2' ]] || [[ $G_HW_MODEL == 73 && $INPUT_ADDITIONAL == 'ttyS'[012] ]] || [[ $G_HW_MODEL =~ ^(76|78|79|80|82|85)$ && $INPUT_ADDITIONAL == 'ttyFIQ0' ]]
then
baudrate='1500000'
[[ -d /etc/systemd/system/serial-getty@$INPUT_ADDITIONAL.service.d ]] || G_EXEC mkdir "/etc/systemd/system/serial-getty@$INPUT_ADDITIONAL.service.d"
Expand Down

0 comments on commit b18a71e

Please sign in to comment.