From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JfoqD-0005nU-7P for mharc-grub-devel@gnu.org; Sun, 30 Mar 2008 00:08:21 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JfoqA-0005mC-Oh for grub-devel@gnu.org; Sun, 30 Mar 2008 00:08:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jfoq8-0005lr-RR for grub-devel@gnu.org; Sun, 30 Mar 2008 00:08:17 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jfoq8-0005lo-Nk for grub-devel@gnu.org; Sun, 30 Mar 2008 00:08:16 -0400 Received: from c60.cesmail.net ([216.154.195.49]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1Jfoq8-0007TR-AN for grub-devel@gnu.org; Sun, 30 Mar 2008 00:08:16 -0400 Received: from unknown (HELO relay.cesmail.net) ([192.168.1.81]) by c60.cesmail.net with ESMTP; 30 Mar 2008 00:08:15 -0400 Received: from [192.168.1.21] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by relay.cesmail.net (Postfix) with ESMTP id 2A43F619058 for ; Sun, 30 Mar 2008 00:08:15 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <47EE2452.80304@nic.fi> References: <20080326220948.xw0fmregqocog0s0@webmail.spamcop.net> <1206631822.2380.2.camel@dv> <1206726009.20032.11.camel@dv> <47EE2452.80304@nic.fi> Content-Type: text/plain; charset=ISO-8859-1 Date: Sun, 30 Mar 2008 00:08:14 -0400 Message-Id: <1206850094.8818.15.camel@dv> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-3.fc8) Content-Transfer-Encoding: 8bit X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: Native CD test results X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2008 04:08:19 -0000 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