From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: [PATCH] system: grub: Introduce foreign-menu-entry. Date: Wed, 03 Aug 2016 01:48:36 -0700 Message-ID: <87eg66kzkr.fsf@gmail.com> References: <20160803064249.7433-1-sleep_walker@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUrr4-0001PM-35 for guix-devel@gnu.org; Wed, 03 Aug 2016 04:48:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUrr2-0003RM-U0 for guix-devel@gnu.org; Wed, 03 Aug 2016 04:48:46 -0400 In-Reply-To: <20160803064249.7433-1-sleep_walker@gnu.org> (=?utf-8?B?IlRv?= =?utf-8?B?bcOhxaEgxIxlY2giJ3M=?= message of "Wed, 3 Aug 2016 08:42:49 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: =?utf-8?B?VG9tw6HFoSDEjGVjaA==?= Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Tom=C3=A1=C5=A1, Tom=C3=A1=C5=A1 =C4=8Cech writes: > foreign-menu-entry is very similar but is intended for entering other > distributions so it doesn't limit the name and allows kernel and initrd t= o be > placed in different device (in Grub syntax). What is the use case which motivates this change? How do you intend to use this after making the proposed changes? > +(define-record-type* > + foreign-menu-entry make-foreign-menu-entry > + foreign-menu-entry? > + (label foreign-menu-entry-label) > + (device foreign-menu-entry-device (default "")) > + (linux foreign-menu-entry-linux) > + (linux-arguments foreign-menu-entry-linux-arguments > + (default '())) ; list of string-valu= ed gexps > + (initrd foreign-menu-entry-initrd)) ; file name of the in= itrd as a gexp > + This is identical to the existing record type; however, it adds the "device" parameter: =2D-8<---------------cut here---------------start------------->8--- (define-record-type* menu-entry make-menu-entry menu-entry? (label menu-entry-label) (linux menu-entry-linux) (linux-arguments menu-entry-linux-arguments (default '())) ; list of string-valued gexps (initrd menu-entry-initrd)) ; file name of the initrd as a g= exp =2D-8<---------------cut here---------------end--------------->8--- Would it be possible to accomplish the same thing by adding a "device" parameter to the existing record type? That way, we wouldn't have to add a new record type which seems largely redundant. > #~(string-append #$linux "/" > #$linux-image-name)) > #$linux #$linux-image-name (string-join (list #$@argumen= ts)) > - #$initrd)))) > + #$initrd)) > + (($ label device linux arguments initrd) > + #~(format port "menuentry ~s { > + linux ~a ~a > + initrd ~a > +}~%" > + #$label > + (string-append #$device #$linux) Don't we need to insert a separator of some kind between #$device and #$linux? Also, don't we need to include the linux image name (e.g., "bzImage")? > + (string-join (list #$@arguments)) > + (string-append #$device #$initrd))))) >=20=20 > (mlet %store-monad ((sugar (eye-candy config store-fs system #~port))) > (define builder Isn't a separator of some kind needed between #$device and #$initrd? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXoa/mAAoJEN1AmhXYIkadv6cP/31yRbFefbMZc26FtcMRcjml 3KOq+gPAX4jE4PWtoclwnUexG9T8o7jUDIKcqn575j+TMGtJQTPtP+gyPxBVfcE1 c0jwCuj/8Ffaw/cdtgMn2Vj5WyA6z7Fu+R0+kDGmFMI+1xARc6E3sZk/yQI3dJ+K NFsyVAzTMbDFXCAWtY73yaOEeGkqKfkr+S7p8+9qBR/1r7UTB08YEL9FFOsaMRcu qoKSAVfaMty5rzXks/GqaTVbZvpim4lNk7USENu937uM6LUzBheTgiEbXGRufuWA Zi21+oVJuoXr46SBqyebjxfDDsSOJqQt1uVSo2xNrN/2ZECYfQs82zeEGC7LE5Iw 8DhNqLwr3RXe8iqA5b1Qp1YxpNBVKZDKIgjK18Ld5H1GuCs+oBvIWh3k9dv4jn/Q /osTvssCSG8yyfBcoINrHuGWFoWOCiAr9RTb1ATUhtjUQxFJVuJpmLAVEJMdqYPL 6fgN9JONr9fb1jEoaGcXcsURSp+JMfbthsTjWgBnmmvzI9NlE5KzBmrK47wU26Qm 92nx0VErLzIY1FHErhIFgoL+SxCYj4VpRFjEJggtccOFlPPLG2z1Y3zQyynghTtq kVvyZgHbL5n1ZGrFgkpPqcORHjSoF360OFrnT6wsYPIJ0umWGU4QVfaxMc+1QUXS U/v8sxpEHyajX6Re32zG =sVH6 -----END PGP SIGNATURE----- --=-=-=--