Skip to content

Commit

Permalink
Add support for NanoPi R3S (#7556)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
EvilOlaf authored Jan 30, 2025
1 parent 940de79 commit 5299971
Show file tree
Hide file tree
Showing 4 changed files with 1,633 additions and 0 deletions.
49 changes: 49 additions & 0 deletions config/boards/nanopi-r3s.csc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Rockchip RK3566 quad core, dual GBe NIC
BOARD_NAME="FriendlyElec NanoPi R3S"
BOARDFAMILY="rk35xx"
BOARD_MAINTAINER=""
BOOTCONFIG="nanopi-r3s-rk3566_defconfig"
KERNEL_TARGET="edge"
#KERNEL_TEST_TARGET="edge"
FULL_DESKTOP="yes"
BOOT_LOGO="desktop"
BOOT_FDT_FILE="rockchip/rk3566-nanopi-r3s.dtb"
IMAGE_PARTITION_TABLE="gpt"
BOOT_SCENARIO="spl-blobs"
BOOTFS_TYPE="fat" # Only for vendor/legacy

function post_family_config_branch_edge__use_mainline_dtb_name() {
unset BOOT_FDT_FILE # boot.scr will use whatever u-boot detects and sets 'fdtfile' to
unset BOOTFS_TYPE # mainline u-boot can boot ext4 directly
}

# Override family config for this board; let's avoid conditionals in family config.
# vendor support not there yet
function post_family_config__nanopi-r3s_use_vendor_uboot() {
BOOTSOURCE='https://github.com/radxa/u-boot.git'
BOOTBRANCH='branch:rk35xx-2024.01'
BOOTPATCHDIR="u-boot-radxa-latest"

UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB ROCKCHIP_TPL=$RKBIN_DIR/$DDR_BLOB;;u-boot-rockchip.bin"

unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd

function write_uboot_platform() {
dd if=$1/u-boot-rockchip.bin of=$2 seek=64 conv=notrunc status=none
}
}

function post_family_config_branch_edge__nanopi-r3s_use_mainline_uboot() {
BOOTCONFIG="nanopi-r3s-rk3566_defconfig"
BOOTSOURCE="https://github.com/u-boot/u-boot"
BOOTBRANCH="tag:v2024.10"
BOOTPATCHDIR="v2024.10"

UBOOT_TARGET_MAP="BL31=$RKBIN_DIR/$BL31_BLOB ROCKCHIP_TPL=$RKBIN_DIR/$DDR_BLOB;;u-boot-rockchip.bin"

unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd

function write_uboot_platform() {
dd if=$1/u-boot-rockchip.bin of=$2 seek=64 conv=notrunc status=none
}
}
Loading

0 comments on commit 5299971

Please sign in to comment.