Skip to contentSkip to conversation

configs/friendlyarm_nanopi_r2s: new defconfig

PATCH Superseded Gilles Talis 2 participants 3 messages Oct 24, 2021 – Jan 15, 2022

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configs/friendlyarm_nanopi_r2s: new defconfig

The NanoPi R2S is a FriendlyElec mini-router based on:

- Rockchip RK3328 SoC
- 1GB (or 2GB) DDR4 RAM
- Gigabit Ethernet (WAN)
- Gigabit Ethernet (USB3) (LAN)
- USB 2.0 Host Port
- MicroSD slot
- Reset button
- WAN - LAN - SYS LED

https://www.friendlyarm.com/index.php?route=product/product&path=69&product_id=282

---
 DEVELOPERS                                 |  2 +
 board/friendlyarm/nanopi-r2s/extlinux.conf |  4 ++
 board/friendlyarm/nanopi-r2s/genimage.cfg  | 39 +++++++++++++++
 board/friendlyarm/nanopi-r2s/post-build.sh |  5 ++
 board/friendlyarm/nanopi-r2s/readme.txt    | 57 ++++++++++++++++++++++
 configs/friendlyarm_nanopi_r2s_defconfig   | 33 +++++++++++++
 6 files changed, 140 insertions(+)
 create mode 100644 board/friendlyarm/nanopi-r2s/extlinux.conf
 create mode 100644 board/friendlyarm/nanopi-r2s/genimage.cfg
 create mode 100755 board/friendlyarm/nanopi-r2s/post-build.sh
 create mode 100644 board/friendlyarm/nanopi-r2s/readme.txt
 create mode 100644 configs/friendlyarm_nanopi_r2s_defconfig
DEVELOPERS +2 -0
index f864f7ef47..bf9b0abd89 100644
@@ -1032,7 +1032,9 @@ F:	configs/qemu_*
 
 N:	Gilles Talis <[email protected]>
 F:	board/freescale/imx8mmevk/
+F:	board/friendlyarm/nanopi-r2s/
 F:	configs/freescale_imx8mmevk_defconfig
+F:	configs/friendlyarm_nanopi_r2s_defconfig
 F:	package/cctz/
 F:	package/faad2/
 F:	package/fdk-aac/
board/friendlyarm/nanopi-r2s/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..8fccf0419b
@@ -0,0 +1,4 @@
+label NanoPi R2S linux
+  kernel /Image
+  devicetree /rk3328-nanopi-r2s.dtb
+  append root=/dev/mmcblk0p4 rw rootwait
board/friendlyarm/nanopi-r2s/genimage.cfg new file +39 -0
new file mode 100644
index 0000000000..4280039ab8
@@ -0,0 +1,39 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"Image",
+			"rk3328-nanopi-r2s.dtb",
+			"extlinux"
+		}
+	}
+	size = 64M
+}
+
+image sdcard.img {
+
+	hdimage {
+		gpt = true
+	}
+
+	partition loader1 {
+		image = "idbloader.img"
+		offset = 32K
+	}
+
+	partition loader2 {
+		image = "u-boot.itb"
+		offset = 8M
+	}
+
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+		offset = 16M
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
board/friendlyarm/nanopi-r2s/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..ba29375c05
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+
+install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
board/friendlyarm/nanopi-r2s/readme.txt new file +57 -0

57 lines not on this page · raw message

configs/friendlyarm_nanopi_r2s_defconfig new file +33 -0
new file mode 100644
index 0000000000..4f5102c9f4
@@ -0,0 +1,33 @@
+BR2_aarch64=y
+BR2_ARM_FPU_VFPV4=y
+BR2_TARGET_GENERIC_HOSTNAME="rk3328-nanopi-r2s"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Nanopi R2S RK3328"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-r2s/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-r2s/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3328-nanopi-r2s"
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="rk3328"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES=""
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi-r2s-rk3328"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="idbloader.img"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
Signature · 6 lines
2.27.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hello Gilles,

Quoted 11 lines · On Sun, 24 Oct 2021 13:39:31 +0200 Gilles Talis <[email protected]> wrote:

The NanoPi R2S is a FriendlyElec mini-router based on:

- Rockchip RK3328 SoC
- 1GB (or 2GB) DDR4 RAM
- Gigabit Ethernet (WAN)
- Gigabit Ethernet (USB3) (LAN)
- USB 2.0 Host Port
- MicroSD slot
- Reset button
- WAN - LAN - SYS LED

Quoted 3 lines

https://www.friendlyarm.com/index.php?route=product/product&path=69&product_id=282

This obviously looks very good, but there is one question: could you drop the VFAT partition, and have the kernel, DTB and extlinux.conf be directly in the ext4 partition, with U-Boot loading them from the ext4 partition directly?

This would simplify things a bit.

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Hello Thomas,

Thanks for the review.

Quoted 19 lines · Thomas Petazzoni

Hello Gilles,

Quoted 13 lines · On Sun, 24 Oct 2021 13:39:31 +0200 Gilles Talis <[email protected]> wrote:

The NanoPi R2S is a FriendlyElec mini-router based on:

- Rockchip RK3328 SoC
- 1GB (or 2GB) DDR4 RAM
- Gigabit Ethernet (WAN)
- Gigabit Ethernet (USB3) (LAN)
- USB 2.0 Host Port
- MicroSD slot
- Reset button
- WAN - LAN - SYS LED

https://www.friendlyarm.com/index.php?route=product/product&path=69&product_id=282

Quoted 8 lines
Quoted 1 line

This obviously looks very good, but there is one question: could you drop the VFAT partition, and have the kernel, DTB and extlinux.conf be directly in the ext4 partition, with U-Boot loading them from the ext4 partition directly?

This would simplify things a bit.

Good suggestion. I will do that and send a v2 shortly.

Quoted 8 lines

Thanks!

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com

Thanks!
Gilles
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot