Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GX61t-0008OG-3N for mharc-grub-devel@gnu.org; Mon, 09 Oct 2006 21:03:33 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GX61r-0008Nj-ML for grub-devel@gnu.org; Mon, 09 Oct 2006 21:03:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GX61p-0008NF-Vq for grub-devel@gnu.org; Mon, 09 Oct 2006 21:03:30 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GX61p-0008NA-UG for grub-devel@gnu.org; Mon, 09 Oct 2006 21:03:29 -0400 Received: from [199.81.197.53] (helo=mx13.sac.fedex.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GX69V-0001e7-4w for grub-devel@gnu.org; Mon, 09 Oct 2006 21:11:25 -0400 Received: from inet10.prod.fedex.com (inet10.prod.fedex.com [199.81.10.231]) by mx13.sac.fedex.com (8.13.6/8.13.6) with ESMTP id k9A13RcE024521 for ; Mon, 9 Oct 2006 20:03:28 -0500 (CDT) (envelope-from jeff84@silk.corp.fedex.com) Received: from entpm11.apac.fedex.com (entpm11.apac.fedex.com [155.161.92.11]) by inet10.prod.fedex.com (8.12.11/8.12.11) with ESMTP id k9A13OwU007245; Mon, 9 Oct 2006 20:03:25 -0500 (CDT) Received: from indiana.corp.fedex.com ([155.161.156.89]) by entpm11.apac.fedex.com (Lotus Domino Release 5.0.8) with ESMTP id 2006101009032330:2738 ; Tue, 10 Oct 2006 09:03:23 +0800 Received: from [155.161.115.28] ([155.161.115.28]) by indiana.corp.fedex.com (8.13.5/8.13.5) with ESMTP id k9A110dZ014087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Oct 2006 09:01:01 +0800 Date: Tue, 10 Oct 2006 09:03:04 +0800 (SGT) From: Jeff Chua X-X-Sender: root@boston.corp.fedex.com To: The development of GRUB 2 In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 10/10/2006 09:03:23 AM, Serialize by Router on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 10/10/2006 09:03:25 AM, Serialize complete at 10/10/2006 09:03:25 AM Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Jeff Chua Subject: Re: how to increase commandline size (patch + changelog) 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: Tue, 10 Oct 2006 01:03:31 -0000 On Tue, 10 Oct 2006, Jeff Chua wrote: Here's with ChangeLog included. > On Sun, 8 Oct 2006, Marco Gerards wrote: > >>> It seems to stop at 256 characters counting the input length >> >> That's weird. Could you please have a look at loader/i386/pc/linux.c >> to see if it gets the entire line or just a part. Perhaps this >> limitation is in the protocol used to pass the command line to Linux, >> I don't this protocol. > > Marco, > > I managed to trace down the limitation to GRUB_LINUX_CL_END_OFFSET. > This limits to 255 characters. I've expanded to 1536 and it seems ok. > I've modified the code to rely on COMMAND_LINE_SIZE defined in the kernel. > > ps. Marco had requested that I post this to the mailing list so that you all > can help verify this is ok. > > > Here's the patch ... > > Thanks for your help, > > Jeff. > --- grub2/include/grub/i386/linux.h.org 2006-10-10 01:06:33 +0800 +++ grub2/include/grub/i386/linux.h 2006-10-10 01:07:54 +0800 @@ -17,6 +17,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include + #ifndef GRUB_LINUX_MACHINE_HEADER #define GRUB_LINUX_MACHINE_HEADER 1 @@ -41,8 +43,9 @@ #define GRUB_LINUX_VID_MODE_ASK 0xFFFD #define GRUB_LINUX_CL_OFFSET 0x9000 -#define GRUB_LINUX_CL_END_OFFSET 0x90FF -#define GRUB_LINUX_SETUP_MOVE_SIZE 0x9100 +#define GRUB_LINUX_CL_END_OFFSET \ + (GRUB_LINUX_CL_OFFSET + COMMAND_LINE_SIZE) +#define GRUB_LINUX_SETUP_MOVE_SIZE (GRUB_LINUX_CL_END_OFFSET + 1) #define GRUB_LINUX_CL_MAGIC 0xA33F #define GRUB_LINUX_EFI_SIGNATURE \ --- grub2/kern/i386/pc/startup.S.org 2006-10-10 01:05:30 +0800 +++ grub2/kern/i386/pc/startup.S 2006-10-10 01:05:45 +0800 @@ -51,6 +51,7 @@ #include #include #include +#include #define ABS(x) ((x) - EXT_C(start) + GRUB_BOOT_MACHINE_KERNEL_ADDR + 0x200) @@ -760,7 +761,7 @@ /* copy the real mode code */ movl EXT_C(grub_linux_tmp_addr), %esi movl %ebx, %edi - movl $GRUB_LINUX_SETUP_MOVE_SIZE, %ecx + movl $(GRUB_LINUX_CL_OFFSET + COMMAND_LINE_SIZE + 1), %ecx cld rep movsb --- grub2/Makefile.org 2006-10-10 01:05:59 +0800 +++ grub2/Makefile 2006-10-10 01:06:06 +0800 @@ -61,7 +61,7 @@ -DGRUB_LIBDIR=\"$(pkglibdir)\" TARGET_CC = gcc TARGET_CFLAGS = -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -Os -falign-jumps=1 -falign-loops=1 -falign-functions=1 -TARGET_CPPFLAGS = -I. -Iinclude -I$(srcdir)/include \ +TARGET_CPPFLAGS = -I/usr/include -I. -Iinclude -I$(srcdir)/include \ -Wall -W TARGET_LDFLAGS = OBJCOPY = objcopy --- grub2/ChangeLog.org 2006-10-10 08:46:03 +0800 +++ grub2/ChangeLog 2006-10-10 08:59:49 +0800 @@ -1,3 +1,14 @@ +2006-10-10 Jeff Chua + + * grub2/include/grub/i386/linux.h + (GRUB_LINUX_CL_END_OFFSET): determined from COMMAND_LINE_SIZE + (GRUB_LINUX_SETUP_MOVE_SIZE): Likewise. + + * grub2/kern/i386/pc/startup.S (grub_linux_boot_bzimage): + Calculate command line offset based on COMMAND_LINE_SIZE + + * grub2/Makefile: /usr/include added to locate + 2006-10-05 Tristan Gingold * kern/misc.c (grub_strtoull): Guess the base only if not