Re: [Etherboot-developers] [COMMIT] 5.1.2+ boot from disk.
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Michael B. <mb...@fe...> - 2002-08-30 10:02:05
|
On Fri, 30 Aug 2002, Michael Brown wrote:
> > O.k. so we have an image with overlapping segments. The tagged image
> > specification does not mention them. As the order of processing
> > the segments is not clearly defined we have an undefined case in
> > the tagged image specification.
> > It is quite reasonable to forbid overlapping segments, in etherboot
> > because it makes no sense to put complicated logic into a network
> > bootloader, and it makes even less sense to rely on complicated
> > logic being present. The ELF spec even forbids it for normal
> > executables.
> > Given that there are bad images out there, putting detection
> > of them into prep_segment sounds like the only reasonable option.
> > I only did not do it the first time because the logic seemed
> > complicated, and unneeded. If the logic gets hary we can compile it
> > out.
> > Also mknbi needs to be fixed to generate valid images.
> These are bad images that work with Etherboot 5.0.x, however. I think it
> would be best to try to ensure that any image that worked with Etherboot
> 5.0.x also works with 5.1.x.
> > A quick fix that we can use to verify that everything else
> > is working is to comment out the memset in prep_segment.
> Already tried this and it gets one stage further. There's still one
> (hopefully final) obstacle: although the image is now loaded correctly, it
> never gets executed because tagged_download() never gets called after EOF.
> Under 5.0.x, os_download() got called one final time after EOF. Have
> re-added this code to osloader.c and am in process of testing and checking
> in...
OK, it works. I can now boot a full Linux kernel from EB 5.1.x, using the
same image as for EB 5.0.x. Have checked in two changes to osloader.c,
both of which I'm not 100% sure about:
1. The BSS is no longer zeroed, in order to avoid vapourising the NBI
header.
Q: How important is it to zero the BSS? Linux seems to boot fine
without it, haven't tried anything else.
2. When load_block() is called with eof=1, os_download() gets called
twice: once with the normal data block and once more as
os_download(NULL,0,eof). This is how tagged_download() expects to be
used.
Q: Will this break the other *_download() routines?
Michael Brown
http://www.fensystems.co.uk
|