From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org, uol@pengutronix.de
Subject: Re: [PATCH master v2 0/7] firmware: optionally turn missing firmware errors into warnings
Date: Wed, 28 Jun 2023 10:45:29 +0200 [thread overview]
Message-ID: <20230628084529.GA18491@pengutronix.de> (raw)
In-Reply-To: <20230627055239.3908872-1-a.fatoum@pengutronix.de>
On Tue, Jun 27, 2023 at 07:52:32AM +0200, Ahmad Fatoum wrote:
> v1 -> v2:
> - mark firmware used for PBL as pbl-only (fixes unintended build
> error)
> - fix escape of newline character in firmware/Makefile
> - fix build failing even with CONFIG_MISSING_FIRMWARE_ERROR unset
Applied, thanks
Sascha
>
> Many of the ARMv8 defconfigs can require firmware external to barebox
> for proper operation: TF-A as BL31, DDR PHY firmware, SDRAM setup
> or OP-TEE. This led to defconfigs that fail to build by default
> unless the user installs the firmware files into the firmware directory.
>
> While this worked for the SoC-specific defconfigs, it's really annoying
> for the multi_v8_defconfig:
>
> - The user will need to install firmware even for unrelated
> platforms
>
> - Some platforms like e.g. qemu-virt64, which need no firmware to
> be compiled into barebox, can't be built just by using the
> defconfig
>
> For v2023.06.0, this was resolved by disabling boards that lack firmware
> through hiding their Kconfig symbol. This has a few shortcomings:
>
> - Firmware is looked up relative to source tree and can't take
> CONFIG_EXTRA_FIRMWARE_DIR into account that early
>
> - Firmware needs to exist at configure stage, which breaks
> build system recipes that install firmware after configure
> stage
>
> - menuconfig e.g. in Yocto's cml1.bbclass doesn't take make options
> into account that are otherwise used for olddefconfig and build
>
> This series resolves the underlying issue differently: We record
> whether firmware is missing and just continue the build till the end
> at which time the build would succeed (with warnings) if new option
> CONFIG_MISSING_FIRMWARE_ERROR was unset.
>
> In any case, barebox images which contain firmware in their PBL
> that's not available will be marked specially to reduce the risk
> of accidentally putting them to use:
>
> * They're truncated to zero size
>
> * The final "images built:" section marks them as having firmware
> missing, e.g. ** firmware missing for barebox-rk3568-bpi-r2pro.img**
>
> * They are omitted from the listing in the barebox-flash-images file
>
> * Each barebox-broken.img is accompanied with a
> barebox-broken.img.missing-firmware containing a newline delimited
> list of missing firmware images
>
>
> Ahmad Fatoum (7):
> firmware: reference pointer alignment defined in
> <asm-generic/pointer.h>
> firmware: mark firmware used in PBL as pbl-only
> firmware: turn missing firmware into linker error
> firmware: optionally turn missing firmware errors into warnings
> ARM64: Rockchip: gracefully handle missing firmware
> ARM64: unset CONFIG_MISSING_FIRMWARE_ERROR for Rockchip/i.MX
> firmware: don't hardcode firmware paths in srctree for existence check
>
> arch/arm/configs/imx_v8_defconfig | 1 +
> arch/arm/configs/multi_v8_defconfig | 1 +
> arch/arm/configs/rockchip_v8_defconfig | 1 +
> arch/arm/mach-imx/Kconfig | 49 -------------------
> arch/arm/mach-rockchip/Kconfig | 6 ---
> firmware/Kconfig | 49 +++++--------------
> firmware/Makefile | 47 +++++++++++-------
> images/Makefile | 23 ++++++---
> images/Makefile.rockchip | 68 +++++++++-----------------
> scripts/Makefile.lib | 3 ++
> 10 files changed, 88 insertions(+), 160 deletions(-)
>
> --
> 2.39.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2023-06-28 8:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 5:52 Ahmad Fatoum
2023-06-27 5:52 ` [PATCH master v2 1/7] firmware: reference pointer alignment defined in <asm-generic/pointer.h> Ahmad Fatoum
2023-06-28 7:14 ` Sascha Hauer
2023-06-27 5:52 ` [PATCH master v2 2/7] firmware: mark firmware used in PBL as pbl-only Ahmad Fatoum
2023-06-27 5:52 ` [PATCH master v2 3/7] firmware: turn missing firmware into linker error Ahmad Fatoum
2023-06-27 5:52 ` [PATCH master v2 4/7] firmware: optionally turn missing firmware errors into warnings Ahmad Fatoum
2023-06-27 5:52 ` [PATCH master v2 5/7] ARM64: Rockchip: gracefully handle missing firmware Ahmad Fatoum
2023-06-27 5:52 ` [PATCH master v2 6/7] ARM64: unset CONFIG_MISSING_FIRMWARE_ERROR for Rockchip/i.MX Ahmad Fatoum
2023-06-27 5:52 ` [PATCH master v2 7/7] firmware: don't hardcode firmware paths in srctree for existence check Ahmad Fatoum
2023-06-28 8:45 ` Sascha Hauer [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=20230628084529.GA18491@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=uol@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox