Subject: [E3-hacking] kernel compilaton question.

From: "David J. Singer" <[email-masked]>
Date: Mon, 1 May 2006 10:44:55 +0000

I'm having a little problem getting a hand-rolled kernel onto my E3 and 
wonderded if someone could just point me in the right direction.

I've downloaded the linux-2.6.16 sources, applied all the patches from
http://the.earth.li/pub/e3/2.6.16/  (aside: 07-ams-delta-defconfig fails for 
some reason so I had to do that one by hand!) then done a:
  make ams_delta_defconfig && make uImage

The 'uImage' that's produced has a load address of '0x10008000' and results in 
"Verifying Checksum ... Bad Data CRC" error when I try and flash the E3.

I suspect this load address is wrong. The pre-built kernel from the above URL 
has a load address of '0x11d00000'.

What am I doing wrong!?

Regards,

-- 
David J. Singer
[email-masked]
"Time flies like an arrow, fruit flies like a banana"

---

From: Jonathan McDowell <[email-masked]>
Date: Mon, 1 May 2006 10:52:01 +0100

On Mon, May 01, 2006 at 10:44:55AM +0000, David J. Singer wrote:
> I'm having a little problem getting a hand-rolled kernel onto my E3
> and wonderded if someone could just point me in the right direction.
> 
> http://the.earth.li/pub/e3/2.6.16/  (aside: 07-ams-delta-defconfig
> fails for some reason so I had to do that one by hand!) then done a:
> The 'uImage' that's produced has a load address of '0x10008000' and
> results in "Verifying Checksum ... Bad Data CRC" error when I try and
> flash the E3.

What do you mean "flash the E3"? Are you writing your kernel into the
NAND?

> I suspect this load address is wrong. The pre-built kernel from the
> above URL has a load address of '0x11d00000'.
> 
> What am I doing wrong!?

Generally you use pbltool to load whatever kernel image you've made to
0x11d00000. You then do "bootm 11d00000" in u-boot, which relocates the
kernel to the appropriate kernel load address and executes it. As such
there are 2 "load addresses"; one for where pbltool loads the kernel and
one for where u-boot loads it to. Which are you talking about?

J.

-- 
Does Barry Mannilow know you raid his wardrobe?
This .sig brought to you by the letter H and the number  2
Product of the Republic of HuggieTag

---

From: "David J. Singer" <[email-masked]>
Date: Mon, 1 May 2006 11:05:01 +0000

> one for where u-boot loads it to. Which are you talking about?

Good question!  I think the essence of the problem is that I don't really 
know! :)

I observed that, once the kernel had compiled, it told me the load address was 
0x10008000 thus:

    Image Name:   Linux-2.6.16-omap2
    Created:      Mon May  1 10:59:33 2006
    Image Type:   ARM Linux Kernel Image (uncompressed)
    Data Size:    1478848 Bytes = 1444.19 kB = 1.41 MB
    Load Address: 0x10008000 
    Entry Point:  0x10008000
      Image arch/arm/boot/uImage is ready

I assumed I needed to adjust the load address in the .pbl config accordingly:

    write 0x10008000 uImage-2.6.16-omap2
    write 0x11c00000 rootfs.arm.ext2-djs.gz
    write 0x11f00000 u-boot.bin
    exec 0x11f00000

then just do:

    bootm 10008000

But that's obviously wrong!  I've done something silly, haven't I.... :)

---

From: Jonathan McDowell <[email-masked]>
Date: Mon, 1 May 2006 11:05:14 +0100

On Mon, May 01, 2006 at 11:05:01AM +0000, David J. Singer wrote:
> I observed that, once the kernel had compiled, it told me the load
> address was 0x10008000 thus:
>

Sort of. The .pbl file should stay as 0x11d00000 and you should "bootm
11d00000". The kernel load of 0x10008000 gets written into the uImage
file so u-boot knows that's where the kernel needs to finally end up.

J.

-- 
noodles is concerned about the social wellbeing of

---

From: "David J. Singer" <[email-masked]>
Date: Mon, 1 May 2006 11:21:25 +0000

> file so u-boot knows that's where the kernel needs to finally end up.

OK. I tried that initially and I just got "Bad Magic Number".  

I assumed that was because I'd loaded the uImage in the wrong place.

---

From: Jonathan McDowell <[email-masked]>
Date: Mon, 1 May 2006 11:23:57 +0100

> I assumed that was because I'd loaded the uImage in the wrong place.

If your rootfs is more than 1M you'll get that as you'll overwrite the
kernel (at 0x11d00000) with the fs (at 0x11c00000). Either make the
initrd smaller or change the address you load it at.

J.

-- 
                          No... Don't stop...
      Ask me about server co-location - [email-masked]

---

From: "David J. Singer" <[email-masked]>
Date: Mon, 1 May 2006 11:39:31 +0000

> initrd smaller or change the address you load it at.

Ah! That's it!  I was so hung up on the kernel load address I didn't think of 
checking the rootfs!

Many thanks.