[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to increase commandline size (fwd)
From: |
Jeff Chua |
Subject: |
Re: how to increase commandline size (fwd) |
Date: |
Tue, 10 Oct 2006 08:45:15 +0800 (SGT) |
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 <asm/param.h>
+
#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 <grub/cpu/linux.h>
#include <grub/machine/kernel.h>
#include <grub/machine/multiboot.h>
+#include <asm/param.h>
#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
- Re: how to increase commandline size (fwd),
Jeff Chua <=
- Re: how to increase commandline size (patch + changelog), Jeff Chua, 2006/10/09
- Re: how to increase commandline size (patch + changelog), Hollis Blanchard, 2006/10/09
- Re: how to increase commandline size (patch + changelog), Marco Gerards, 2006/10/10
- Re: how to increase commandline size (patch + changelog), Jeff Chua, 2006/10/10
- Re: how to increase commandline size (patch + changelog), Markus Laire, 2006/10/10
- Re: how to increase commandline size (patch + changelog), Marco Gerards, 2006/10/10