[PATCH] fixup! mtd: spi-nor: enable module in PBL
Sascha Hauer
s.hauer at pengutronix.de
Tue Oct 20 02:05:38 PDT 2026
On 2026-10-20 09:39, Sascha Hauer wrote:
> Building spi-nor.c for PBL breaks the sandbox build: the PBL only
> provides get_time_ns() and is_timeout() with CONFIG_PBL_CLOCKSOURCE,
> which sandbox only selects with COMPILE_TEST, and sandbox links the PBL
> objects with --whole-archive:
>
> undefined reference to `get_time_ns'
> undefined reference to `is_timeout'
>
> Use the read_poll_get_time_ns()/read_poll_is_timeout() wrappers from
> <linux/iopoll.h>, which fall back to polling without timeout when there
> is no PBL clocksource, like read_poll_timeout() already does.
>
I decided for another approach: Add a dedicated config option CONFIG_MTD_SPI_NOR_PBL
which has to be selected when SPI NOR is used by the xloader.
Sascha
--
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 |
More information about the barebox
mailing list