Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kernel loading

On 11/11/2018 11:57, Robert Swindells wrote:
Nick Hudson <nick.hudson%gmx.co.uk@localhost> wrote:
On 11 Nov 2018, at 11:01, Robert Swindells <rjs%fdy2.co.uk@localhost> wrote:
Nick Hudson <nick.hudson%gmx.co.uk@localhost> wrote:
On 10/11/2018 19:45, Robert Swindells wrote:

How is loading and running of a 32-bit kernel by u-boot expected to
work ?

I have copied std.generic and mk.generic to use with fdt zynq sources.

The kernel_noload flag to mkubootimage(1) looks to make u-boot execute
the kernel in place. What address should I load netbsd.ub at ?
your uboot "should" have a kernel_addr_r and a fdt_addr_r variable for
where it'll load the kernel and FDT.  The kernel should be aligned to a
least L1_S_SIZE (10x00100000).  I guess your old u-boot doesn't.


The netbsd.ub is loaded at the aligned address with the header and the
code is straight after the header, ie. at an offset of 64 bytes.
Ok, thanks.

I have got further by using -T kernel for the u-boot image with it
linked at the second L1 boundary.

Your uboot doesn’t understand kernel_noload?
I seems to treat kernel_noload as an instruction to not copy the kernel
to the load address that is in the header.

That's exactly the point.

uboot loads the kernel_noload image at its choice of PA which needs to be L1_S_SIZE aligned for us.  The generic start code works out PA and creates the appropriate mappings.

I tried explicitly loading netbsd.ub at 0x0 but that caused the panic
from arm_bad_vtopdiff.

If RAM starts at 0x0 and isn't used by uboot that should be fine.

What's the full debug output here?

Maybe we will need a PARALLELLA kernel as well as ZYNQ or GENERIC with
them built from the same sources but linked at different addresses.
I’ll look to see if there’s a way to get a kernel_noload and a kernel
uboot image with a best fit load address.
Which comes back to my question on what is supposed to happen at boot

The kernel that I have now is booting fine.

See above? I'm a bit confused what you're asking.


Home | Main Index | Thread Index | Old Index