Skip to contentSkip to conversation

configs/friendlyarm_nanopi_neo2_defconfig: new board

PATCH Superseded Scott Fan 1 participant 1 message Nov 2, 2023

v3 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

Scott Fan

author
#0 lore raw

PATCH v3 1/1 configs/friendlyarm_nanopi_neo2_defconfig: new board

Add support for the FriendlyARM NanoPi NEO2 with mainline components:
- U-Boot 2023.10
- Linux 6.1.60

Board's wiki page:
- https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO2

---
Changes v1 -> v2:
- Fix issues from 'utils/docker-run make check-package'
- Add atf custom version in the defconfig
- No need for sudo to run sync

Changes v2 -> v3:
- Update patch file, add the upstream tag

---
 board/friendlyarm/nanopi-neo2/extlinux.conf   |  4 +
 board/friendlyarm/nanopi-neo2/genimage.cfg    | 40 ++++++++++
 board/friendlyarm/nanopi-neo2/post-build.sh   |  8 ++
 board/friendlyarm/nanopi-neo2/readme.txt      | 34 ++++++++
 ...fitImage-source-file-for-NanoPi-NEO2.patch | 77 +++++++++++++++++++
 configs/friendlyarm_nanopi_neo2_defconfig     | 49 ++++++++++++
 6 files changed, 212 insertions(+)
 create mode 100644 board/friendlyarm/nanopi-neo2/extlinux.conf
 create mode 100644 board/friendlyarm/nanopi-neo2/genimage.cfg
 create mode 100755 board/friendlyarm/nanopi-neo2/post-build.sh
 create mode 100644 board/friendlyarm/nanopi-neo2/readme.txt
 create mode 100644 board/friendlyarm/nanopi-neo2/uboot/0001-ARM-Add-default-fitImage-source-file-for-NanoPi-NEO2.patch
 create mode 100644 configs/friendlyarm_nanopi_neo2_defconfig
board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..04aea276a2
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /Image
+  devicetree /sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +40 -0
new file mode 100644
index 0000000000..54465ca7fe
@@ -0,0 +1,40 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"Image",
+			"sun50i-h5-nanopi-neo2.dtb",
+			"extlinux"
+		}
+	}
+
+	size = 64M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition spl {
+		in-partition-table = "no"
+		image = "sunxi-spl.bin"
+		offset = 8K
+	}
+
+	partition u-boot {
+		in-partition-table = "no"
+		image = "u-boot.itb"
+		offset = 40K
+		size = 1M # 1MB - 40KB
+	}
+
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +8 -0
new file mode 100755
index 0000000000..9cb196ac8d
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+# Parse BINARIES_DIR variable from arguments while missing in environment variable
+[ -n "${BINARIES_DIR}" ] || BINARIES_DIR="$1"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${BINARIES_DIR}/extlinux/extlinux.conf"
board/friendlyarm/nanopi-neo2/readme.txt new file +34 -0
new file mode 100644
index 0000000000..c896a57525
@@ -0,0 +1,34 @@
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the NanoPi NEO2. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+Wiki link:
+https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO2
+
+This configuration uses U-Boot mainline and kernel mainline.
+
+How to build
+============
+
+    $ make friendlyarm_nanopi_neo2_defconfig
+    $ make
+
+Note: you will need access to the internet to download the required
+sources.
+
+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
+  $ sync
+
+Insert the micro SDcard in your NanoPi NEO2 and power it up. The console
+is on the serial line, 115200 8N1.
board/friendlyarm/nanopi-neo2/uboot/0001-ARM-Add-default-fitImage-source-file-for-NanoPi-NEO2.patch new file +77 -0

77 lines not on this page · raw message

configs/friendlyarm_nanopi_neo2_defconfig new file +49 -0

49 lines not on this page · raw message

Signature · 6 lines
2.25.1

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