From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] board/freescale/imx: Add helper to generate fw binary
Date: Tue, 3 Nov 2020 23:39:34 +0100 [thread overview]
Message-ID: <20201103233934.1ab8a7fc@windsurf.home> (raw)
In-Reply-To: <20200428215046.GB14601@frodon.home>
Hello Xavier,
On Tue, 28 Apr 2020 23:50:46 +0200
Xavier Roumegue <xroumegue@gmail.com> wrote:
> Hello Thomas,
> iMX8 Upstream uboot adds a custom target 'flash.bin', a bootable medium once
> written to 33k offset.
>
> 1) On iMX8m[mqn], the (lp)ddr4 firmware, and hdmi fw for iMX8mq, have to be copied
> in the uboot build dir prior to execute the build.
> Additional SoC firmwares (system and security controllers) have to be copied
> for iMX8X and iMX8QM.
>
> 2) (lp)ddr4 firmware is appended to uboot spl thanks to tools/imx8m_image.sh.
> 3) A config file per imx platform (*.cfg) is describing the imx mkimage parameters,
> ..i.e. loaders file paths and entry points, SoC firmwares, boot rom options,
> etc..
> 4) Final loader is uboot.itb, generated as dependency of flash.bin for iMX
> platforms, and using an its file generated by arch/arm/mach-imx/mkimage_fit_atf.sh.
> ATF, TEE images have as well to be copied to uboot build dir, and their entry
> points can be specified through environment variables.
>
> 5) Generate 'flash.bin'
>
> The proposed script is taking care of 2), 3) and 5), with intention to support all
> iMX8 platforms generating the mkimage config file on the fly and relying on
> buildroot recipes to copy the required firmwares in images directory.
>
> Current proposal does not generate the uboot FIT image, but this would likely be
> an enhancement I would like to bring once 3) is achieved for all iMX8.
Thanks a lot for providing those additional details, and sorry for the
long delay. After looking into this a bit, I really think we should
leverage more what U-Boot upstream is doing, and not re-invent all this
image creation logic.
So in fact, I do like better what
https://github.com/SolidRun/buildroot/commit/0f2b2971e836b508bf9c2dac34426a59a9d83572
is doing. The only gotcha is that it uses BINDIR to point to
BINARIES_DIR, but BINDIR doesn't exist in upstream U-Boot, it seems to
be some SolidRun-specific change that we can't rely on.
But since this patch is also adding a
BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE, we can definitely add some logic
in uboot.mk to copy the i.MX firmware files within the U-Boot source
directory prior to the build. Yes, it's more logic in uboot.mk, but I
find that better than more logic in yet another custom shell script in
board/.
Do you think you could rework your patch in this direction ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2020-11-03 22:39 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 21:34 [Buildroot] [PATCH 1/3] board/freescale/imx: Add helper to generate fw binary Xavier Roumegue
2020-04-27 21:34 ` [Buildroot] [PATCH 2/3] configs/imx8mmevk: new defconfig Xavier Roumegue
2020-04-27 21:34 ` [Buildroot] [PATCH 3/3] configs/imx8mqevk: " Xavier Roumegue
2020-04-27 21:57 ` [Buildroot] [PATCH 1/3] board/freescale/imx: Add helper to generate fw binary Thomas Petazzoni
2020-04-28 8:53 ` Gary Bisson
2020-04-28 20:05 ` Fabio Estevam
2020-04-28 21:50 ` Xavier Roumegue
2020-11-03 22:39 ` Thomas Petazzoni [this message]
2020-11-07 13:59 ` [Buildroot] [PATCH v2 0/8] Add imx8mm platform using only upstream components Xavier Roumegue
2020-11-09 14:23 ` [Buildroot] [PATCH v3 " Xavier Roumegue
2020-11-09 14:23 ` [Buildroot] [PATCH v3 1/8] package/freescale-imx/firmware-imx: Add option to install all ddr fw files Xavier Roumegue
2020-11-25 9:15 ` Stephane Viau
2020-11-25 18:30 ` [Buildroot] [PATCH v4 0/8] Add imx8mm platform using only upstream components Xavier Roumegue
2020-12-14 22:24 ` Heiko Thiery
2021-01-23 22:23 ` Thomas Petazzoni
2020-11-25 18:30 ` [Buildroot] [PATCH v4 1/8] package/freescale-imx/firmware-imx: Add option to install all ddr fw files Xavier Roumegue
2020-12-14 22:25 ` Heiko Thiery
2020-12-23 14:32 ` Gary Bisson
2021-01-23 22:29 ` Thomas Petazzoni
2020-11-25 18:30 ` [Buildroot] [PATCH v4 2/8] boot/uboot: Add option to install fw files list to uboot build directory Xavier Roumegue
2020-12-14 22:26 ` Heiko Thiery
2021-01-23 22:32 ` Thomas Petazzoni
2020-11-25 18:30 ` [Buildroot] [PATCH v4 3/8] package/freescale-imx/firmware-imx: Copy of all DDR files if uboot needs fw Xavier Roumegue
2020-12-14 22:27 ` Heiko Thiery
2021-01-23 22:33 ` Thomas Petazzoni
2020-11-25 18:30 ` [Buildroot] [PATCH v4 4/8] boot/uboot/imx8: Add new target needed for mainline u-boot Xavier Roumegue
2020-12-14 22:27 ` Heiko Thiery
2020-12-23 14:42 ` Gary Bisson
2021-01-23 22:34 ` Thomas Petazzoni
2020-11-25 18:30 ` [Buildroot] [PATCH v4 5/8] board/freescale/common/imx: Add Support for uboot 'flash.bin' image Xavier Roumegue
2020-12-14 22:28 ` Heiko Thiery
2020-11-25 18:30 ` [Buildroot] [PATCH v4 6/8] board/freescale/common/imx8: Use post build generated uboot image if present Xavier Roumegue
2020-12-14 22:28 ` Heiko Thiery
2021-01-23 22:36 ` Thomas Petazzoni
2021-01-23 22:42 ` Thomas Petazzoni
2020-11-25 18:30 ` [Buildroot] [PATCH v4 7/8] board/freescale/common/imx8: Templatize uboot image name Xavier Roumegue
2020-11-25 18:30 ` [Buildroot] [PATCH v4 8/8] configs/imx8mmevk: new defconfig Xavier Roumegue
2020-12-06 11:03 ` Gilles Talis
2020-11-09 14:23 ` [Buildroot] [PATCH v3 2/8] boot/uboot: Add option to install fw files list to uboot build directory Xavier Roumegue
2020-11-09 14:23 ` [Buildroot] [PATCH v3 3/8] freescale-imx/firmware-imx: Copy of all DDR files if uboot needs fw Xavier Roumegue
2020-11-09 14:23 ` [Buildroot] [PATCH v3 4/8] boot/uboot/imx8: Add new target needed for mainline u-boot Xavier Roumegue
2020-11-09 14:23 ` [Buildroot] [PATCH v3 5/8] board/freescale/common/imx: Add Support for uboot 'flash.bin' image Xavier Roumegue
2020-11-09 14:23 ` [Buildroot] [PATCH v3 6/8] board/freescale/common/imx8: Use post build generated uboot image if present Xavier Roumegue
2020-11-09 14:23 ` [Buildroot] [PATCH v3 7/8] board/freescale/common/imx8: Templatize uboot image name Xavier Roumegue
2020-11-09 14:23 ` [Buildroot] [PATCH v3 8/8] configs/imx8mmevk: new defconfig Xavier Roumegue
2020-11-09 20:27 ` Julien Olivain
2020-11-11 20:31 ` Fabio Estevam
2020-11-07 13:59 ` [Buildroot] [PATCH v2 1/8] package/freescale-imx/firmware-imx: Add option to install all ddr fw files Xavier Roumegue
2020-11-07 13:59 ` [Buildroot] [PATCH v2 2/8] boot/uboot: Add option to install fw files list to uboot build directory Xavier Roumegue
2020-11-07 13:59 ` [Buildroot] [PATCH v2 3/8] freescale-imx/firmware-imx: Copy of all DDR files if uboot needs fw Xavier Roumegue
2020-11-07 13:59 ` [Buildroot] [PATCH v2 4/8] boot/uboot/imx8: Add new target needed for mainline u-boot Xavier Roumegue
2020-11-07 13:59 ` [Buildroot] [PATCH v2 5/8] board/freescale/common/imx: Add Support for uboot 'flash.bin' image Xavier Roumegue
2020-11-07 13:59 ` [Buildroot] [PATCH v2 6/8] board/freescale/common/imx8: Use post build generated uboot image if present Xavier Roumegue
2020-11-07 13:59 ` [Buildroot] [PATCH v2 7/8] board/freescale/common/imx8: Templatize uboot image name Xavier Roumegue
2020-11-07 13:59 ` [Buildroot] [PATCH v2 8/8] configs/imx8mmevk: new defconfig Xavier Roumegue
2020-11-08 0:05 ` Fabio Estevam
2020-11-10 20:23 ` Xavier Roumegue
2020-11-10 20:44 ` [Buildroot] [PATCH 1/3] board/freescale/imx: Add helper to generate fw binary Xavier Roumegue
[not found] <20200427211638.6047-1-xroumegue@gmail.com>
2020-04-27 21:44 ` Fabio Estevam
2020-04-28 20:28 ` Xavier Roumegue
2020-07-16 21:04 ` Fabio Estevam
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=20201103233934.1ab8a7fc@windsurf.home \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/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