From: "Michael Walle" <mwalle@kernel.org>
To: "Dario Binacchi" <dario.binacchi@amarulasolutions.com>,
<buildroot@buildroot.org>
Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>,
Anand Gadiyar <gadiyar@ti.com>,
heiko.thiery@gmail.com, Asaf Kahlon <asafka7@gmail.com>,
Xuanhao Shi <X15000177@gmail.com>,
James Hilliard <james.hilliard1@gmail.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Romain Naour <romain.naour@smile.fr>,
michael@amarulasolutions.com, linux-amarula@amarulasolutions.com,
"Yann E . Morin" <yann.morin.1998@free.fr>,
bryce@redpinelabs.com, Andreas Dannenberg <dannenberg@ti.com>
Subject: Re: [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin
Date: Wed, 03 Apr 2024 15:05:46 +0200 [thread overview]
Message-ID: <D0AICZ7BOW8A.2PLPZEPK1YG2E@kernel.org> (raw)
In-Reply-To: <20240330160244.3214733-7-dario.binacchi@amarulasolutions.com>
[-- Attachment #1.1: Type: text/plain, Size: 2495 bytes --]
[resend because mail got bounced on the ML, sorry]
Hi Dario,
On Sat Mar 30, 2024 at 5:02 PM CET, Dario Binacchi wrote:
> Recent versions of U-Boot are capable of building tiboot3.bin using
> Binman. In this case, let's copy it to the binaries directory.
>
> The use of `find' command is justified by the need to use a regex
> expression to select the correct file. This is not possible with a
> simple `cp' command.
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>
> ---
>
> Changes in v8:
> - Use the `find' command in pipe with the `cp' command.
>
> Changes in v6:
> - Replace `find' command with `cp' one.
>
> Changes in v5:
> - Replace tiboot3-*-$(TI_K3_R5_LOADER_SECTYPE)-*.bin with
> tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-*.bin
>
> Added in v4
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
> boot/ti-k3-r5-loader/ti-k3-r5-loader.mk | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> index fdb058f3b72a..9a05d005067a 100644
> --- a/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> +++ b/boot/ti-k3-r5-loader/ti-k3-r5-loader.mk
> @@ -70,8 +70,12 @@ define TI_K3_R5_LOADER_BUILD_CMDS
> $(TARGET_CONFIGURE_OPTS) $(TI_K3_R5_LOADER_MAKE) -C $(@D) $(TI_K3_R5_LOADER_MAKE_OPTS)
> endef
>
> +TI_K3_R5_LOADER_SECTYPE = $(call qstrip,$(BR2_PACKAGE_TI_K3_SECTYPE))
> +TI_K3_R5_LOADER_SOC = $(call qstrip,$(BR2_PACKAGE_TI_K3_SOC))
> +
> define TI_K3_R5_LOADER_INSTALL_IMAGES_CMDS
> cp $(@D)/spl/u-boot-spl.bin $(BINARIES_DIR)/r5-u-boot-spl.bin
> + cd $(@D); find ./ -type f -regex "\.\/tiboot3-$(TI_K3_R5_LOADER_SOC)-$(TI_K3_R5_LOADER_SECTYPE)-[^-]*..bin" -exec cp {} $(BINARIES_DIR)/tiboot3.bin \;
The filename should *not* be hardcoded to look like
<soc>-<sectype>.bin. This is just an artifact how TI is naming their
files in *their* u-boot binman files. Instead this should just be a
Kconfig variable (maybe K3_R5_LOADER_FILENAME?) which can be set by
the user/board config and which defaults to "tiboot3.bin".
"tiboot3.bin" is the filename which is used by the ROM in filesystem
boot mode and for which u-boot is already creating a symlink.
So this will then just be another simple "cp".
On a side node, we also found out that the "find . -regex" is rather
fragile in the sense that it might not copy anything at all without
generating an error.
-michael
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-04-03 13:05 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-30 16:02 [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 01/12] boot/ti-k3-r5-loader: drop hash for version 2022.10 Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 02/12] boot/ti-k3-r5-loader: set binman environment Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 03/12] boot/uboot: add BR2_TARGET_UBOOT_USE_BINMAN option Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 04/12] package/ti-k3: move TI_K3_{SECTYPE, SOC} out of the image-gen scope Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 05/12] package/ti-k3: disable HS-FS for AM65 SOC Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 06/12] boot/ti-k3/ti-k3-r5-loader: install tiboot3.bin Dario Binacchi
2024-04-03 13:05 ` Michael Walle [this message]
2024-04-03 13:15 ` Michael Nazzareno Trimarchi
2024-04-03 13:24 ` Michael Walle
2024-04-03 13:49 ` Michael Nazzareno Trimarchi
2024-04-03 14:06 ` Michael Walle
2024-03-30 16:02 ` [Buildroot] [PATCH v10 07/12] configs/ti_am62x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 08/12] configs/ti_am62x_sk_defconfig: bump Linux version to 6.6.18 Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 09/12] board/ti/am62x-sk: generalize post-build.sh Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 10/12] board/ti/am62x-sk: move post-{build, image}.sh to board/ti/common/am6xx Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 11/12] configs/ti_am64x_sk_defconfig: bump U-Boot version to 2024.01 Dario Binacchi
2024-03-30 16:02 ` [Buildroot] [PATCH v10 12/12] configs/ti_am64x_sk_defconfig: bump Linux version to 6.6.18 Dario Binacchi
2024-04-02 14:50 ` [Buildroot] [PATCH v10 00/12] Add support for AM62x-SK HS-FS devices Gero Schwäricke via buildroot
2024-04-02 16:20 ` Michael Nazzareno Trimarchi
2024-04-02 21:03 ` Bryan Brattlof via buildroot
2024-04-03 9:17 ` Romain Naour
2024-04-03 12:52 ` Michael Walle 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=D0AICZ7BOW8A.2PLPZEPK1YG2E@kernel.org \
--to=mwalle@kernel.org \
--cc=X15000177@gmail.com \
--cc=alexander.sverdlin@gmail.com \
--cc=asafka7@gmail.com \
--cc=bryce@redpinelabs.com \
--cc=buildroot@buildroot.org \
--cc=dannenberg@ti.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=gadiyar@ti.com \
--cc=heiko.thiery@gmail.com \
--cc=james.hilliard1@gmail.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=michael@amarulasolutions.com \
--cc=romain.naour@smile.fr \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/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.