Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GXBLd-0000Tr-Va for mharc-grub-devel@gnu.org; Tue, 10 Oct 2006 02:44:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GXBLc-0000TZ-Ji for grub-devel@gnu.org; Tue, 10 Oct 2006 02:44:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GXBLb-0000TM-69 for grub-devel@gnu.org; Tue, 10 Oct 2006 02:44:16 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GXBLb-0000TJ-2F for grub-devel@gnu.org; Tue, 10 Oct 2006 02:44:15 -0400 Received: from [194.109.24.21] (helo=smtp-vbr1.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GXBTJ-0007hD-Ib for grub-devel@gnu.org; Tue, 10 Oct 2006 02:52:13 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr1.xs4all.nl (8.13.8/8.13.8) with ESMTP id k9A6i5JQ098292; Tue, 10 Oct 2006 08:44:10 +0200 (CEST) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <1160447238.29722.4.camel@diesel> <1160454731.32244.6.camel@diesel> Mail-Copies-To: mgerards@xs4all.nl Date: Tue, 10 Oct 2006 08:52:28 +0200 In-Reply-To: <1160454731.32244.6.camel@diesel> (Hollis Blanchard's message of "Mon, 09 Oct 2006 23:32:11 -0500") Message-ID: <87ejtg1x3n.fsf@xs4all.nl> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner 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 06:44:16 -0000 Hollis Blanchard writes: > On Tue, 2006-10-10 at 11:08 +0800, Jeff Chua wrote: >> On Mon, 9 Oct 2006, Hollis Blanchard wrote: >> >> >> +#include >> > >> > 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 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