From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: uol@pengutronix.de
Subject: [PATCH master v1 0/6] firmware: optionally turn missing firmware errors into warnings
Date: Mon, 26 Jun 2023 17:33:30 +0200 [thread overview]
Message-ID: <20230626153335.3592017-1-a.fatoum@pengutronix.de> (raw)
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 (6):
firmware: reference pointer alignment defined in
<asm-generic/pointer.h>
firmware: turn missing firmware into linker error
firmware: optionally turn missing firmware errors into warnings
ARM: 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 | 18 +++++--
images/Makefile | 23 ++++++---
images/Makefile.rockchip | 68 +++++++++-----------------
scripts/Makefile.lib | 3 ++
10 files changed, 73 insertions(+), 146 deletions(-)
--
2.39.2
next reply other threads:[~2023-06-26 15:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 15:33 Ahmad Fatoum [this message]
2023-06-26 15:33 ` [PATCH master v1 1/6] firmware: reference pointer alignment defined in <asm-generic/pointer.h> Ahmad Fatoum
2023-06-29 8:57 ` Marco Felsch
2023-06-26 15:33 ` [PATCH master v1 2/6] firmware: turn missing firmware into linker error Ahmad Fatoum
2023-06-29 9:07 ` Marco Felsch
2023-06-26 15:33 ` [PATCH master v1 3/6] firmware: optionally turn missing firmware errors into warnings Ahmad Fatoum
2023-07-03 6:25 ` Marco Felsch
2023-07-03 8:45 ` Ahmad Fatoum
2023-06-26 15:33 ` [PATCH master v1 4/6] ARM: Rockchip: gracefully handle missing firmware Ahmad Fatoum
2023-06-26 15:33 ` [PATCH master v1 5/6] ARM64: unset CONFIG_MISSING_FIRMWARE_ERROR for Rockchip/i.MX Ahmad Fatoum
2023-07-03 6:33 ` Marco Felsch
2023-07-03 8:46 ` Ahmad Fatoum
2023-06-26 15:33 ` [PATCH master v1 6/6] firmware: don't hardcode firmware paths in srctree for existence check Ahmad Fatoum
2023-07-03 6:34 ` Marco Felsch
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=20230626153335.3592017-1-a.fatoum@pengutronix.de \
--to=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