Digi CCWMX53

Rui Paulo rpaulo at me.com
Sun Sep 28 16:36:47 UTC 2014


On Sep 28, 2014, at 08:21, Ian Lepore <ian at FreeBSD.org> wrote:
> We can use bootelf on ubldr, but not on the kernel, because our kernel
> linker script doesn't fill in the physical load address properly in the
> elf header (it would try to load the virtual address).
> 
> So the two options for launching the kernel directly are:
> 
>   load kernel; go <load address + 100>
>   load kernel.bin; go <load address>
> 
> The standard no-suffix kernel file is an elf binary with the wrong load
> address in the header, and the header is 0x100 bytes, so the entry point
> is immediately after that.  The kernel.bin file is exactly the same as
> kernel, but with the elf header stripped off, so the entry point is at
> an offset of zero.
> 
> An interesting thing about our kernel is that it can be loaded at any
> 1MB boundary in physical memory, not just the address it was linked at.
> There's no way to represent that in an elf header.  This is true of both
> kernel and kernel.bin.

Ah, I think I made it work once when I set the KERNPHYS (or KERNVIRT?) to match the load address.

--
Rui Paulo





More information about the freebsd-arm mailing list