Hi, On 1/6/26 1:53 PM, Sascha Hauer wrote: > Instead of linking the raw binary barebox proper image into the PBL link > the ELF image into the PBL. With this barebox proper starts with a properly > linked and fully initialized C environment, so the calls to > relocate_to_adr() and setup_c() can be removed from barebox proper. > > Signed-off-by: Sascha Hauer <[email protected]>
Reviewed-by: Ahmad Fatoum <[email protected]> with below issues addressed > --- > arch/arm/Kconfig | 2 ++ > arch/arm/cpu/start.c | 11 +++-------- > arch/arm/cpu/uncompress.c | 26 +++++++++++++++++++------- > 3 files changed, 24 insertions(+), 15 deletions(-) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index > 5123e9b1402c56db94df6a7a33ae993c61d51fbc..c53c58844a9411e3777711db2900b0e01cf55eec > 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -18,6 +18,8 @@ config ARM > select HW_HAS_PCI > select ARCH_HAS_DMA_WRITE_COMBINE > select HAVE_EFI_LOADER if MMU # for payload unaligned accesses > + select ELF can be dropped. > + select PBL_IMAGE_ELF > default y > > config ARCH_LINUX_NAME > diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c > index > f7d4507e71588ba5e241b24b952d55e2a4b0f794..f7062380cd5d265b3326f247a99b1847e16d64f0 > 100644 > --- a/arch/arm/cpu/start.c > +++ b/arch/arm/cpu/start.c > @@ -127,8 +127,9 @@ static int barebox_memory_areas_init(void) > } > device_initcall(barebox_memory_areas_init); > > -__noreturn __prereloc void barebox_non_pbl_start(unsigned long membase, > - unsigned long memsize, struct handoff_data *hd) > +__noreturn void barebox_non_pbl_start(unsigned long membase, > + unsigned long memsize, > + struct handoff_data *hd) The NAKED start below could also go away. Cheers, Ahmad -- 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 |
