Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GX5kh-0007Un-Ue for mharc-grub-devel@gnu.org; Mon, 09 Oct 2006 20:45:47 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GX5kg-0007UC-5o for grub-devel@gnu.org; Mon, 09 Oct 2006 20:45:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GX5kd-0007Sr-8X for grub-devel@gnu.org; Mon, 09 Oct 2006 20:45:45 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GX5kd-0007Sn-2y for grub-devel@gnu.org; Mon, 09 Oct 2006 20:45:43 -0400 Received: from [199.81.195.17] (helo=mx15.sac.fedex.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GX5sI-00087m-6H for grub-devel@gnu.org; Mon, 09 Oct 2006 20:53:38 -0400 Received: from inet04.prod.fedex.com (inet04.prod.fedex.com [199.81.10.44]) by mx15.sac.fedex.com (8.13.6/8.13.6) with ESMTP id k9A0jcu9040508 for ; Mon, 9 Oct 2006 19:45:38 -0500 (CDT) (envelope-from jeff84@silk.corp.fedex.com) Received: from entpm11.apac.fedex.com (entpm11.apac.fedex.com [155.161.92.11]) by inet04.prod.fedex.com (8.12.11/8.12.11) with ESMTP id k9A0jaMd005655; Mon, 9 Oct 2006 19:45:37 -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 2006101008453495:2713 ; Tue, 10 Oct 2006 08:45:34 +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 k9A0hCZH011737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 10 Oct 2006 08:43:13 +0800 Date: Tue, 10 Oct 2006 08:45:15 +0800 (SGT) From: Jeff Chua X-X-Sender: root@boston.corp.fedex.com To: Grub Devel Message-ID: MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 10/10/2006 08:45:34 AM, Serialize by Router on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 10/10/2006 08:45:37 AM, Serialize complete at 10/10/2006 08:45:37 AM Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Jeff Chua Subject: Re: how to increase commandline size (fwd) 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 00:45:46 -0000 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