Skip to content

Commit 5299971

Browse files
authored
Add support for NanoPi R3S (#7556)
* add nanopi-r3s.csc board config * Nanopi R3S - add uboot patch * Nanopi R3S - add dts * fix bogus patch header * Migrate to new patch series Source & credits https://patchwork.ozlabs.org/project/uboot/list/?series=438193 I still need to figure out how to convert a patch series from patchwork in a way so the build framework doesn't complain about headers and magic and whatever. So a few hundreds of header lines have been replaced with something generic. Applies and builds fine now against current stable v2024.10 * Create board-nanopi-r3s-fix-leds.patch Thx #7556 (comment) * Rename board-nanopi-r3s-fix-leds.patch to xx-board-nanopi-r3s-fix-leds.patch * add new patch
1 parent 940de79 commit 5299971

File tree

4 files changed

+1633
-0
lines changed

4 files changed

+1633
-0
lines changed

config/boards/nanopi-r3s.csc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Rockchip RK3566 quad core, dual GBe NIC
2+
BOARD_NAME="FriendlyElec NanoPi R3S"
3+
BOARDFAMILY="rk35xx"
4+
BOARD_MAINTAINER=""
5+
BOOTCONFIG="nanopi-r3s-rk3566_defconfig"
6+
KERNEL_TARGET="edge"
7+
#KERNEL_TEST_TARGET="edge"
8+
FULL_DESKTOP="yes"
9+
BOOT_LOGO="desktop"
10+
BOOT_FDT_FILE="rockchip/rk3566-nanopi-r3s.dtb"
11+
IMAGE_PARTITION_TABLE="gpt"
12+
BOOT_SCENARIO="spl-blobs"
13+
BOOTFS_TYPE="fat" # Only for vendor/legacy
14+
15+
function post_family_config_branch_edge__use_mainline_dtb_name() {
16+
unset BOOT_FDT_FILE # boot.scr will use whatever u-boot detects and sets 'fdtfile' to
17+
unset BOOTFS_TYPE # mainline u-boot can boot ext4 directly
18+
}
19+
20+
# Override family config for this board; let's avoid conditionals in family config.
21+
# vendor support not there yet
22+
function post_family_config__nanopi-r3s_use_vendor_uboot() {
23+
BOOTSOURCE='https://github.com/radxa/u-boot.git'
24+
BOOTBRANCH='branch:rk35xx-2024.01'
25+
BOOTPATCHDIR="u-boot-radxa-latest"
26+
27+
UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB ROCKCHIP_TPL=$RKBIN_DIR/$DDR_BLOB;;u-boot-rockchip.bin"
28+
29+
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd
30+
31+
function write_uboot_platform() {
32+
dd if=$1/u-boot-rockchip.bin of=$2 seek=64 conv=notrunc status=none
33+
}
34+
}
35+
36+
function post_family_config_branch_edge__nanopi-r3s_use_mainline_uboot() {
37+
BOOTCONFIG="nanopi-r3s-rk3566_defconfig"
38+
BOOTSOURCE="https://github.com/u-boot/u-boot"
39+
BOOTBRANCH="tag:v2024.10"
40+
BOOTPATCHDIR="v2024.10"
41+
42+
UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB ROCKCHIP_TPL=$RKBIN_DIR/$DDR_BLOB;;u-boot-rockchip.bin"
43+
44+
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd
45+
46+
function write_uboot_platform() {
47+
dd if=$1/u-boot-rockchip.bin of=$2 seek=64 conv=notrunc status=none
48+
}
49+
}

0 commit comments

Comments
 (0)