Messages in this thread | | | From | "Khimenko Victor" <> | Date | Fri, 14 Jul 2000 06:37:41 +0400 (MSD) | Subject | Re: Bug in kernel - how to make big kernel bootable with GRUB (was Re: Linux 2.4.0-Test{1,2} with Grub (I think I found the answer)) |
| |
In <Pine.LNX.4.10.10007131739430.810-100000@penguin.transmeta.com> Linus Torvalds (torvalds@transmeta.com) wrote:
> On Fri, 14 Jul 2000, Khimenko Victor wrote: >> >> Huh. Patch is trivial. Really trivial. Just one problem: I do not think it'll >> be applied. Since it's TWO patches: one for kernel and one for GRUB.
> Actually, the only problem with the patch is that it is not > byte-order-safe, which means that you cannot cross-compile from a > big-endian host.
Ah. I forgot about this :-( Sorry.
> I don't see any real problem in extending syssize to be 4 bytes, as the > two ne wbytes that it writes over are the "swap_dev" bytes that I don't > think anybody ever used. We might as well get rid of them. And thanks to > being little-endian, it would not change for loaders that don't know about > the new 4-byte format (the two low bytes are still the same).
> So I won't apply the patch as-is, but fix it to be endian-safe and get > some input from other bootloaders (assuming they all agree that swap_dev > is a non-issue - which I think they will) and I _will_ apply it.
Big thnx.
>> Who's the bright idea was to extend maximum kernel beyond 1MB and STILL write >> only two bytes of sys_size in boot sector anyway ? And why it was done via >> buf in first place ?
> I'd be careful about calling other people stupid if you don't understand > the code.
Ok, part about buf was my stupidity, I agree here. But about extending sys_size it WAS NOT. Some other "bright" soul changed code so sys_size bigger then $FFFF will be accepted and not done anything about two byte field where sys_size is stored in the end. THAT can be called stupid, no?
> Using "buf" the way the code used it meant that people whose native > byte-order was big-endian would still be able to build images. Performance > was never a big issue here, so it works fine. It may not be pretty, but I > doubt beauty was a big issue either ;)
Agree 100%.
> The field never got extended because nobody really needed it extended. > That's as simple as it can get, no?
No. When you have field 2 bytes in size and you want to store there number bigger than $FFFF you MUST increase field. Otherwise what's the point ? I'm little surprised nobody noticed it for so long :-(
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |