Date: Thu, 11 May 2017 00:39:37 +0100 From: Mike Wolman <mike@wolman.co.uk> To: Adrian Chadd <adrian@freebsd.org> Cc: Aleksandr Rybalko <ray@ddteam.net>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: onion omega2+ Message-ID: <b6ed3751-c1dc-469e-45f0-7fa249fb0bf6@wolman.co.uk> In-Reply-To: <CAJ-VmokjK-ehABi7nASMwLuVbeBnZ_fYDLfKjTiCSq3ojPuEBg@mail.gmail.com> References: <694efc3a-e183-35a1-a0bf-9a9c0d708826@wolman.co.uk> <39222.11970.qm@web101719.mail.ssk.yahoo.co.jp> <6f1b2d35-5d17-765a-6138-0ab85455fc09@wolman.co.uk> <5866.49154.qm@web101718.mail.ssk.yahoo.co.jp> <102de390-63ca-a156-2208-bea3d5eea0f9@wolman.co.uk> <541011.41820.qm@web101719.mail.ssk.yahoo.co.jp> <672be258-8fed-6317-1325-f9fccf2646c3@wolman.co.uk> <369335.16286.qm@web101716.mail.ssk.yahoo.co.jp> <711a889d-9701-2441-5c9c-98e0ac607ffb@wolman.co.uk> <456721.9572.qm@web101705.mail.ssk.yahoo.co.jp> <8b21a15c-3af8-bdba-cc70-6bd0e3a65f39@wolman.co.uk> <05065E4E-1D0F-49DE-B14D-D45ECCEA251F@gmail.com> <2b8211f6-9f42-0f11-678f-a2ed830b2430@wolman.co.uk> <AE3AB870-6C1F-4BCC-B8A6-B3FA49E8FE10@gmail.com> <a8b9fd4e-6eef-740a-166a-a611b0f133e5@wolman.co.uk> <CAJ1Oi8Eo3jWAy1nRO1auT03zcXBzdxtnqv=9JytyP6GU8yXWGg@mail.gmail.com> <b1892083-81ce-aa99-045b-e8fd83a71c7e@wolman.co.uk> <CAJ-VmokjK-ehABi7nASMwLuVbeBnZ_fYDLfKjTiCSq3ojPuEBg@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
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@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
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b6ed3751-c1dc-469e-45f0-7fa249fb0bf6>
