Re: [PATCH] Compressed ia32 ELF file generation for loading by Gujin 1/3

H. Peter Anvin
2007-02-06T15:50:21Z

Eric W. Biederman wrote:
>
> Just for documentation the current interface is you come in through
> the kernels 16bit entry point and get all of it's BIOS calls, or your
> bootloader is responsible for getting the equivalent information
> somehow.
>
> From what little I skimmed part of what Gujin wanted to do was sane
> at first glance. Just boot a gziped vmlinux like the other
> architectures. The problem was the 16bit code.
>
> So there may be some good ideas buried in there somewhere, but it
> likely to take some doing, and patches that I have to save before
> I read them are a real pain!
>

Actually, as far as I can see, he has re-invented having a real-mode
code chunk which then gets run before the protected-mode kernel. We
already have that! You can even intercept between running real-mode and
protected-mode if you really want to.

I don't really see anything new here. The one thing that he does which
we might want to consider emulating is writing the real-mode code in C.
Right now, the assembly code is very cluttered, and with the size
limit having been, long ago, raised from 2K to 32K we should be able to
fit a fair bit of code even if we use C.

-hpa