Fwd: FreeBSD booting freescale P1020wlan eval board, via u-boot?

Aleksander aleek at FreeBSD.org
Wed Apr 3 20:39:16 UTC 2013


On Wed, Apr 3, 2013 at 9:20 PM, John Clark <jeclark2006 at aim.com> wrote:

>
> On Apr 3, 2013, at 12:04 PM, Aleksander wrote:
>
> > please attach some output, maybe I could help.
> >
> > The booke_init() function has a bug, which is not yet fixed in HEAD.
> >
> > Anyway, you need to use kernel image (not ubldr) either binary or elf
> (if elf, you need to jump with offset to __start function
>
> objdump lists the entry point for the ELF as, C0001000.
>
> So, I used the following u-boot command
>
> tftp 1000 kernel-freebsd.bin
>
> go 1000
>
No no:)
Elf formated binary contains (shortly)
- elf header
- the code

So, you load binary at addres X, but you need to add some offset to the
very first instruction of __start() function. Since powerpc's freebsd
kernel likes to be loaded at address 0x1000000 (16th megabyte), load it at
this addr:
tftp 0x1000000 kernel.elf
and start kernel at first instruction of __start()
go 0x1001000

If you want to use raw binary, do the following:
tftp 0x1000000
go 0x1000000


>
> With the presumption that the init code uses PC relative jumps/calls until
> the MMU is setup enough to resolve to the correct addresses of C0001000,
> which is what NM reports as the entry point for __start.
>
> The result is 'nothing' on the serial console output...
>
> The thought there is that the kernel is not using my p1020wlan FDT file,
> but I did use the following:
>
> options FDT_DTB_STATIC


> Which I presume would statically link the FDT file into the kernel.
>
that correct

>
> The Linux that I use can use an external FDT 'file' which is save in Flash
> memory. However, that requires the u-boot boot command to pass the FDT
> location.
>
> Anyway, any clarifying notes would be helpful.
>
> Thanks,
> John Clark.
>
>
Please attach your fatal trap error message, so I could help you more :)

-- 
regards
aleek


More information about the freebsd-ppc mailing list