grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to increase commandline size (patch + changelog)


From: Marco Gerards
Subject: Re: how to increase commandline size (patch + changelog)
Date: Tue, 10 Oct 2006 08:52:28 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Hollis Blanchard <address@hidden> writes:

> On Tue, 2006-10-10 at 11:08 +0800, Jeff Chua wrote:
>> On Mon, 9 Oct 2006, Hollis Blanchard wrote:
>> 
>> >> +#include <asm/param.h>
>> >
>> > I don't think this is a good idea because it requires we build on a
>> > Linux host.
>> 
>> Shall I use '#ifdef __linux__' to include <asm/param.h> only on linux, and
>> '#define COMMAND_LINE_SIZE 255' for non-linux system?
>
> Well, does this number change often? If not, let's just copy it.
>
> If so, then we're screwed anyways because asm/param.h would only match
> the installed kernel's limit, so may not work for other kernel versions.
> In that case, let's just copy it and shrink it in a "lowest common
> denominator" approach.

Isn't it possible to use the kernel binary to determine this?  For
example, is the maximum commandline size stored somewhere?  Perhaps,
we can determine it by looking at some version field?  According to
the documentation it is has a maximum length of 255 bytes for every
Linux version:

"The kernel command line is a null-terminated string up to 255
characters long, plus the final null."

I don't want the loader to rely on being compiled on GNU/Linux.  GRUB
2, when compiled on *BSD, should be capable of loading Linux just as
GRUB 2 compiled on GNU/Linux would.

--
Marco





reply via email to

[Prev in Thread] Current Thread [Next in Thread]