From: Brett J. <br...@us...> - 2007-07-20 00:29:00
|
On Thu, 2007-07-19 at 17:00 -0700, Dave Jiang wrote: > Can you tell me what the legacy-free line does in elilo? Oh wow, it looks like there are some provisions for dealing with the 16-bit boot wrapper. If it isn't obvious yet, I know very little about elilo's ia32 code, as I didn't write any of it :o). Anyway, here's the relevant code: http://elilo.cvs.sourceforge.net/elilo/elilo/ia32/sysdeps.h?revision=1.2&view=markup 364 if (! ia32_use_legacy_free_boot()) { 365 366 /* 367 * Copy our real mode transition code to 0x7C00. 368 */ 369 370 MEMCPY(0x7C00, rmswitch_image, rmswitch_size); 371 372 asm volatile ( "movl $0x7C00, %%ebx" : : ); 373 asm volatile ( "jmp *%%ebx" : : ); 374 } > Interestingly, all the booting linux on intel-mac documentations I've seen says > cp bzImage vmlinuz. That makes it very confusing since I've yet to get bzImage > work.... I've only gotten vmlinux and gzip'd vmlinux working so far. Under what > situation is the legacy-free line not needed? Well, from that code, it looks like "legacy-free" == "no 16-bit boot wrapper", but what do I know? :o) > Here's the result of trying to use vmlinux.bin. Kind of interesting that > there's bzimage.c. That's from elilo right? Yes. http://elilo.cvs.sourceforge.net/elilo/elilo/ia32/bzimage.c?revision=1.1&view=markup > Well, it would be nice if elilo can boot vmlinux.bin.gz, which is the gzip'd > binary of vmlinux. It does not have the 16bit boot wrapper. Otherwise one has > to manually strip the vmlinux and then gzip it.... After looking through the ia32 code, it looks like it was intended to support booting a "stock" bzimage. I honestly don't know if the code is incomplete, or just has bugs. > But at least the good news is that after I manually stripped vmlinux and > compressed it, it boots, and it's a small image as expected. :) Well, that's good at least :o) -- Brett Johnson <br...@us...> |