Skip to contentSkip to conversation

configs/friendlyarm_nanopi_neo2_defconfig: new board

PATCH Superseded Scott Fan 2 participants 15 messages Nov 4, 2023 – Feb 25, 2024

lore
Share & tools
lore

Scott Fan

author
#0 lore raw

PATCH v4 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.61

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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

---
 board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
 board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 +++++++
 board/friendlyarm/nanopi-neo2/post-build.sh |  5 +++
 board/friendlyarm/nanopi-neo2/readme.txt    | 34 +++++++++++++++
 configs/friendlyarm_nanopi_neo2_defconfig   | 48 +++++++++++++++++++++
 5 files changed, 107 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 configs/friendlyarm_nanopi_neo2_defconfig
board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		offset = 1M
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +48 -0

48 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
author
#1 lore raw

PATCH 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.65

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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

---
 board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
 board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 +++++++
 board/friendlyarm/nanopi-neo2/post-build.sh |  5 +++
 board/friendlyarm/nanopi-neo2/readme.txt    | 34 +++++++++++++++
 configs/friendlyarm_nanopi_neo2_defconfig   | 48 +++++++++++++++++++++
 5 files changed, 107 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 configs/friendlyarm_nanopi_neo2_defconfig
board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		offset = 1M
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +48 -0

48 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
author
#2 lore raw

PATCH v5 1/1 configs/friendlyarm_nanopi_neo2_defconfig: new board

In reply to Scott Fan

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

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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

---
 board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
 board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 +++++++
 board/friendlyarm/nanopi-neo2/post-build.sh |  5 +++
 board/friendlyarm/nanopi-neo2/readme.txt    | 34 +++++++++++++++
 configs/friendlyarm_nanopi_neo2_defconfig   | 48 +++++++++++++++++++++
 5 files changed, 107 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 configs/friendlyarm_nanopi_neo2_defconfig
board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		offset = 1M
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +48 -0

48 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
Reviewed-by Tested-by on v5 1/1
#3 lore raw

Hi Scott,

Quoted 167 lines · Scott Fan

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

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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

---
  board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
  board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 +++++++
  board/friendlyarm/nanopi-neo2/post-build.sh |  5 +++
  board/friendlyarm/nanopi-neo2/readme.txt    | 34 +++++++++++++++
  configs/friendlyarm_nanopi_neo2_defconfig   | 48 +++++++++++++++++++++
  5 files changed, 107 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 configs/friendlyarm_nanopi_neo2_defconfig

board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		offset = 1M
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +38 -0
new file mode 100644
index 0000000000..a955ec323a
@@ -0,0 +1,48 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 6.1 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_a64"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.10"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo2"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.65"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-nanopi-neo2"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# Filesystem

configs/friendlyarm_nanopi_neo2_defconfig line 48

Quoted 10 lines
configs/friendlyarm_nanopi_neo2_defconfig new file +10 -0
+BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM NanoPi NEO2"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo2/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo2/genimage.cfg"

It looks good to me except you miss:
BR2_TARGET_UBOOT_NEEDS_OPENSSL=y

So adding that line:

[Only build-tested using docker-run]

Please use buildroot/utils/docker-run to check defconfigs and packages so we're sure that all host dependencies are met.

Best regards

Signature · 6 lines
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author
#4 lore raw

PATCH v6 1/1 configs/friendlyarm_nanopi_neo2_defconfig: new board

In reply to Scott Fan

Add support for the FriendlyARM NanoPi NEO2 with mainline components:
- U-Boot 2024.01
- Linux 6.6.17

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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

Changes v5 -> v6:
- Bump kernel version to 6.6.17
- Bump uboot version to 2024.01
- Add option BR2_TARGET_UBOOT_NEEDS_OPENSSL=y

---
 board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
 board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 +++++++
 board/friendlyarm/nanopi-neo2/post-build.sh |  5 +++
 board/friendlyarm/nanopi-neo2/readme.txt    | 34 ++++++++++++++
 configs/friendlyarm_nanopi_neo2_defconfig   | 49 +++++++++++++++++++++
 5 files changed, 108 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 configs/friendlyarm_nanopi_neo2_defconfig
board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		offset = 1M
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +49 -0

49 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by Tested-by on v6 1/1
#5 lore raw

Hi Scott,

Quoted 10 lines

Il giorno 22 feb 2024, alle ore 11:47, Scott Fan <[email protected]> ha scritto:

Add support for the FriendlyARM NanoPi NEO2 with mainline components:
- U-Boot 2024.01
- Linux 6.6.17

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

[Only build-tested using docker-run]

see below,

Quoted 19 lines

---
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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

Quoted 6 lines

Changes v5 -> v6:
- Bump kernel version to 6.6.17
- Bump uboot version to 2024.01
- Add option BR2_TARGET_UBOOT_NEEDS_OPENSSL=y

No need your SoB here since it won’t be part of commit log.

Best regards
Giulio

Quoted 152 lines

---

board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 +++++++
board/friendlyarm/nanopi-neo2/post-build.sh |  5 +++
board/friendlyarm/nanopi-neo2/readme.txt    | 34 ++++++++++++++
configs/friendlyarm_nanopi_neo2_defconfig   | 49 +++++++++++++++++++++
5 files changed, 108 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 configs/friendlyarm_nanopi_neo2_defconfig

board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+    hdimage {
+    }
+
+    partition u-boot-tpl-spl-dtb {
+        in-partition-table = "no"
+        image = "u-boot-sunxi-with-spl.bin"
+        offset = 8K
+    }
+
+    partition rootfs {
+        partition-type = 0x83
+        image = "rootfs.ext4"
+        offset = 1M
+    }
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +49 -1
new file mode 100644
index 0000000000..a60aba06d9
@@ -0,0 +1,49 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 6.6 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_a64"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo2"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.17"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-nanopi-neo2"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM NanoPi NEO2"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo2/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo2/genimage.cfg"
--
Quoted 2 lines

2.34.1

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

author
#6 lore raw

PATCH v6 1/1 configs/friendlyarm_nanopi_neo2_defconfig: new board

In reply to Scott Fan

Add support for the FriendlyARM NanoPi NEO2 with mainline components:
- U-Boot 2024.01
- Linux 6.6.17

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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

Changes v5 -> v6:
- Bump kernel version to 6.6.17
- Bump uboot version to 2024.01
- Add option BR2_TARGET_UBOOT_NEEDS_OPENSSL=y

---
 board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
 board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 +++++++
 board/friendlyarm/nanopi-neo2/post-build.sh |  5 +++
 board/friendlyarm/nanopi-neo2/readme.txt    | 34 ++++++++++++++
 configs/friendlyarm_nanopi_neo2_defconfig   | 49 +++++++++++++++++++++
 5 files changed, 108 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 configs/friendlyarm_nanopi_neo2_defconfig
board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		offset = 1M
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +49 -0

49 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by Tested-by on v6 1/1
#7 lore raw

Hi Scott,

no need to resend, and...

Quoted 8 lines · Scott Fan

Add support for the FriendlyARM NanoPi NEO2 with mainline components:
- U-Boot 2024.01
- Linux 6.6.17

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

... if you resend please keep my:

[Only build-tested using docker-run]

Best regards

Signature · 2 lines
Giulio Benetti
CEO&CTO@Benetti Engineering sas
Quoted 164 lines

---
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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

Changes v5 -> v6:
- Bump kernel version to 6.6.17
- Bump uboot version to 2024.01
- Add option BR2_TARGET_UBOOT_NEEDS_OPENSSL=y

---
  board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
  board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 +++++++
  board/friendlyarm/nanopi-neo2/post-build.sh |  5 +++
  board/friendlyarm/nanopi-neo2/readme.txt    | 34 ++++++++++++++
  configs/friendlyarm_nanopi_neo2_defconfig   | 49 +++++++++++++++++++++
  5 files changed, 108 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 configs/friendlyarm_nanopi_neo2_defconfig

board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		offset = 1M
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +39 -0
new file mode 100644
index 0000000000..a60aba06d9
@@ -0,0 +1,49 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 6.6 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_a64"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo2"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.17"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-nanopi-neo2"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# Filesystem

configs/friendlyarm_nanopi_neo2_defconfig line 49

Quoted 10 lines
configs/friendlyarm_nanopi_neo2_defconfig new file +10 -0
+BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM NanoPi NEO2"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo2/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo2/genimage.cfg"

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

author
#8 lore raw

Hi Giulio,

I removed the unnecessary line, then resend the patch. Thanks for your reminder.

Scott Fan

Quoted 190 lines · Giulio Benetti

Hi Scott,

no need to resend, and...

Quoted 8 lines · Scott Fan

Add support for the FriendlyARM NanoPi NEO2 with mainline components:
- U-Boot 2024.01
- Linux 6.6.17

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

... if you resend please keep my:

[Only build-tested using docker-run]

Best regards
--
Giulio Benetti
CEO&CTO@Benetti Engineering sas

Quoted 166 lines

---
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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

Changes v5 -> v6:
- Bump kernel version to 6.6.17
- Bump uboot version to 2024.01
- Add option BR2_TARGET_UBOOT_NEEDS_OPENSSL=y

---
  board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
  board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 +++++++
  board/friendlyarm/nanopi-neo2/post-build.sh |  5 +++
  board/friendlyarm/nanopi-neo2/readme.txt    | 34 ++++++++++++++
  configs/friendlyarm_nanopi_neo2_defconfig   | 49 +++++++++++++++++++++
  5 files changed, 108 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 configs/friendlyarm_nanopi_neo2_defconfig

board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+     hdimage {
+     }
+
+     partition u-boot-tpl-spl-dtb {
+             in-partition-table = "no"
+             image = "u-boot-sunxi-with-spl.bin"
+             offset = 8K
+     }
+
+     partition rootfs {
+             partition-type = 0x83
+             image = "rootfs.ext4"
+             offset = 1M
+     }
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +41 -0
new file mode 100644
index 0000000000..a60aba06d9
@@ -0,0 +1,49 @@
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 6.6 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_a64"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo2"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.17"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-nanopi-neo2"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# Filesystem
+BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM NanoPi NEO2"
+BR2_TARGET_ROOTFS_EXT2=y
Quoted 9 lines

configs/friendlyarm_nanopi_neo2_defconfig line 49

Quoted 8 lines
configs/friendlyarm_nanopi_neo2_defconfig new file +8 -0
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo2/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo2/genimage.cfg"

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

author
#9 lore raw

PATCH v7 1/1 configs/friendlyarm_nanopi_neo2_defconfig: new board

In reply to Scott Fan

Add support for the FriendlyARM NanoPi NEO2 with mainline components:
- U-Boot 2024.01
- Linux 6.6.18

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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

Changes v5 -> v6:
- Bump kernel version to 6.6.17
- Bump uboot version to 2024.01
- Add option BR2_TARGET_UBOOT_NEEDS_OPENSSL=y

Changes v6 -> v7:
- Bump kernel version to 6.6.18
- Add option BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
- Resort sections in the defconfig

---
 board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
 board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 ++++++
 board/friendlyarm/nanopi-neo2/post-build.sh |  5 ++
 board/friendlyarm/nanopi-neo2/readme.txt    | 34 ++++++++++++
 configs/friendlyarm_nanopi_neo2_defconfig   | 57 +++++++++++++++++++++
 5 files changed, 116 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 configs/friendlyarm_nanopi_neo2_defconfig
board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		offset = 1M
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +57 -0

57 lines not on this page · raw message

Signature · 6 lines
2.34.1

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

Hi Scott,

On 23/02/24 14:15, Scott Fan wrote:

[ SNIP ]

configs/friendlyarm_nanopi_neo2_defconfig line 11

Quoted 4 lines
configs/friendlyarm_nanopi_neo2_defconfig new file +4 -0
+
+# System
+BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM NanoPi NEO2"
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y

What do you need MDEV by default for? Is there some peripheral that needs to show up automatically otherwise the basic functionality is compromised?

Best regards

Signature · 6 lines
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author
#11 lore raw

Hi Giulio,

The BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is for the ethernet port on the board.
Without the config, the eth0 interface will be not accessible. The ifconfig eth0 command will report error: Device not found

Scott Fan

Quoted 16 lines · Giulio Benetti

Hi Scott,

On 23/02/24 14:15, Scott Fan wrote:

[ SNIP ]

configs/friendlyarm_nanopi_neo2_defconfig line 11

Quoted 4 lines
configs/friendlyarm_nanopi_neo2_defconfig new file +4 -0
+
+# System
+BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM NanoPi NEO2"
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y

What do you need MDEV by default for? Is there some peripheral that needs to show up automatically otherwise the basic functionality is compromised?

Quoted 4 lines

Best regards
--
Giulio Benetti
CEO&CTO@Benetti Engineering sas

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

#12 lore raw

Hi Scott,

Quoted 6 lines · Scott Fan

Hi Giulio,

The BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is for the ethernet port on the board.
Without the config, the eth0 interface will be not accessible. The ifconfig eth0 command will report error: Device not found

Ok, sounds good. So can you please report it in the commit log and..

Quoted 8 lines

Scott Fan

Quoted 3 lines · Giulio Benetti

Hi Scott,

Quoted 7 lines
Quoted 7 lines · Scott Fan

[ SNIP ]

configs/friendlyarm_nanopi_neo2_defconfig line 10

Quoted 3 lines
configs/friendlyarm_nanopi_neo2_defconfig new file +3 -0
+
+# System
+BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM NanoPi NEO2"

...in a comment here?

Quoted 5 lines
Quoted 5 lines
Quoted 1 line

+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y

What do you need MDEV by default for? Is there some peripheral that needs to show up automatically otherwise the basic functionality is compromised?

Thank you!

Best regards

Signature · 6 lines
Giulio Benetti
CEO&CTO@Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
author
#13 lore raw

PATCH v8 1/1 configs/friendlyarm_nanopi_neo2_defconfig: new board

In reply to Scott Fan

Add support for the FriendlyARM NanoPi NEO2 with mainline components:
- ATF v2.7
- U-Boot 2024.01
- Linux 6.6.18

BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV allows the ethernet driver to be automatically loaded on boot. Otherwise, it will report the 'device not found' error while run the 'ifconfig eth0' command.

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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

Changes v5 -> v6:
- Bump kernel version to 6.6.17
- Bump uboot version to 2024.01
- Add option BR2_TARGET_UBOOT_NEEDS_OPENSSL=y

Changes v6 -> v7:
- Bump kernel version to 6.6.18
- Add option BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
- Resort sections in the defconfig

Changes v7 -> v8:
- Update commit log to add ATF version
- Update commit log to add explanation for the MDEV config

---
 board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
 board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 ++++++
 board/friendlyarm/nanopi-neo2/post-build.sh |  5 ++
 board/friendlyarm/nanopi-neo2/readme.txt    | 34 ++++++++++++
 configs/friendlyarm_nanopi_neo2_defconfig   | 57 +++++++++++++++++++++
 5 files changed, 116 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 configs/friendlyarm_nanopi_neo2_defconfig
board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		offset = 1M
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +57 -0

57 lines not on this page · raw message

Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by on v8 1/1
#14 lore raw

Hi Scott,

Quoted 5 lines · Scott Fan

Add support for the FriendlyARM NanoPi NEO2 with mainline components:
- ATF v2.7
- U-Boot 2024.01
- Linux 6.6.18

Quoted 8 lines

BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV allows the ethernet driver to be automatically loaded on boot. Otherwise, it will report the 'device not found' error while run the 'ifconfig eth0' command.

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

looks good to me:

Best regards

Signature · 2 lines
Giulio Benetti
CEO&CTO@Benetti Engineering sas
Quoted 181 lines

---
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

Changes v3 -> v4:
- Use a single integrated image file (u-boot-sunxi-with-spl.bin)
- Remove patch file for uboot, switch to binman
- Merge boot partition into rootfs partition
- Bump kernel version to 6.1.61

Changes v4 -> v5:
- Bump kernel version to 6.1.65

Changes v5 -> v6:
- Bump kernel version to 6.6.17
- Bump uboot version to 2024.01
- Add option BR2_TARGET_UBOOT_NEEDS_OPENSSL=y

Changes v6 -> v7:
- Bump kernel version to 6.6.18
- Add option BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
- Resort sections in the defconfig

Changes v7 -> v8:
- Update commit log to add ATF version
- Update commit log to add explanation for the MDEV config

---
  board/friendlyarm/nanopi-neo2/extlinux.conf |  4 ++
  board/friendlyarm/nanopi-neo2/genimage.cfg  | 16 ++++++
  board/friendlyarm/nanopi-neo2/post-build.sh |  5 ++
  board/friendlyarm/nanopi-neo2/readme.txt    | 34 ++++++++++++
  configs/friendlyarm_nanopi_neo2_defconfig   | 57 +++++++++++++++++++++
  5 files changed, 116 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 configs/friendlyarm_nanopi_neo2_defconfig

board/friendlyarm/nanopi-neo2/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..482a069f74
@@ -0,0 +1,4 @@
+label friendlyarm-nanopi-buildroot
+  kernel /boot/Image
+  devicetree /boot/sun50i-h5-nanopi-neo2.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait
board/friendlyarm/nanopi-neo2/genimage.cfg new file +16 -0
new file mode 100644
index 0000000000..67e4e5efdb
@@ -0,0 +1,16 @@
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot-tpl-spl-dtb {
+		in-partition-table = "no"
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		offset = 1M
+	}
+}
board/friendlyarm/nanopi-neo2/post-build.sh new file +5 -0
new file mode 100755
index 0000000000..c7ec875068
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "${BOARD_DIR}/extlinux.conf" "${TARGET_DIR}/boot/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.
configs/friendlyarm_nanopi_neo2_defconfig new file +47 -0
new file mode 100644
index 0000000000..3118d45625
@@ -0,0 +1,57 @@
+# Architecture
+BR2_aarch64=y
+BR2_cortex_a53=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 6.6 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+
+# System
+BR2_TARGET_GENERIC_ISSUE="Welcome to FriendlyARM NanoPi NEO2"
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
+
+# Image
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo2/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo2/genimage.cfg"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.18"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun50i-h5-nanopi-neo2"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+
+# Firmware
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.7"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="sun50i_a64"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+
+# Bootloader
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo2"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y

configs/friendlyarm_nanopi_neo2_defconfig line 57

Quoted 10 lines
configs/friendlyarm_nanopi_neo2_defconfig new file +10 -0
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="SCP=/dev/null"
+
+# Required tools to create the SD image
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y

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