From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Laurent Badel <laurentbadel@eaton.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] boot/mxs-bootlets: add support for zImage with appended DTB
Date: Thu, 11 Jan 2024 16:26:08 +0100 [thread overview]
Message-ID: <ZaAIkDXOQV9QUazR@landeda> (raw)
In-Reply-To: <20240111131932.11760-1-laurentbadel@eaton.com>
Laurent, All,
On 2024-01-11 13:19 +0000, Laurent Badel via buildroot spake thusly:
> When building a zImage with appended DTB, buildroot creates a copy of
> the zImage named zImage.$(LINUX_DTS_NAME). mxs-bootlets.mk does not
> take this into consideration and instead passes the original zImage
> (without DTB appended) to elftosb to generate the SB file. Thus,
> make sure that the correct zImage is used in this process.
>
> Note: this patch only supports a single DTS specified in the
> configuration, because there is no obvious use case for multiple DTS's
> with mxs-bootlets. If multiple DTS's are configured, only the first one
> will be used.
That's a bit unfortunate that we have to rely on the ordering.
So, if using two or more DTS in cunjunction with mxs-bootlets does not
make sense, should that be forbidden? I.e. would we need something like
the following (code slightly elided for brevity):
ifeq ($(BR2_TARGET_MXS_BOOTLETS_LINUX),y)
ifeq ($(BR2_BOOT_MXS_BOOTLETS),y)
ifneq ($(words $(LINUX_DTS_NAME)),1)
$(error More than one DTS specified; mxs-bootlets can only use one)
endif
endif
define MXS_BOOTLETS_BUILD_LINUX_PREP
...
endef
MXS_BOOTLETS_ZIMAGE_NAME = zImage$(....)
define MXS_BOOTLETS_SED_LINUX
...
endif
endif
(See below the name of the variable.)
> Signed-off-by: Laurent Badel <laurentbadel@eaton.com>
> ---
> boot/mxs-bootlets/mxs-bootlets.mk | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/boot/mxs-bootlets/mxs-bootlets.mk b/boot/mxs-bootlets/mxs-bootlets.mk
> index adc22767..2003b23f 100644
> --- a/boot/mxs-bootlets/mxs-bootlets.mk
> +++ b/boot/mxs-bootlets/mxs-bootlets.mk
> @@ -65,9 +65,10 @@ define MXS_BOOTLETS_BUILD_LINUX_PREP
> BOARD=$(MXS_BOOTLETS_BOARD) CROSS_COMPILE="$(TARGET_CROSS)" \
> $(MAKE1) -C $(@D) linux_prep
> endef
> +ZIMAGE_NAME=zImage$(if $(BR2_LINUX_KERNEL_APPENDED_DTB),.$(notdir $(firstword $(LINUX_DTS_NAME))))
The namespace is global, so the variable names have to be manually
scopped with the name of the package they apply to, in this case:
MXS_BOOTLETS_ZIMAGE_NAME
Regards,
Yann E. MORIN.
> define MXS_BOOTLETS_SED_LINUX
> sed -i 's,[^ *]linux_prep.*;,\tlinux_prep="$(@D)/linux_prep/output-target/linux_prep";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC)
> - sed -i 's,[^ *]zImage.*;,\tzImage="$(LINUX_DIR)/arch/arm/boot/zImage";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC)
> + sed -i 's,[^ *]zImage.*;,\tzImage="$(LINUX_DIR)/arch/arm/boot/$(ZIMAGE_NAME)";,' $(@D)/$(MXS_BOOTLETS_BOOTDESC)
> endef
> endif
>
> --
> 2.17.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-01-11 15:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 13:19 [Buildroot] [PATCH 1/1] boot/mxs-bootlets: add support for zImage with appended DTB Laurent Badel via buildroot
2024-01-11 15:26 ` Yann E. MORIN [this message]
2024-01-12 8:30 ` Badel, Laurent via buildroot
2024-01-12 16:21 ` Yann E. MORIN
2024-01-16 9:32 ` Badel, Laurent via buildroot
-- strict thread matches above, loose matches on Subject: below --
2024-01-16 9:34 Laurent Badel 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=ZaAIkDXOQV9QUazR@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=laurentbadel@eaton.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.