On Sat, 2008-03-29 at 13:13 +0200, Vesa Jääskeläinen wrote: > Yeah... I noticed that too when I was playing with IDT's some time ago > and Bean found out the reason. I think we need to update this so that it > will never happen. Perhaps divide code to sections or so? We could > provide this in LD variable... hmm... I could investigate what would be > required for it... Good place to learn more about LD scripts.
If I understand correctly, kernel.img is a binary, so grub-mkimage won't be able to get any linker data. I think we could use one of the fields in the beginning of startup.S to store the size of the part that should not be compressed. For instance, grub_compressed_size could be used for that, and grub-mkimage read it, use it instead of GRUB_KERNEL_MACHINE_RAW_SIZE and then replace it with the value it would normally put there. That's the change in startup.S --- kern/i386/pc/startup.S +++ kern/i386/pc/startup.S @@ -91,7 +91,7 @@ VARIABLE(grub_kernel_image_size) .long 0 VARIABLE(grub_compressed_size) - .long 0 + .long grub_stop - _start VARIABLE(grub_install_dos_part) .long 0xFFFFFFFF VARIABLE(grub_install_bsd_part) Of course, we could put another label next to grub_stop with a more descriptive name, like grub_uncompressed_end. lnxboot.S needs to be changed to remove GRUB_KERNEL_MACHINE_RAW_SIZE as well. I don't understand at the first glance why lnxboot.S needs it. Perhaps it could be calculated in a different way. -- Regards, Pavel Roskin _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel