Skip to contentSkip to conversation

XIP question

U-Boot-Users Jim Potter 2 participants 2 messages Feb 28, 2003 – Mar 1, 2003

lore
Share & tools
lore

Jim Potter

author
#0 lore raw

I've got a u-boot question -- even though I've been tracking it down in the ppcboot-2.0.0 sources (they're very close). Perhaps my copy of mkimage is doing the wrong thing, but I've noticed that ppcboot-2.0.0 fails to strip the header from an uncompressed kernel image, when the entire image (header and all) is placed at the desired execution address. This traces down to this area of do-bootm:

    case IH_COMP_NONE:
        if (hdr->ih_load == addr)
            printf ("   XIP %s ... ", name);

In my case, the image (with header) is loaded at addr 0, and hdr->ih_load points to the header start at addr 0 (not the data start at addr 0x40). Is ih_load supposed to point to the start of the header, or the start of the data? If it points to the header, then we may want to do this instead:

    case IH_COMP_NONE:
        if (data == addr)
            printf ("   XIP %s ... ", name);

Again, it's also possible that ih_load points to the wrong thing.

--
Sincerely,

Jim Potter
45th Parallel Processing, Inc.

Volunteer Firefighting: Bustin' ours, Savin' yours.

#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

I've got a u-boot question -- even though I've been tracking it down in the ppcboot-2.0.0 sources (they're very close). Perhaps my copy of mkimage is doing the wrong thing, but I've noticed that ppcboot-2.0.0

... perhaps your usage of mkimage is wrong?

Quoted 7 lines

fails to strip the header from an uncompressed kernel image, when the entire image (header and all) is placed at the desired execution address. This traces down to this area of do-bootm:

    case IH_COMP_NONE:
        if (hdr->ih_load == addr)
            printf ("   XIP %s ... ", name);

If you run into the execute-in-place part of the code unintentio- nally, then I bet a case of beer that you're passing invalid para- meters to mkimage.

Quoted 1 line

Again, it's also possible that ih_load points to the wrong thing.

It's more likely that you see the effects of wrong usage, I think.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
And now remains  That we find out the cause of this effect, Or rather
say, the cause of this defect...           -- Hamlet, Act II, Scene 2