On Fri, Jun 22, 2012 at 11:36 PM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 22 June 2012 14:27, Peter Crosthwaite > <peter.crosthwa...@petalogix.com> wrote: >> Ping! >> >> Any thoughts Peter? > > Still sounds too specific to your odd use case and hardware to me. > > I'd accept some reasonable way of saying "this ELF file is a Linux kernel", > but magically doing it if you also said -dtb isn't it. I also care about > backcompat with previous command lines and with being consistent about > how -kernel works across architectures where possible.
Speaking of other archs, microblaze will accept -dtb with an elf and implement the r2=foo style behviour before loading the elf entry. A provocative thought, how bout always using a Linux style bootloader no matter what? Does it really matter if your elf is bootstrapped by half a dozen instructions? Further to that, can we get rid of the bootloader blob altogether and just setup the cpu->env like other architectures do? 23 /* The worlds second smallest bootloader. Set r0-r2, then jump to kernel. */ 24 static uint32_t bootloader[] = { 25 0xe3a00000, /* mov r0, #0 */ 26 0xe59f1004, /* ldr r1, [pc, #4] */ 27 0xe59f2004, /* ldr r2, [pc, #4] */ 28 0xe59ff004, /* ldr pc, [pc, #4] */ 29 0, /* Board ID */ 30 0, /* Address of kernel args. Set by integratorcp_init. */ 31 0 /* Kernel entry point. Set by integratorcp_init. */ 32 }; All this code does is set registers and an entry point, which several bootloaders do just though cpu->env manipulation. > a somewhat contradictory set of requirements.) > > -- PMM