Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Dong Wang <wangdong115@foxmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v2] configs/friendlyarm_nanopi_neo_defconfig: new defconfig
Date: Thu, 15 Aug 2024 00:12:37 +0200	[thread overview]
Message-ID: <20240815001237.6404eab5@windsurf> (raw)
In-Reply-To: <tencent_96D562A129814C4EA71CECCDB60D1B060707@qq.com>

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

  reply	other threads:[~2024-08-14 22:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-08-15 17:59     ` Darren Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240815001237.6404eab5@windsurf \
    --to=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=wangdong115@foxmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox