Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JJnka-0008HS-NW for mharc-grub-devel@gnu.org; Tue, 29 Jan 2008 05:31:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJnkY-0008G8-2p for grub-devel@gnu.org; Tue, 29 Jan 2008 05:31:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJnkX-0008FB-Bp for grub-devel@gnu.org; Tue, 29 Jan 2008 05:31:29 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJnkX-0008Ef-2h for grub-devel@gnu.org; Tue, 29 Jan 2008 05:31:29 -0500 Received: from smtp8-g19.free.fr ([212.27.42.65]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JJnkW-0006Ia-J2 for grub-devel@gnu.org; Tue, 29 Jan 2008 05:31:28 -0500 Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id 7272A17F559; Tue, 29 Jan 2008 11:31:24 +0100 (CET) Received: from imp6-g19.free.fr (imp6-g19.free.fr [212.27.42.6]) by smtp8-g19.free.fr (Postfix) with ESMTP id 4C41A17F518; Tue, 29 Jan 2008 11:31:24 +0100 (CET) Received: by imp6-g19.free.fr (Postfix, from userid 33) id D51D742BA; Tue, 29 Jan 2008 11:31:21 +0100 (CET) Received: from dhcp-guest.act-europe.fr (dhcp-guest.act-europe.fr [212.99.106.127]) by imp.free.fr (IMP) with HTTP for ; Tue, 29 Jan 2008 11:31:21 +0100 Message-ID: <1201602681.479f00799cde3@imp.free.fr> Date: Tue, 29 Jan 2008 11:31:21 +0100 From: tgingold@free.fr To: The development of GRUB 2 , Robert Millan References: <20080128160905.GA2739@saphi> <20080128165504.GB9715@thorin> <20080129051252.GA2504@saphi> <20080129091736.GG30048@thorin> In-Reply-To: <20080129091736.GG30048@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 User-Agent: Internet Messaging Program (IMP) 3.2.8 X-Originating-IP: 212.99.106.127 Content-Transfer-Encoding: quoted-printable X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Cc: The development of GRUB 2 Subject: Re: IA64 port 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, 29 Jan 2008 10:31:30 -0000 Quoting Robert Millan : > On Tue, Jan 29, 2008 at 06:12:52AM +0100, Tristan Gingold wrote: > > > Have you checked if this trick works on other ports? Maybe it'd be= a > good idea > > > to merge this first. > > > > I don't really understand what do you mean by 'works on other ports'.= It > is > > designed to be an optionnal feature used only by ia64. Nothing IA64 > specific > > and other ports may use it. If we go this way, it would be good to > slightly > > improve it. > > I suggest you just make sure it'll be usable on other ports in case a n= eed > arises, without going out of your way to support it. Sure. I won't forget other ports. Anyway, there shouldn't be arch speci= fic code in this trick. > > > > +GRUB_MOD_INIT(linux_normal) > > > > +{ > > > > + (void) mod; /* To stop warning. */ > > > > + grub_register_command > > > > + ("linux", grub_normal_linux_command, > > > > + GRUB_COMMAND_FLAG_BOTH | GRUB_COMMAND_FLAG_NO_ARG_PARSE, > > > > + "linux FILE [ARGS...]", > > > > + "Load a linux kernel.", 0); > > > > + > > > > + grub_register_command > > > > + ("initrd", grub_normal_initrd_command, > > > > + GRUB_COMMAND_FLAG_BOTH | GRUB_COMMAND_FLAG_NO_ARG_PARSE, > > > > + "initrd FILE", > > > > + "Load an initrd.", 0); > > > > + > > > > + grub_register_command > > > > + ("module", grub_normal_cmd_module, > > > > + GRUB_COMMAND_FLAG_BOTH | GRUB_COMMAND_FLAG_NO_ARG_PARSE, > > > > + "module FILE [ARGS...]", > > > > + "Load a Multiboot module.", 0); > > > > > > Multiboot module loader in linux_normal.mod ? > > > > Well, well well. Long question :-) > > > > Ia64 doesn't really fit in multiboot: it's a full 64 bits processor, > > But there's multiboot2. Right. > > there > > may be no room for an header in the 8KB (or you have to waste a lot o= f > memory > > to keep alignment), no room for EFI pointers in the header and no Ia6= 4 OS > > uses it. Well this were my conclusion when I read MB specs. > > Does this affect only EFI, or ia64 in general (e.g. ia64-coreboot, when= that > exists) ? It's IA64 indeed. > Also note the string "Load a Multiboot module." is present. > > If this is not multiboot, I'd suggest renaming the command to avoid nam= e > collisions (not only if multiboot is added later, but also user confusi= on). Ok, I will rename the command and change the string, so this issue will b= e closed. > > > > diff -ruNp -x '*~' -x CVS grub2.orig/util/ia64/efi/elf2pe.c > grub2/util/ia64/efi/elf2pe.c > > > > --- grub2.orig/util/ia64/efi/elf2pe.c 1970-01-01 01:00:00.0000000= 00 > +0100 > > > > +++ grub2/util/ia64/efi/elf2pe.c 2008-01-28 16:29:58.000000000 +0= 100 > > [...] > > > > > > This utility seems to be usable on i386 too? In that case, better = to put > it > > > outside ia64/ dir? > > > > It should work on i386 too, but not tested. > > I have written this utility for my port of EFI and adapted the style = for > > grub. It may be nice to share this code with i386 but not really req= uired > > now IMHO. > > util/i386/efi/grub-mkimage.c already generates PE, right? Why a differ= ent > way to handle this? Sound like it'd be more consistent to either use e= lf2pe > on both or share the same grub-mkimage. What do you think? Having only one implementation is for sure a goal. But there are many differences between the two implementations: * grub-mkimage can only handle PE and I386. * grub-mkimage can put modules image in a section. * elf2pe can generate PE and PE+ and read I386 or IA64 ELF. Enhancing grub-mkimage is not a small work as there are a lot of 32 bits = types. And in any case we have to test the two implementations (doable). In my opinion, there is no need to hurry here. The both implementations = work, they do slightly different job, do not require maintainance and we can do the merge later. Tristan.