Hello, Louis Zammit Mangion <lzamm@phys.um.edu.mt> wrote: > [... netboot for x86 computer ...] > error: format > > From the code this means that an error was found in the compressed image. > Can't understand this since the loader uncompresses the standard kernel ok, > and the make process compresses the standard kernel ok too. This problem is due to different assembler versions generating different segment sizes. The rom loader, which decompresses the kernel image, expects the compressed image on a paragraph boundary, which worked with older versions of as86 and which also worked for the 386 loader by pure luck (the 386 loader has a size which is an exact multiple of 16 bytes ;-)) It's actually a bug in makerom which didn't check for the correct paragraph alignment. Below you will find a patch for the problem. Simply apply it to the file netboot/makerom/passes.c and recompile makerom. When you generate a bootrom with this new makerom program your x86-boot should work as expected. gero. --- passes.c Sat Jan 24 17:03:41 1998 +++ netboot/makerom/passes.c Sat Jan 24 16:56:18 1998 @@ -375,6 +375,11 @@ if ((len = doread(inbuf, BLKSIZE, infile)) == 0) break; } close(infile); + if ((writecnt & 0x0f) != 0) { + /* The kernel image has to start at a paragraph boundary */ + memset(inbuf, 0, 16); + writecnt += dowrite(inbuf, 16 - (writecnt & 0x0f), outfile); + } /* Next copy the kernel image into the output file */ romlength = freeze(kernfile, outfile); -- Unix: it's a nice place to live, but you wouldn't want to visit there. -- Gero Kuhlmann, Hannover 0511/6497525 (Voice) gero@gkminix.han.de
For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.