Skip to content

Commit 5b48df9

Browse files
committed
Add support for rock-4d(rk3576)
1 parent 4368ab6 commit 5b48df9

File tree

13 files changed

+110
-0
lines changed

13 files changed

+110
-0
lines changed

.github/workflows/build-armbian-homeassistant-image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ on:
7777
- r68s
7878
- renegade-rk3328
7979
- rk3318-box
80+
- rock-4d
8081
- rock5b
8182
- rock5c
8283
- ruisen-box

.github/workflows/build-armbian-server-image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ on:
7777
- r68s
7878
- renegade-rk3328
7979
- rk3318-box
80+
- rock-4d
8081
- rock5b
8182
- rock5c
8283
- ruisen-box

.github/workflows/build-armbian-using-official-image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ on:
6969
- r68s
7070
- renegade-rk3328
7171
- rk3318-box
72+
- rock-4d
7273
- rock5b
7374
- rock5c
7475
- ruisen-box

.github/workflows/build-armbian-using-releases-files.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ on:
7777
- r68s
7878
- renegade-rk3328
7979
- rk3318-box
80+
- rock-4d
8081
- rock5b
8182
- rock5c
8283
- ruisen-box

README.cn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Armbian(中文名:岸边)系统是基于 Debian/Ubuntu 而构建的专门
2727
| s905lb | [Q96-mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/734), [BesTV-R3300L](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993), [SumaVision-Q7](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1190), [MG101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1570), [s65](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2128), [IPBS9505](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993#issuecomment-2276804591) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905lb.img |
2828
| s905 | [Beelink-Mini-MX-2G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/127), [Sunvell-T95M](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/337), [MXQ-Pro+4K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/715), [SumaVision-Q5](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1175) | [全部](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905.img |
2929
| rk3588(s) | [Radxa-Rock5B](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1240), [Radxa-Rock5C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2324), [Orange-Pi-5-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2400), [Beelink-IPC-R](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/415), [HLink-H88K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H88K-V3](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [NanoPC-T6](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2453), [Smart-Am60](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2817), [DC-A588](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2988), [Orangepi-5B](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3052) | [rk3588](https://github.com/ophub/kernel/releases/tag/kernel_rk3588) | rockchip_boxname.img |
30+
| rk3576 | [Rock-4d](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3200) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) | rockchip_boxname.img |
3031
| rk3568 | [FastRhino-R66S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1061), [FastRhino-R68S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/774), [Radxa-E25](https://wiki.radxa.com/Rock3/CM/CM3I/E25), [NanoPi-R5S](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [NanoPi-R5C](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [HLink-H66K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H68K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H69K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [Seewo-sv21](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2017), [Mrkaio-m68s](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2155), [Swan1-w28](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2407), [Ruisen-box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2508), [DG-TN3568](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2661), [Alark35-3500](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2911), [MMBox-Anas3035](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2995), [Wocyber-A3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2978), [Photonicat](https://github.com/ophub/amlogic-s9xxx-openwrt/pull/827) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[6.x.y](https://github.com/ophub/kernel/releases/tag/kernel_stable) | rockchip_boxname.img |
3132
| rk3566 | [Panther-X2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1319), [JP-TvBox](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1867), [LCKFB-Taishan-Pi](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2538), [WXY-OEC-turbo-4g](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2736), [Station-M2](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/744) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[6.x.y](https://github.com/ophub/kernel/releases/tag/kernel_stable) | rockchip_boxname.img |
3233
| rk3528 | [HLink-H28K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1726), [Radxa-E20C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2324), [H96-Max-M2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2404) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) | rockchip_boxname.img |

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ This project relies on many [contributors](CONTRIBUTORS.md) to build the Armbian
2727
| s905lb | [Q96-mini](https://github.com/ophub/amlogic-s9xxx-armbian/issues/734), [BesTV-R3300L](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993), [SumaVision-Q7](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1190), [MG101](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1570), [s65](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2128), [IPBS9505](https://github.com/ophub/amlogic-s9xxx-armbian/pull/993#issuecomment-2276804591) | [All](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905lb.img |
2828
| s905 | [Beelink-Mini-MX-2G](https://github.com/ophub/amlogic-s9xxx-armbian/issues/127), [Sunvell-T95M](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/337), [MXQ-Pro+4K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/715), [SumaVision-Q5](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1175) | [All](https://github.com/ophub/kernel/releases/tag/kernel_stable) | amlogic_s905.img |
2929
| rk3588(s) | [Radxa-Rock5B](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1240), [Radxa-Rock5C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2324), [Orange-Pi-5-Plus](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2400), [Beelink-IPC-R](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/415), [HLink-H88K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H88K-V3](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [NanoPC-T6](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2453), [Smart-Am60](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2817), [DC-A588](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2988), [Orangepi-5B](https://github.com/ophub/amlogic-s9xxx-armbian/pull/3052) | [rk3588](https://github.com/ophub/kernel/releases/tag/kernel_rk3588) | rockchip_boxname.img |
30+
| rk3576 | [Rock-4d](https://github.com/ophub/amlogic-s9xxx-armbian/issues/3200) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) | rockchip_boxname.img |
3031
| rk3568 | [FastRhino-R66S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1061), [FastRhino-R68S](https://github.com/ophub/amlogic-s9xxx-armbian/issues/774), [Radxa-E25](https://wiki.radxa.com/Rock3/CM/CM3I/E25), [NanoPi-R5S](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [NanoPi-R5C](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1217), [HLink-H66K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H68K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [HLink-H69K](https://github.com/ophub/amlogic-s9xxx-armbian/pull/1726), [Seewo-sv21](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2017), [Mrkaio-m68s](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2155), [Swan1-w28](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2407), [Ruisen-box](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2508), [DG-TN3568](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2661), [Alark35-3500](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2911), [MMBox-Anas3035](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2995), [Wocyber-A3](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2978), [Photonicat](https://github.com/ophub/amlogic-s9xxx-openwrt/pull/827) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[6.x.y](https://github.com/ophub/kernel/releases/tag/kernel_stable) | rockchip_boxname.img |
3132
| rk3566 | [Panther-X2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1319), [JP-TvBox](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1867), [LCKFB-Taishan-Pi](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2538), [WXY-OEC-turbo-4g](https://github.com/ophub/amlogic-s9xxx-armbian/pull/2736), [Station-M2](https://github.com/ophub/amlogic-s9xxx-openwrt/issues/744) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx)<br />[6.x.y](https://github.com/ophub/kernel/releases/tag/kernel_stable) | rockchip_boxname.img |
3233
| rk3528 | [HLink-H28K](https://github.com/ophub/amlogic-s9xxx-armbian/issues/1726), [Radxa-E20C](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2324), [H96-Max-M2](https://github.com/ophub/amlogic-s9xxx-armbian/issues/2404) | [rk35xx](https://github.com/ophub/kernel/releases/tag/kernel_rk35xx) | rockchip_boxname.img |

build-armbian/armbian-files/common-files/etc/model_database.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,13 @@ r702 :Radxa-E20C :rk3528 :rk3528-radxa-e
332332
r703 :H96-Max-M2 :rk3528 :rk3528-mangopi-m28k.dtb :NA :u-boot.itb :idbloader.img :4GB-LPDDR4,64G-eMMC,USB,1Gb-Nic :rk35xx/6.1.y :rockchip :rk3528 :armbianEnv.txt :d5stick :h96-max-m2 :yes
333333

334334

335+
# Rockchip RK3576 Family
336+
#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------
337+
# 1.ID 2.MODEL 3.SOC 4.FDTFILE 5.TRUST_IMG 6.MAINLINE_UBOOT 7.BOOTLOADER_IMG 8.DESCRIPTION 9.KERNEL_TAGS 10.PLATFORM 11.FAMILY 12.BOOT_CONF 13.CONTRIBUTORS 14.BOARD 15.BUILD
338+
#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------
339+
r801 :Rock-4d :rk3576 :rk3576-rock-4d-spi.dtb :NA :u-boot.itb :idbloader.img :2GB/4GB/8GB/16GB-Mem,eMMC/NVMe/TF,1Gb-Nic :rk35xx/6.1.y :rockchip :rk3576 :armbianEnv.txt :hunter24099 :rock-4d :yes
340+
341+
335342
# Allwinner h6 Family
336343
#-------+----------------------------------------------+---------+-----------------------------------------+-----------------------------+------------------------------------+--------------------------------+-------------------------------------------+----------------------+------------+-------------+----------------+-----------------------------------------------------+--------------------+----------
337344
# 1.ID 2.MODEL 3.SOC 4.FDTFILE 5.UNUSED 6.MAINLINE_UBOOT 7.BOOTLOADER_IMG 8.DESCRIPTION 9.KERNEL_TAGS 10.PLATFORM 11.FAMILY 12.BOOT_CONF 13.CONTRIBUTORS 14.BOARD 15.BUILD
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
verbosity=1
2+
bootlogo=false
3+
console=both
4+
overlay_prefix=rk35xx
5+
fdtfile=rockchip/rk3576-rock-4d-spi.dtb
6+
rootdev=/dev/mmcblk0p2
7+
rootfstype=ext4
8+
rootflags=rw,errors=remount-ro
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# DO NOT EDIT THIS FILE
2+
#
3+
# Please edit /boot/armbianEnv.txt to set supported parameters
4+
#
5+
6+
setenv load_addr "0x48000000"
7+
setenv overlay_error "false"
8+
# default values
9+
setenv rootdev "/dev/mmcblk0p1"
10+
setenv verbosity "1"
11+
setenv console "both"
12+
setenv bootlogo "false"
13+
setenv rootfstype "ext4"
14+
setenv docker_optimizations "on"
15+
setenv earlycon "off"
16+
17+
test -n "${distro_bootpart}" || distro_bootpart=1
18+
19+
echo "Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}"
20+
21+
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then
22+
load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}armbianEnv.txt
23+
env import -t ${load_addr} ${filesize}
24+
fi
25+
26+
if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi
27+
28+
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
29+
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS2,1500000 ${consoleargs}"; fi
30+
if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi
31+
if test "${bootlogo}" = "true"; then
32+
setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}"
33+
else
34+
setenv consoleargs "splash=verbose ${consoleargs}"
35+
fi
36+
37+
# get PARTUUID of first partition on SD/eMMC the boot script was loaded from
38+
if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:${distro_bootpart} partuuid; fi
39+
40+
setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}"
41+
42+
if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory"; fi
43+
44+
load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd
45+
load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image
46+
47+
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
48+
fdt addr ${fdt_addr_r}
49+
fdt resize 65536
50+
for overlay_file in ${overlays}; do
51+
if load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
52+
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
53+
fdt apply ${load_addr} || setenv overlay_error "true"
54+
elif load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_file}.dtbo; then
55+
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
56+
fdt apply ${load_addr} || setenv overlay_error "true"
57+
fi
58+
done
59+
for overlay_file in ${user_overlays}; do
60+
if load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
61+
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
62+
fdt apply ${load_addr} || setenv overlay_error "true"
63+
fi
64+
done
65+
if test "${overlay_error}" = "true"; then
66+
echo "Error applying DT overlays, restoring original DT"
67+
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
68+
else
69+
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then
70+
load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr
71+
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
72+
source ${load_addr}
73+
fi
74+
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then
75+
load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}fixup.scr
76+
echo "Applying user provided fixup script (fixup.scr)"
77+
source ${load_addr}
78+
fi
79+
fi
80+
81+
echo "Trying 'kaslrseed' command... Info: 'Unknown command' can be safely ignored since 'kaslrseed' does not apply to all boards."
82+
kaslrseed # @TODO: This gives an error (Unknown command ' kaslrseed ' - try 'help') on many devices since CONFIG_CMD_KASLRSEED is not enabled
83+
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
84+
85+
# Recompile with:
86+
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
Binary file not shown.

0 commit comments

Comments
 (0)