Hi Sascha, Ok sounds coherent. Thank you for the explanation. I'm using the oselas 2018.12.0 Toolchain at the moment. Thank you for your time, a patch would be awesome 😊 Regards, Holger -----Ursprüngliche Nachricht----- Von: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> Gesendet: Mittwoch, 12. Februar 2020 09:09 An: Koelle, Holger <Holger.Koelle@xxxxxxxxxxxx> Cc: barebox@xxxxxxxxxxxxxxxxxxx; Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> Betreff: Re: imx27 phycard update problems from barebox 2019.01.0 to 2020.01.0 Hi Holger, On Tue, Feb 11, 2020 at 03:33:12PM +0000, Koelle, Holger wrote: > Hey, > > today i followed yout recommends with git bisect. > > I've found the offending commit. > It is Commit : [b0348d677bb47bdbd368983603b3e9604528d4ed] ARM: > Compile with -fPIE > > If I remove the Compilerflag (line 145) : > > CPPFLAGS += -fPIE > > from arch/arm/Makefile , then every Barebox Version (include v2020.01.0) compile and run fine on phycard imx27. > > Whats the impact if I remove this flag? Does imx27 not support this option? The problem here is that the i.MX27 only loads 2k of memory from NAND initially from which we have to bootstrap ourselves. This code is cumbersome to write in assembly, so it is written in C. This requires us to run code from a location it is not linked at. the -fPIE flag influences the way how this code is compiled and apparently it doesn't cope well with this flag. The relevant code is in arch/arm/mach-imx/external-nand-boot.c. I can see if I can find some time to debug it. Which toolchain are you using? Regards, 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 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox