onion omega2+
Mike Wolman
mike at wolman.co.uk
Wed May 10 23:39:43 UTC 2017
Hi Adrian,
I am making the uImage from the kernel generated in tfpboot after the
freebsd-wifi-build script is complete.
I had an issue with a compressed kernel with an lzma error so with help
we jumped past that and have got a kernel to boot from a binary with:
objcopy -O binary kernel.MT7628_FDT kernel.MT7628_FDT.bin
and then on the omega just "go 0x80001100" but am unable to get "bootm
0x80001100" working from uboot image still.
I am trying to get the complete wifi build so I have a filesystem and
kernel image so was just following what I could find/understand in the
wifi build stuff.
My current problem is I am not up on the hex address stuff and cannot
workout what the correct load address should be for the u-boot image eg:
mkimage -A mips -O linux -T kernel -C none \
-a 0x80000C00 -e 0x80001100 \
-n "FreeBSD" -d kernel.MT7628_FDT kernel.MT7628_FDT.uImage
From my searching i see it is also related to the file size so have
tried various combinations but just am not getting further.
So info on the kernel:
-r-xr-xr-x 1 mike mike 5623376 May 10 20:49 kernel.MT7628_FDT
[mike at f64-current ~/omega2/tftpboot]$ readelf -h kernel.MT7628_FDT
ELF Header:
Magic: 7f 45 4c 46 01 01 01 09 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: FreeBSD
ABI Version: 0
Type: EXEC (Executable file)
Machine: MIPS R3000 Big-Endian only
Version: 0x1
Entry point address: 0x80001100
Start of program headers: 52 (bytes into file)
Start of section headers: 5622096 (bytes into file)
Flags: 0x50001001, mips32, o32, noreorder
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 6
Size of section headers: 40 (bytes)
Number of section headers: 32
Section header string table index: 29
Also just to clarify - when using fatload the address i should use
should NOT be the load or entry address ie use something like:
fatload usb 0:1 0x80800000 kernel.MT7628_FDT.uImage
bootm 0x8000XXXXX
Where0x8000XXXXX is the load address?
Thanks
Mike.
On 11/05/2017 00:20, Adrian Chadd wrote:
> Hi,
>
> Ah, you're doing XIP. I haven't done XIP before; i typically just
> generate a normal image and give it a separate load address 16MB or
> something into physical memory so I don't overwrite it.
>
> Ie, when you use mkimage to create a uboot application, you provide it
> /both/ a load address and a run address. So, eg, for MIPS we do this:
>
> * load: 0x80050000
> * run: 0x80050100
>
> .. the 256 bytes is space for the ELF header. And in the std.AR*
> files, we specify the run address is 0x80050100 to ensure it all lines
> up.
>
> Then to bootm i load it somewhere else away from that load address, so
> it gets copied to the right spot and run.
>
>
>
> -adrian
More information about the freebsd-mips
mailing list