All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kilian Zinnecker via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Ludwig Kormann <ludwig.kormann@ict42.de>
Subject: Re: [Buildroot] [PATCH v2 1/1] configs/icnova-a20-adb4006: new defconfig
Date: Fri, 14 Jul 2023 19:56:19 +0200	[thread overview]
Message-ID: <2157461.Mh6RI2rZIc@kilian-aisec> (raw)
In-Reply-To: <20230628095825.905451-1-ludwig.kormann@ict42.de>

Hello Ludwig, all,

> +++ b/board/in-circuit/icnova-a20-adb4006/post-image.sh
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +
> +BOARD_DIR="$(dirname $0)"
> +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
> +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
> +
> +rm -rf "${GENIMAGE_TMP}"
> +
> +genimage                           \
> +	--rootpath "${TARGET_DIR}"     \
> +	--tmppath "${GENIMAGE_TMP}"    \
> +	--inputpath "${BINARIES_DIR}"  \
> +	--outputpath "${BINARIES_DIR}" \
> +	--config "${GENIMAGE_CFG}"
> +
> +exit $?

This seems to basically only invoke genimage, to create the image as defined in 
your genimage.cfg. There seems to be a script in buildroot, which does exactly 
this. See here: https://gitlab.com/buildroot.org/buildroot/-/blob/master/
support/scripts/genimage.sh
I recently came across this, when I looked at patches for the imxrt1050-evk 
and the Firefly roc_rk3399_pc, see here:

https://patchwork.ozlabs.org/project/buildroot/patch/20230102181603.3337480-1-Mr.Bossman075@gmail.com/
https://patchwork.ozlabs.org/project/buildroot/patch/20230710212151.574040-2-robertoxmed@gmail.com/

They seem to use the support/scripts/genimage.sh in their defconfigs with a 
parameter, e.g.:

BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/freescale/imxrt1050evk/genimage.cfg"

I myself have not done this, but you could maybe do something like this in the 
sun7i-a20-icnova-a20-adb4006_uboot_defconfig: 

BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/in-circuit/icnova-a20-adb4006/
genimage.cfg"

If this works, you could have one script less, i.e., remove the post-image.sh?

(I also do the same in my proposed Radxa Rock 5B patches and think about using 
the support genimage.sh script as well, but there it is a little bit trickier  
...)

Otherwise, to me your board support already looks very well. However, I am not 
a buildroot expert, so I can't really tell ;)

Best regards,
Kilian



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

  parent reply	other threads:[~2023-07-14 17:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-28  9:58 [Buildroot] [PATCH v2 1/1] configs/icnova-a20-adb4006: new defconfig Ludwig Kormann
2023-07-09 19:57 ` Kilian Zinnecker via buildroot
2023-07-14 17:56 ` Kilian Zinnecker via buildroot [this message]
2023-08-08 20:59 ` Thomas Petazzoni via buildroot

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=2157461.Mh6RI2rZIc@kilian-aisec \
    --to=buildroot@buildroot.org \
    --cc=kilian.zinnecker@mail.de \
    --cc=ludwig.kormann@ict42.de \
    /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.