Hi, On Mittwoch, 26. Januar 2011, Matthew Palmer wrote: > > 2. How can such a kernel, prepended with some bytes, be > > bootable at all, as this shifts its entry point and all its data? > That's an excellent question. I kinda assumed that the bytes were actually > ARM machine code, but I've never thought much about it. Jup, thats definitly possible. I have an arm device (FSG-3) which normally runs in big endian mode. So Felix Fietkau from OpenWRT helped me to pad the (standard debian armel) kernel with some ARM machine code which first switches the system to run in little endian mode and then execs the kernel. There was also some switching of the byte order of the kernel involved, _iirc_ its because due to switching from big to little endian, the byte order in memory is changed, so the kernel byte ordering had to be changed too (before putting it on flash) as it would be changed again, when the endianess of the device was switched. Embedded hardware can really be fun! :) Sadly I never blogged about the above when my memory about this was fresh. (We did the above at easterhegg 2009 :) cheers, Holger
Description: This is a digitally signed message part.