Skip to contentSkip to conversation

Can we drop I386 specific hack from do_bootm()?

U-Boot-Users Bartlomiej Sieka 1 participant 2 messages Dec 19, 2007 – Dec 27, 2007

lore
Share & tools
lore
#0 lore raw

Hello,

While working on adapting do_bootm() to new uImage format, I've came across this I386-specific hack:

#ifdef __I386__ /* correct image format not implemented yet - fake it */
                 if (fake_header(hdr, (void*)addr, -1) != NULL) {
                         /* to compensate for the addition below */
                         addr -= sizeof(image_header_t);
                         /* turnof verify,
                          * fake_header() does not fake the data crc
                          */
                         verify = 0;
                 } else

#endif /* __I386__ */

It looks like I386 targets provide the kernel as an zImage, instead of an uImage, and this special case is needed to add a faked uImage header, so that the rest of the booting code works without modification.

How about dropping this hack altogether? This would make the code cleaner, but would require I386 targets (sc520_cdp, sc520_spunk) to use kernels in uImage format.

What do people think? What is the opinion of the maintainer of the affected platforms (Daniel Engstr?m, copied)?

Regards,
Bartlomiej

#1 lore raw

Bartlomiej Sieka wrote:
[...]

Quoted 2 lines

While working on adapting do_bootm() to new uImage format, I've came across this I386-specific hack:

[...]

Quoted 6 lines

How about dropping this hack altogether? This would make the code cleaner, but would require I386 targets (sc520_cdp, sc520_spunk) to use kernels in uImage format.

What do people think? What is the opinion of the maintainer of the affected platforms (Daniel Engstr?m, copied)?

Just a quick update: Daniel's email address given in MAINTAINERS is no longer actual, so he's not likely to voice his opinion... Anybody else would like to comment?

Regards,
Bartlomiej