All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Olivain <ju.o@free.fr>
To: Francois Dugast <francois.dugast.foss@gmail.com>
Cc: buildroot@buildroot.org,
	Alistair Francis <alistair@alistair23.me>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [Buildroot] [PATCH 2/2] configs/hifive_unmatched: new board
Date: Wed, 26 Mar 2025 21:57:09 +0100	[thread overview]
Message-ID: <a3d8db2e90e72f4482a55e751ce4828e@free.fr> (raw)
In-Reply-To: <20250323172806.558397-3-francois.dugast.foss@gmail.com>

Hi Francois,

On 23/03/2025 18:28, Francois Dugast wrote:
> This patch adds support for the HiFive Unmatched board. This includes
> building the firmware, kernel and rootFS for the HiFive Unmatched.
> 
> The configuration is similar to the one for the HiFive Unleashed, this
> is why most of it is shared in board/sifive/common.
> 
> Signed-off-by: Francois Dugast <francois.dugast.foss@gmail.com>

[...]

> diff --git a/configs/hifive_unmatched_defconfig 
> b/configs/hifive_unmatched_defconfig
> new file mode 100644
> index 0000000000..e26aaefb57
> --- /dev/null
> +++ b/configs/hifive_unmatched_defconfig
> @@ -0,0 +1,38 @@

Running the command "utils/docker-run make check-package" generates
an error on the defconfig:

     configs/hifive_unmatched_defconfig:0: missing 
BR2_DOWNLOAD_FORCE_CHECK_HASHES

In Buildroot, we are now introducing new defconfigs with
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y to check all hashes.

See:
https://buildroot.org/downloads/manual/manual.html#_adding_project_specific_patches_and_hashes

See also an example commit just enabling hashes:
https://gitlab.com/buildroot.org/buildroot/-/commit/4ca8f0ea762061ad04016d065f37e0c351d578f1

Could you add those custom hashes please?

> +BR2_riscv=y
> +BR2_riscv_custom=y
> +BR2_RISCV_ISA_RVM=y
> +BR2_RISCV_ISA_RVA=y
> +BR2_RISCV_ISA_RVF=y
> +BR2_RISCV_ISA_RVD=y
> +BR2_RISCV_ISA_RVC=y

The defconfigs should defined a specific Kernel version.
I believe the hifive unmatched was introduced in Kernel v5.12.
So I recommend to select the latest lts kernel, for example
v6.12.20. Then, you should have a config line:

BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y

> +BR2_TARGET_GENERIC_GETTY_PORT="ttySIF0"
> +BR2_SYSTEM_DHCP="eth0"
> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/sifive/common/post-build.sh"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c 
> board/sifive/common/genimage_sdcard.cfg"
> +BR2_LINUX_KERNEL=y

And here, you should also have something like:

BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.20"

> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/sifive/common/linux.config.fragment"
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sifive/hifive-unmatched-a00"
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
> +BR2_TARGET_ROOTFS_CPIO=y
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +BR2_TARGET_OPENSBI=y
> +BR2_TARGET_OPENSBI_CUSTOM_VERSION=y
> +BR2_TARGET_OPENSBI_CUSTOM_VERSION_VALUE="1.2"
> +BR2_TARGET_OPENSBI_PLAT="generic"
> +BR2_TARGET_UBOOT=y

Same comment for u-boot. The defconfig should select a specific
version. For example, we should have here:

BR2_TARGET_UBOOT_CUSTOM_VERSION=y
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2025.01"

> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sifive_unmatched"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
> +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
> +BR2_TARGET_UBOOT_NEEDS_OPENSBI=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.itb"
> +BR2_TARGET_UBOOT_SPL=y
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
> +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
> +BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/sifive/hifive-unmatched/boot.cmd"

Also, as a suggestion, we could add a patch in the series that updates 
the
hifive_unleashed_defconfig. Basically, I'm thinking about:
- add custom hashes (and remove the entry in .checkpackageignore)
- update uboot and kernel to the same version as this config.

Having those configs aligned would probably make future maintenance 
easier.

Can you have a look at those changes, please?

Best regards,

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

      reply	other threads:[~2025-03-26 20:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-23 17:28 [Buildroot] [PATCH 0/2] Add support for the HiFive Unmatched board Francois Dugast
2025-03-23 17:28 ` [Buildroot] [PATCH 1/2] configs/hifive_unleashed: extract common configuration Francois Dugast
2025-03-26 20:32   ` Julien Olivain
2025-03-23 17:28 ` [Buildroot] [PATCH 2/2] configs/hifive_unmatched: new board Francois Dugast
2025-03-26 20:57   ` Julien Olivain [this message]

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=a3d8db2e90e72f4482a55e751ce4828e@free.fr \
    --to=ju.o@free.fr \
    --cc=alistair@alistair23.me \
    --cc=buildroot@buildroot.org \
    --cc=francois.dugast.foss@gmail.com \
    --cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.