Skip to contentSkip to conversation

configs/friendlyarm_nanopi_r3s_defconfig: new defconfig

PATCH Superseded Sergey Kuzminov 2 participants 2 messages Feb 22, 2025

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 configs/friendlyarm_nanopi_r3s_defconfig: new defconfig

This patch adds basic support for the new FriendlyARM NanoPi R3S board:
- https://www.friendlyelec.com/index.php?route=product/product&product_id=303
- https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R3S

Hardware Spec:
- CPU: Rockchip RK3566, Quad-core Cortex-A55
- RAM: 2GB LPDDR4X
- Ethernet: one Native Gigabit Ethernet, and one PCIe Gigabit Ethernet
- USB3.0 Host: Type-A x1
- Storage: MicroSD Slot x 1, and on-board 32GB eMMC
- Debug Serial Port: 3.3V TTL, 3-pin 2.54mm pitch connector, 1500000 bauds
- LED: LED x 3
- RTC: One low-power RTC, support backup battery input
- Buttons: 1x User button, 1x MASK button for eMMC flashing via USB-C
- Display: 1x MIPI-DSI 30-Pin FPC connector

BSP includes the following components:
- mainline ATF v2.12
- mainline U-Boot v2025.04-rc2
- mainline Linux kernel v6.13.2

---
Changes v1->v2:
- Added firmware for RTL8169
- Improved files: post-build.sh, extlinux.conf, kernel.config
- Bumped Linux Kernel version to 6.13.4

---
 board/friendlyarm/nanopi-r3s/extlinux.conf    |   4 +
 board/friendlyarm/nanopi-r3s/genimage.cfg     |  19 ++
 board/friendlyarm/nanopi-r3s/kernel.config    | 259 ++++++++++++++++++
 .../arm-trusted-firmware.hash                 |   2 +
 .../patches/linux-headers/linux-headers.hash  |   1 +
 .../nanopi-r3s/patches/linux/linux.hash       |   2 +
 .../nanopi-r3s/patches/uboot/uboot.hash       |   2 +
 board/friendlyarm/nanopi-r3s/post-build.sh    |   7 +
 board/friendlyarm/nanopi-r3s/readme.txt       |  39 +++
 .../rootfs_overlay/etc/network/interfaces     |   8 +
 configs/friendlyarm_nanopi_r3s_defconfig      |  43 +++
 11 files changed, 386 insertions(+)
 create mode 100644 board/friendlyarm/nanopi-r3s/extlinux.conf
 create mode 100644 board/friendlyarm/nanopi-r3s/genimage.cfg
 create mode 100644 board/friendlyarm/nanopi-r3s/kernel.config
 create mode 100644 board/friendlyarm/nanopi-r3s/patches/arm-trusted-firmware/arm-trusted-firmware.hash
 create mode 120000 board/friendlyarm/nanopi-r3s/patches/linux-headers/linux-headers.hash
 create mode 100644 board/friendlyarm/nanopi-r3s/patches/linux/linux.hash
 create mode 100644 board/friendlyarm/nanopi-r3s/patches/uboot/uboot.hash
 create mode 100755 board/friendlyarm/nanopi-r3s/post-build.sh
 create mode 100644 board/friendlyarm/nanopi-r3s/readme.txt
 create mode 100644 board/friendlyarm/nanopi-r3s/rootfs_overlay/etc/network/interfaces
 create mode 100644 configs/friendlyarm_nanopi_r3s_defconfig
board/friendlyarm/nanopi-r3s/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..ecddbc420e
@@ -0,0 +1,4 @@
+LABEL default
+  kernel /boot/Image
+  devicetreedir /boot
+  append root=PARTUUID=%PARTUUID% rootwait
board/friendlyarm/nanopi-r3s/genimage.cfg new file +19 -0
new file mode 100644
index 0000000000..f3babe465a
@@ -0,0 +1,19 @@
+image sdcard.img {
+	hdimage {
+		partition-table-type = "gpt"
+		gpt-no-backup = true
+	}
+
+	partition uboot {
+		in-partition-table = false
+		image = "u-boot-rockchip.bin"
+		offset = 32K
+	}
+
+	partition rootfs {
+		offset = 16M
+		image = "rootfs.ext4"
+		partition-uuid = %PARTUUID%
+		bootable = true
+	}
+}
board/friendlyarm/nanopi-r3s/kernel.config new file +259 -0

259 lines not on this page · raw message

board/friendlyarm/nanopi-r3s/patches/arm-trusted-firmware/arm-trusted-firmware.hash new file +2 -0
new file mode 100644
index 0000000000..b5898cba3f
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  06b35a3596b8417bf66f7bfdd7acd181bcb53fc36dc13216227b5cae154e0219  arm-trusted-firmware-v2.12-git4.tar.gz
board/friendlyarm/nanopi-r3s/patches/linux-headers/linux-headers.hash new file +1 -0
new file mode 120000
index 0000000000..5808d92afe
@@ -0,0 +1 @@
+../linux/linux.hash
\ No newline at end of file
board/friendlyarm/nanopi-r3s/patches/linux/linux.hash new file +2 -0
new file mode 100644
index 0000000000..b2e8ee602b
@@ -0,0 +1,2 @@
+# From https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
+sha256  b80e0bc8efbc31e9ce5a84d1084dcccfa40e01bea8cc25afd06648b93d61339e  linux-6.13.4.tar.xz
board/friendlyarm/nanopi-r3s/patches/uboot/uboot.hash new file +2 -0
new file mode 100644
index 0000000000..f9bb6166d1
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  e54102f17328397d5d63b00865e9108d5806d18018509fc24ce6e7e3fe6a12f1  u-boot-2025.04-rc2.tar.bz2
board/friendlyarm/nanopi-r3s/post-build.sh new file +7 -0
new file mode 100755
index 0000000000..6c27574e92
@@ -0,0 +1,7 @@
+#!/bin/sh
+BOARD_DIR="$(dirname "$0")"
+PARTUUID="$("$HOST_DIR"/bin/uuidgen)"
+
+install -d "$TARGET_DIR/boot/extlinux/"
+sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/extlinux.conf" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
+sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
board/friendlyarm/nanopi-r3s/readme.txt new file +39 -0
new file mode 100644
index 0000000000..1b3d54a7fc
@@ -0,0 +1,39 @@
+FriendlyARM NanoPi R3S
+=======================
+https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R3S
+
+How to build
+============
+  $ make friendlyarm_nanopi_r3s_defconfig
+  $ make
+
+Files created in output directory
+=================================
+
+output/images
+.
+├── bl31.elf
+├── genimage.cfg
+├── Image
+├── rk3566_ddr_1056MHz_v1.18.bin
+├── rockchip
+│   └── rk3566-nanopi-r3s.dtb
+├── rootfs.ext2
+├── rootfs.ext4 -> rootfs.ext2
+├── sdcard.img
+├── u-boot.bin
+└── u-boot-rockchip.bin
+
+
+How to write the SD card
+========================
+
+Once the build process is finished you will have an image called "sdcard.img"
+in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an SD card with "dd":
+
+  $ sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M conv=fsync
+
+Insert the micro SDcard in your Nanopi R3S and power it up.
+The console is on the serial line, 1500000 8N1.
board/friendlyarm/nanopi-r3s/rootfs_overlay/etc/network/interfaces new file +8 -0
new file mode 100644
index 0000000000..d49e95de75
@@ -0,0 +1,8 @@
+auto lo
+iface lo inet loopback
+
+auto eth0
+iface eth0 inet dhcp
+
+auto eth1
+iface eth1 inet dhcp
configs/friendlyarm_nanopi_r3s_defconfig new file +43 -0

43 lines not on this page · raw message

Signature · 6 lines
2.45.3

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

Hi Sergey,

Thanks for the patch!

I have few comments, see below.

Quoted 4 lines · Sergey Kuzminov

This patch adds basic support for the new FriendlyARM NanoPi R3S board:
-
https://www.friendlyelec.com/index.php?route=product/product&product_id=303
- https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R3S

[...]

board/friendlyarm/nanopi-r3s/extlinux.conf line 4

Quoted 10 lines
board/friendlyarm/nanopi-r3s/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..ecddbc420e
@@ -0,0 +1,4 @@
+LABEL default
+  kernel /boot/Image
+  devicetreedir /boot
+  append root=PARTUUID=%PARTUUID% rootwait

Since the files board/friendlyarm/nanopi-r3s/extlinux.conf
and
board/friendlyarm/nanopi-r3s/genimage.cfg
are in fact templates that you modify with sed in board/friendlyarm/nanopi-r3s/post-build.sh, could rename those to board/friendlyarm/nanopi-r3s/extlinux.conf.in
and
board/friendlyarm/nanopi-r3s/genimage.cfg.in
please? (and also update the post-build.sh accordingly). This will reduce chances of mistakes (e.g. using the files without processing them).

board/friendlyarm/nanopi-r3s/kernel.config

Quoted 5 lines
board/friendlyarm/nanopi-r3s/kernel.config new file +0 -0
new file mode 100644
index 0000000000..96bbdb110e

In Buildroot, we are now trying to save minimal Kconfig files. You can simplify the kernel.config file with the commands:

make friendlyarm_nanopi_r3s_defconfig
make linux-configure
make linux-update-defconfig

Can you send an updated version of this patch with those changes, please?

Best regards,

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