Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] configs/friendlyarm_nanopi_neo_defconfig: new defconfig
@ 2024-05-15  0:52 Dong Wang
  2024-08-06 21:28 ` Thomas Petazzoni via buildroot
  2024-08-13 17:02 ` [Buildroot] [PATCH v2] " Dong Wang
  0 siblings, 2 replies; 5+ messages in thread
From: Dong Wang @ 2024-05-15  0:52 UTC (permalink / raw)
  To: buildroot; +Cc: Dong Wang

This patch adds a new defconfig for the NanoPi NEO board made by
FriendlyARM. This board is based on the Allwinner H3 SoC.

See: https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO

.

This patch uses the mainline kernel and u-boot for the board.

The configurations are based on the previously dropped defconfig
maintained by Yann E. MORIN <yann.morin.1998@free.fr>.

Signed-off-by: Dong Wang <wangdong115@foxmail.com>
---
 DEVELOPERS                                |  4 +++
 board/friendlyarm/nanopi-neo/boot.cmd     |  5 +++
 board/friendlyarm/nanopi-neo/genimage.cfg | 36 +++++++++++++++++++
 board/friendlyarm/nanopi-neo/readme.txt   | 41 +++++++++++++++++++++
 configs/friendlyarm_nanopi_neo_defconfig  | 44 +++++++++++++++++++++++
 5 files changed, 130 insertions(+)
 create mode 100644 board/friendlyarm/nanopi-neo/boot.cmd
 create mode 100644 board/friendlyarm/nanopi-neo/genimage.cfg
 create mode 100644 board/friendlyarm/nanopi-neo/readme.txt
 create mode 100644 configs/friendlyarm_nanopi_neo_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index a9deddb343..13439b9892 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -858,6 +858,10 @@ F:	package/logsurfer/
 N:	Dominik Michael Rauh <dmrauh@posteo.de>
 F:	package/gdal/
 
+N:	Dong Wang <wangdong115@foxmail.com>
+F:	board/friendlyarm/nanopi-neo
+F:	configs/friendlyarm_nanopi_neo_defconfig
+
 N:	Doug Kehn <rdkehn@gmail.com>
 F:	package/nss-pam-ldapd/
 F:	package/sp-oops-extract/
diff --git a/board/friendlyarm/nanopi-neo/boot.cmd b/board/friendlyarm/nanopi-neo/boot.cmd
new file mode 100644
index 0000000000..8c199ed480
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo/boot.cmd
@@ -0,0 +1,5 @@
+setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait panic=10
+
+load mmc 0:1 ${fdt_addr_r} ${fdtfile}
+load mmc 0:1 ${kernel_addr_r} zImage
+bootz ${kernel_addr_r} - ${fdt_addr_r}
diff --git a/board/friendlyarm/nanopi-neo/genimage.cfg b/board/friendlyarm/nanopi-neo/genimage.cfg
new file mode 100644
index 0000000000..4cfd8c8fc2
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo/genimage.cfg
@@ -0,0 +1,36 @@
+# Minimal SD card image for the NanoPi NEO.
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"sun8i-h3-nanopi-neo.dtb",
+			"boot.scr"
+		}
+	}
+
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		in-partition-table = false
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+		size = 1000K # 1MB - 8KB(offset) - 16KB(GPT)
+	}
+
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		size = 512M
+	}
+}
diff --git a/board/friendlyarm/nanopi-neo/readme.txt b/board/friendlyarm/nanopi-neo/readme.txt
new file mode 100644
index 0000000000..cfe7714a41
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo/readme.txt
@@ -0,0 +1,41 @@
+Nanopi NEO
+
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the NanoPi NEO. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+FriendlyARM Nanopi NEO link:
+https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO
+
+How to build
+============
+
+    $ make friendlyarm_nanopi_neo_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
+  $ sudo sync
+
+Insert the micro SD card in your Nanopi NEO and power it up. The console
+is on the debug TTL UART, 115200 8N1.
+
+Ethernet
+==========
+
+  # udhcpc -i eth0
+
+Enjoy!
diff --git a/configs/friendlyarm_nanopi_neo_defconfig b/configs/friendlyarm_nanopi_neo_defconfig
new file mode 100644
index 0000000000..a725553258
--- /dev/null
+++ b/configs/friendlyarm_nanopi_neo_defconfig
@@ -0,0 +1,44 @@
+# Architecture
+BR2_arm=y
+BR2_cortex_a7=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_HOSTNAME="nanopi-neo"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi NEO"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30"
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun8i-h3-nanopi-neo"
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+
+# Image
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo/genimage.cfg"
+
+# 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.04"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo"
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
+
+# Host utilities
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/friendlyarm/nanopi-neo/boot.cmd"
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH] configs/friendlyarm_nanopi_neo_defconfig: new defconfig
  2024-05-15  0:52 [Buildroot] [PATCH] configs/friendlyarm_nanopi_neo_defconfig: new defconfig Dong Wang
@ 2024-08-06 21:28 ` Thomas Petazzoni via buildroot
  2024-08-13 17:02 ` [Buildroot] [PATCH v2] " Dong Wang
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-06 21:28 UTC (permalink / raw)
  To: Dong Wang; +Cc: buildroot

Hello Dong,

First of all, thanks a lot for your contribution and patch submission,
and sorry for the delay with which we are getting back to you. I only
have a few comments below.

On Wed, 15 May 2024 08:52:31 +0800
Dong Wang <wangdong115@foxmail.com> wrote:

> This patch adds a new defconfig for the NanoPi NEO board made by
> FriendlyARM. This board is based on the Allwinner H3 SoC.
> 
> See: https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO
> 
> .

This empty line with a dot seems quite useless, could you drop it?

> 
> This patch uses the mainline kernel and u-boot for the board.
> 
> The configurations are based on the previously dropped defconfig
> maintained by Yann E. MORIN <yann.morin.1998@free.fr>.
> 
> Signed-off-by: Dong Wang <wangdong115@foxmail.com>


> diff --git a/board/friendlyarm/nanopi-neo/boot.cmd b/board/friendlyarm/nanopi-neo/boot.cmd
> new file mode 100644
> index 0000000000..8c199ed480
> --- /dev/null
> +++ b/board/friendlyarm/nanopi-neo/boot.cmd
> @@ -0,0 +1,5 @@
> +setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait panic=10
> +
> +load mmc 0:1 ${fdt_addr_r} ${fdtfile}
> +load mmc 0:1 ${kernel_addr_r} zImage
> +bootz ${kernel_addr_r} - ${fdt_addr_r}

Could you drop this custom U-Boot script, and use extlinux.conf like we
try to do in most new defconfigs?

> diff --git a/board/friendlyarm/nanopi-neo/genimage.cfg b/board/friendlyarm/nanopi-neo/genimage.cfg
> new file mode 100644
> index 0000000000..4cfd8c8fc2
> --- /dev/null
> +++ b/board/friendlyarm/nanopi-neo/genimage.cfg
> @@ -0,0 +1,36 @@
> +# Minimal SD card image for the NanoPi NEO.
> +image boot.vfat {
> +	vfat {
> +		files = {
> +			"zImage",
> +			"sun8i-h3-nanopi-neo.dtb",
> +			"boot.scr"
> +		}
> +	}
> +
> +	size = 16M
> +}
> +
> +image sdcard.img {
> +	hdimage {
> +	}
> +
> +	partition u-boot {
> +		in-partition-table = false
> +		image = "u-boot-sunxi-with-spl.bin"
> +		offset = 8K
> +		size = 1000K # 1MB - 8KB(offset) - 16KB(GPT)
> +	}
> +
> +	partition boot {
> +		partition-type = 0xC
> +		bootable = "true"
> +		image = "boot.vfat"
> +	}

Could you drop entirely this VFAT partition, and have the kernel + DTB
+ extlinux.conf directly in the rootfs, and U-Boot directly load
extlinux.conf from this ext4 filesystem?

> +	partition rootfs {
> +		partition-type = 0x83
> +		image = "rootfs.ext4"
> +		size = 512M

Leave out the size = argument, it isn't very useful to have a larger
partition, but a filesystem that is smaller than that size.

All of the rest really looks good to me. Could you just address the
above comments, and submit a v2 ?

Thanks a lot for your contribution and effort!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2] configs/friendlyarm_nanopi_neo_defconfig: new defconfig
  2024-05-15  0:52 [Buildroot] [PATCH] configs/friendlyarm_nanopi_neo_defconfig: new defconfig Dong Wang
  2024-08-06 21:28 ` Thomas Petazzoni via buildroot
@ 2024-08-13 17:02 ` Dong Wang
  2024-08-14 22:12   ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 5+ messages in thread
From: Dong Wang @ 2024-08-13 17:02 UTC (permalink / raw)
  To: buildroot; +Cc: Dong Wang, Thomas Petazzoni

This patch adds a new defconfig for the NanoPi NEO board made by
FriendlyARM. This board is based on the Allwinner H3 SoC.

See: https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO

This patch uses the mainline kernel and u-boot for the board.

The configurations are based on the previously dropped defconfig
maintained by Yann E. MORIN <yann.morin.1998@free.fr>.

Signed-off-by: Dong Wang <wangdong115@foxmail.com>
---

Changes v1 -> v2:
  - Use extlinux.conf instead of boot.scr (suggested by Thomas)
  - Drop boot.vfat partition (suggested by Thomas)
  - Remove 'size' argument for rootfs partition (suggested by Thomas)
  - Fix missing dependecies for uboot after running utils/docker-run
  - Add hashes for linux and uboot as suggested by check-package
  - Bump linux and uboot version 
  

 DEVELOPERS                                    |  4 ++
 board/friendlyarm/nanopi-neo/extlinux.conf    |  4 ++
 board/friendlyarm/nanopi-neo/genimage.cfg     | 17 +++++++
 .../friendlyarm/nanopi-neo/patches/linux.hash |  2 +
 .../friendlyarm/nanopi-neo/patches/uboot.hash |  2 +
 board/friendlyarm/nanopi-neo/post-build.sh    |  5 ++
 board/friendlyarm/nanopi-neo/readme.txt       | 41 +++++++++++++++
 configs/friendlyarm_nanopi_neo_defconfig      | 50 +++++++++++++++++++
 8 files changed, 125 insertions(+)
 create mode 100644 board/friendlyarm/nanopi-neo/extlinux.conf
 create mode 100644 board/friendlyarm/nanopi-neo/genimage.cfg
 create mode 100644 board/friendlyarm/nanopi-neo/patches/linux.hash
 create mode 100644 board/friendlyarm/nanopi-neo/patches/uboot.hash
 create mode 100755 board/friendlyarm/nanopi-neo/post-build.sh
 create mode 100644 board/friendlyarm/nanopi-neo/readme.txt
 create mode 100644 configs/friendlyarm_nanopi_neo_defconfig

diff --git a/DEVELOPERS b/DEVELOPERS
index d7d0af3543..9eb54bc2bc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -868,6 +868,10 @@ F:	package/logsurfer/
 N:	Dominik Michael Rauh <dmrauh@posteo.de>
 F:	package/gdal/
 
+N:	Dong Wang <wangdong115@foxmail.com>
+F:	board/friendlyarm/nanopi-neo
+F:	configs/friendlyarm_nanopi_neo_defconfig
+
 N:	Doug Kehn <rdkehn@gmail.com>
 F:	package/nss-pam-ldapd/
 F:	package/sp-oops-extract/
diff --git a/board/friendlyarm/nanopi-neo/extlinux.conf b/board/friendlyarm/nanopi-neo/extlinux.conf
new file mode 100644
index 0000000000..e65951f9d9
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo/extlinux.conf
@@ -0,0 +1,4 @@
+label NanoPi NEO linux
+  kernel /boot/zImage
+  devicetree /boot/sun8i-h3-nanopi-neo.dtb
+  append console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p1 rootwait panic=10
diff --git a/board/friendlyarm/nanopi-neo/genimage.cfg b/board/friendlyarm/nanopi-neo/genimage.cfg
new file mode 100644
index 0000000000..ec78fd0e56
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo/genimage.cfg
@@ -0,0 +1,17 @@
+# Minimal SD card image for the NanoPi NEO.
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		in-partition-table = false
+		image = "u-boot-sunxi-with-spl.bin"
+		offset = 8K
+		size = 1000K # 1MB - 8KB(offset) - 16KB(GPT)
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+	}
+}
diff --git a/board/friendlyarm/nanopi-neo/patches/linux.hash b/board/friendlyarm/nanopi-neo/patches/linux.hash
new file mode 100644
index 0000000000..fe059dcd03
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo/patches/linux.hash
@@ -0,0 +1,2 @@
+# From https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
+sha256  93218296934915636fe6ba08e125948424cc270fd8948502c0ab91087a9fccd8  linux-6.6.44.tar.xz
diff --git a/board/friendlyarm/nanopi-neo/patches/uboot.hash b/board/friendlyarm/nanopi-neo/patches/uboot.hash
new file mode 100644
index 0000000000..e86d9c9b8a
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo/patches/uboot.hash
@@ -0,0 +1,2 @@
+# Locally computed:
+sha256  f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f  u-boot-2024.07.tar.bz2
diff --git a/board/friendlyarm/nanopi-neo/post-build.sh b/board/friendlyarm/nanopi-neo/post-build.sh
new file mode 100755
index 0000000000..d84a5da0b0
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo/post-build.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname "$0")"
+
+install -m 0644 -D "$BOARD_DIR"/extlinux.conf "$TARGET_DIR"/boot/extlinux/extlinux.conf
diff --git a/board/friendlyarm/nanopi-neo/readme.txt b/board/friendlyarm/nanopi-neo/readme.txt
new file mode 100644
index 0000000000..cfe7714a41
--- /dev/null
+++ b/board/friendlyarm/nanopi-neo/readme.txt
@@ -0,0 +1,41 @@
+Nanopi NEO
+
+Intro
+=====
+
+This default configuration will allow you to start experimenting with the
+buildroot environment for the NanoPi NEO. With the current configuration
+it will bring-up the board, and allow access through the serial console.
+
+FriendlyARM Nanopi NEO link:
+https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO
+
+How to build
+============
+
+    $ make friendlyarm_nanopi_neo_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
+  $ sudo sync
+
+Insert the micro SD card in your Nanopi NEO and power it up. The console
+is on the debug TTL UART, 115200 8N1.
+
+Ethernet
+==========
+
+  # udhcpc -i eth0
+
+Enjoy!
diff --git a/configs/friendlyarm_nanopi_neo_defconfig b/configs/friendlyarm_nanopi_neo_defconfig
new file mode 100644
index 0000000000..8d1dde247d
--- /dev/null
+++ b/configs/friendlyarm_nanopi_neo_defconfig
@@ -0,0 +1,50 @@
+# Architecture
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ARM_FPU_VFPV4=y
+
+# Linux headers same as kernel, a 6.6 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+
+# Hashes
+BR2_GLOBAL_PATCH_DIR="board/friendlyarm/nanopi-neo/patches"
+BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
+
+# System
+BR2_TARGET_GENERIC_HOSTNAME="nanopi-neo"
+BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi NEO"
+
+# Image
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo/genimage.cfg"
+
+# Kernel
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.44"
+BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun8i-h3-nanopi-neo"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+
+# Filesystem
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=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.07"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
+
+# Host utilities
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2] configs/friendlyarm_nanopi_neo_defconfig: new defconfig
  2024-08-13 17:02 ` [Buildroot] [PATCH v2] " Dong Wang
@ 2024-08-14 22:12   ` Thomas Petazzoni via buildroot
  2024-08-15 17:59     ` Darren Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-14 22:12 UTC (permalink / raw)
  To: Dong Wang; +Cc: buildroot

Hello Dong,

On Wed, 14 Aug 2024 01:02:44 +0800
Dong Wang <wangdong115@foxmail.com> wrote:

> This patch adds a new defconfig for the NanoPi NEO board made by
> FriendlyARM. This board is based on the Allwinner H3 SoC.
> 
> See: https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO
> 
> This patch uses the mainline kernel and u-boot for the board.
> 
> The configurations are based on the previously dropped defconfig
> maintained by Yann E. MORIN <yann.morin.1998@free.fr>.
> 
> Signed-off-by: Dong Wang <wangdong115@foxmail.com>

Thanks a lot for this v2, which I applied to next, but after fixing a
number of things (see below). Also, there's one remaining fix to fix as
a follow-up, see below as well.

> diff --git a/DEVELOPERS b/DEVELOPERS
> index d7d0af3543..9eb54bc2bc 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -868,6 +868,10 @@ F:	package/logsurfer/
>  N:	Dominik Michael Rauh <dmrauh@posteo.de>
>  F:	package/gdal/
>  
> +N:	Dong Wang <wangdong115@foxmail.com>
> +F:	board/friendlyarm/nanopi-neo

We like directory paths to end with a final / in the DEVELOPERS file,
so I fixed this.

> diff --git a/board/friendlyarm/nanopi-neo/genimage.cfg b/board/friendlyarm/nanopi-neo/genimage.cfg
> new file mode 100644
> index 0000000000..ec78fd0e56
> --- /dev/null
> +++ b/board/friendlyarm/nanopi-neo/genimage.cfg
> @@ -0,0 +1,17 @@
> +# Minimal SD card image for the NanoPi NEO.
> +image sdcard.img {
> +	hdimage {
> +	}
> +
> +	partition u-boot {
> +		in-partition-table = false
> +		image = "u-boot-sunxi-with-spl.bin"
> +		offset = 8K
> +		size = 1000K # 1MB - 8KB(offset) - 16KB(GPT)

I don't understand this "size" value, and especially the - 16KB(GPT),
since this image is not using a GPT partition table. Could you clarify,
and perhaps send a follow-up patch to fix this?

> diff --git a/board/friendlyarm/nanopi-neo/patches/linux.hash b/board/friendlyarm/nanopi-neo/patches/linux.hash

The files for those hashes were wrong, I don't know how you generated
them, but they need to be in a subdir for each package:

board
 + friendlyarm
   + nanopi-neo
     + patches
       + linux
         + linux.hash

Also, the hash for linux-headers was missing (as a symlink to linux). I
fixed those issues by just running ./utils/add-custom-hashes.


> diff --git a/configs/friendlyarm_nanopi_neo_defconfig b/configs/friendlyarm_nanopi_neo_defconfig
> new file mode 100644
> index 0000000000..8d1dde247d
> --- /dev/null
> +++ b/configs/friendlyarm_nanopi_neo_defconfig
> @@ -0,0 +1,50 @@
> +# Architecture
> +BR2_arm=y
> +BR2_cortex_a7=y
> +BR2_ARM_FPU_VFPV4=y
> +
> +# Linux headers same as kernel, a 6.6 series
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
> +
> +# Hashes
> +BR2_GLOBAL_PATCH_DIR="board/friendlyarm/nanopi-neo/patches"
> +BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
> +
> +# System
> +BR2_TARGET_GENERIC_HOSTNAME="nanopi-neo"
> +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi NEO"
> +
> +# Image
> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo/post-build.sh"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo/genimage.cfg"
> +
> +# Kernel
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.44"
> +BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun8i-h3-nanopi-neo"
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
> +
> +# Filesystem
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=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.07"
> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
> +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
> +
> +# Host utilities
> +BR2_PACKAGE_HOST_DOSFSTOOLS=y

dosfstools is no longer needed, as you no longer have a FAT partition.

> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_HOST_MTOOLS=y

mtools is also no longer needed.

Thanks again!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2] configs/friendlyarm_nanopi_neo_defconfig: new defconfig
  2024-08-14 22:12   ` Thomas Petazzoni via buildroot
@ 2024-08-15 17:59     ` Darren Wang
  0 siblings, 0 replies; 5+ messages in thread
From: Darren Wang @ 2024-08-15 17:59 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot

Hi Thomas,

On 2024/8/15 06:12, Thomas Petazzoni via buildroot wrote:
> Hello Dong,
> 
> On Wed, 14 Aug 2024 01:02:44 +0800
> Dong Wang <wangdong115@foxmail.com> wrote:
> 
>> This patch adds a new defconfig for the NanoPi NEO board made by
>> FriendlyARM. This board is based on the Allwinner H3 SoC.
>>
>> See: https://wiki.friendlyelec.com/wiki/index.php/NanoPi_NEO
>>
>> This patch uses the mainline kernel and u-boot for the board.
>>
>> The configurations are based on the previously dropped defconfig
>> maintained by Yann E. MORIN <yann.morin.1998@free.fr>.
>>
>> Signed-off-by: Dong Wang <wangdong115@foxmail.com>
> 
> Thanks a lot for this v2, which I applied to next, but after fixing a
> number of things (see below). Also, there's one remaining fix to fix as
> a follow-up, see below as well.

Thanks for the review and feedback! I am very delighted to see my first 
patch to the open source community get applied!

> 
>> diff --git a/DEVELOPERS b/DEVELOPERS
>> index d7d0af3543..9eb54bc2bc 100644
>> --- a/DEVELOPERS
>> +++ b/DEVELOPERS
>> @@ -868,6 +868,10 @@ F:	package/logsurfer/
>>   N:	Dominik Michael Rauh <dmrauh@posteo.de>
>>   F:	package/gdal/
>>   
>> +N:	Dong Wang <wangdong115@foxmail.com>
>> +F:	board/friendlyarm/nanopi-neo
> 
> We like directory paths to end with a final / in the DEVELOPERS file,
> so I fixed this.
> 
>> diff --git a/board/friendlyarm/nanopi-neo/genimage.cfg b/board/friendlyarm/nanopi-neo/genimage.cfg
>> new file mode 100644
>> index 0000000000..ec78fd0e56
>> --- /dev/null
>> +++ b/board/friendlyarm/nanopi-neo/genimage.cfg
>> @@ -0,0 +1,17 @@
>> +# Minimal SD card image for the NanoPi NEO.
>> +image sdcard.img {
>> +	hdimage {
>> +	}
>> +
>> +	partition u-boot {
>> +		in-partition-table = false
>> +		image = "u-boot-sunxi-with-spl.bin"
>> +		offset = 8K
>> +		size = 1000K # 1MB - 8KB(offset) - 16KB(GPT)
> 
> I don't understand this "size" value, and especially the - 16KB(GPT),
> since this image is not using a GPT partition table. Could you clarify,
> and perhaps send a follow-up patch to fix this?

My bad. I copied this part from board/orangepi/common/genimage.cfg 
without a second thought. This is wrong. I just sent another patch to 
fix this!

> 
>> diff --git a/board/friendlyarm/nanopi-neo/patches/linux.hash b/board/friendlyarm/nanopi-neo/patches/linux.hash
> 
> The files for those hashes were wrong, I don't know how you generated
> them, but they need to be in a subdir for each package:

I copied them from boot/uboot/uboot.hash and linux/linux.hash. They were 
also the ones that were checked against when I built the image and 
test... So I didn't even noticed the wrong directory...

> 
> board
>   + friendlyarm
>     + nanopi-neo
>       + patches
>         + linux
>           + linux.hash
> 
> Also, the hash for linux-headers was missing (as a symlink to linux). I
> fixed those issues by just running ./utils/add-custom-hashes.

Thanks for the fix!

> 
> 
>> diff --git a/configs/friendlyarm_nanopi_neo_defconfig b/configs/friendlyarm_nanopi_neo_defconfig
>> new file mode 100644
>> index 0000000000..8d1dde247d
>> --- /dev/null
>> +++ b/configs/friendlyarm_nanopi_neo_defconfig
>> @@ -0,0 +1,50 @@
>> +# Architecture
>> +BR2_arm=y
>> +BR2_cortex_a7=y
>> +BR2_ARM_FPU_VFPV4=y
>> +
>> +# Linux headers same as kernel, a 6.6 series
>> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
>> +
>> +# Hashes
>> +BR2_GLOBAL_PATCH_DIR="board/friendlyarm/nanopi-neo/patches"
>> +BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
>> +
>> +# System
>> +BR2_TARGET_GENERIC_HOSTNAME="nanopi-neo"
>> +BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the NanoPi NEO"
>> +
>> +# Image
>> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/friendlyarm/nanopi-neo/post-build.sh"
>> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
>> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/friendlyarm/nanopi-neo/genimage.cfg"
>> +
>> +# Kernel
>> +BR2_LINUX_KERNEL=y
>> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
>> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.44"
>> +BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
>> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
>> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="allwinner/sun8i-h3-nanopi-neo"
>> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
>> +
>> +# Filesystem
>> +BR2_TARGET_ROOTFS_EXT2=y
>> +BR2_TARGET_ROOTFS_EXT2_4=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.07"
>> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="nanopi_neo"
>> +BR2_TARGET_UBOOT_NEEDS_DTC=y
>> +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
>> +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
>> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
>> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
>> +
>> +# Host utilities
>> +BR2_PACKAGE_HOST_DOSFSTOOLS=y
> 
> dosfstools is no longer needed, as you no longer have a FAT partition.
> 
>> +BR2_PACKAGE_HOST_GENIMAGE=y
>> +BR2_PACKAGE_HOST_MTOOLS=y
> 
> mtools is also no longer needed.
> 
> Thanks again!
> 
> Thomas

Thanks!

Dong

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-15 18:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-15  0:52 [Buildroot] [PATCH] configs/friendlyarm_nanopi_neo_defconfig: new defconfig Dong Wang
2024-08-06 21:28 ` Thomas Petazzoni via buildroot
2024-08-13 17:02 ` [Buildroot] [PATCH v2] " Dong Wang
2024-08-14 22:12   ` Thomas Petazzoni via buildroot
2024-08-15 17:59     ` Darren Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox