Skip to content

Commit

Permalink
v8.25
Browse files Browse the repository at this point in the history
- Orange Pi 3B | Add support
  • Loading branch information
MichaIng committed Dec 17, 2023
1 parent 4537ccb commit 6336fc6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ case $HW_MODEL in
84) iname='Star64' HW_ARCH=11 root_size=639;;
85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=752;;
86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=752;;
87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=752;;
*) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;;
esac

Expand Down
9 changes: 6 additions & 3 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ _EOF_
'77' ': ROCK 3A'
'78' ': ROCK 5B'
'85' ': ROCK 5A'
'87' ': Orange Pi 3B'
'80' ': Orange Pi 5'
'82' ': Orange Pi 5 Plus'
'83' ': Orange Pi Zero 3'
Expand Down Expand Up @@ -586,7 +587,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|77|78|80|82|83|85|86)$ ]]
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|77|78|80|82|83|85|86|87)$ ]]
then
armbian_repo=1
G_EXEC mv "DietPi-$G_GITBRANCH/.build/images/U-Boot/boot.cmd" /boot/boot.cmd
Expand Down Expand Up @@ -627,7 +628,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|77|78|80|82|85|86)$ ]]
elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|77|78|80|82|85|86|87)$ ]]
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 All @@ -645,6 +646,7 @@ setenv rootuuid "true"' /boot/boot.cmd
77) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3568-rock-3a.dtb' /boot/dietpiEnv.txt;;
78) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588-rock-5b.dtb' /boot/dietpiEnv.txt;;
85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;;
87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;;
*) :;;
esac
case $G_HW_MODEL in
Expand Down Expand Up @@ -1071,6 +1073,7 @@ _EOF_
82) model='orangepi5-plus' kernel='rk35xx' branch='legacy';;
85) model='rock-5a' kernel='rk35xx' branch='legacy';;
86) model='tinkerboard-2' kernel='rockchip64';;
87) model='orangepi3b' kernel='rockchip64'; branch='edge';;
*) :;;
esac
# Download and pre-install U-Boot hosted on dietpi.com where it has not been ported to the Armbian Bookworm repo or has been removed completely
Expand Down Expand Up @@ -1960,7 +1963,7 @@ _EOF_'
/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, ROCK 3A, ASUS Tinker Board 2
elif [[ $G_HW_MODEL =~ ^(42|43|46|47|49|52|55|56|58|68|72|77|86)$ ]]
elif [[ $G_HW_MODEL =~ ^(42|43|46|47|49|52|55|56|58|68|72|77|86|87)$ ]]
then
/boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS2

Expand Down
1 change: 1 addition & 0 deletions .meta/dietpi-survey_report
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ shopt -s extglob
[84]='Star64'
[85]='ROCK 5A'
[86]='ASUS Tinker Board 2'
[87]='Orange Pi 3B'
)

## Benchmark data arrays: aBENCH_XX[$HW_MODEL,${aBENCH_XX_INDEX[$HW_MODEL]}]
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ v8.25
(2023-12-16)

New images:
- Star64
- Orange Pi 3B
- Star64 | Support for the RISC-V StarFive VisionFive 2 clone from PINE64 has been added to DietPi. The images are highly experimental, like software support for the architecture in general. Find our images here, before they are added to our download page soon: https://dietpi.com/downloads/binaries/testing/
- Orange Pi 3B | Support for this RK3566 SBC has been added to DietPi. Find our images here, before they are added to our download page soon: https://dietpi.com/downloads/binaries/testing/

Enhancements:
- Raspberry Pi | We applied preparations for supporting the new official Raspberry Pi firmware and kernel packages, which implies support for Raspberry Pi 5. A script allows to the migration to the new package set, including the switch for the boot mountpoint from /boot to /boot/firmware. Please see the following topic about how to apply the script. Note that it is in beta stage for now, since the change might cause issues among our scripts which we did not detect yet: https://github.com/MichaIng/DietPi/issues/6676
Expand Down
8 changes: 7 additions & 1 deletion dietpi/func/dietpi-obtain_hw_model
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# - Generates /boot/dietpi/.hw_model
# - Called from /boot/dietpi/preboot, called by /etc/systemd/system/dietpi-preboot.service
#
# G_HW_MODEL 87 Orange Pi 3B
# G_HW_MODEL 86 ASUS Tinker Board 2
# G_HW_MODEL 85 ROCK 5A
# G_HW_MODEL 84 Star64
Expand Down Expand Up @@ -316,7 +317,12 @@

G_HW_MODEL=$(mawk 'NR==1' "$FP_G_HW_MODEL_IDENTIFIER")

if (( $G_HW_MODEL == 86 )); then
if (( $G_HW_MODEL == 87 )); then

G_HW_MODEL_NAME='Orange Pi 3B'
G_HW_CPUID=9

elif (( $G_HW_MODEL == 86 )); then

G_HW_MODEL_NAME='ASUS Tinker Board 2'
G_HW_CPUID=3
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 @@ -1567,7 +1567,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|77)$ && $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|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' ]]
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 6336fc6

Please sign in to comment.