From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: gnu/system/u-boot.scm Date: Fri, 22 Jul 2016 02:59:34 -0700 Message-ID: <87wpke3se1.fsf@gmail.com> References: <20160721223501.3a989d55@scratchpost.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]:46287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQXFA-000680-AY for guix-devel@gnu.org; Fri, 22 Jul 2016 05:59:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQXF8-0005pW-7r for guix-devel@gnu.org; Fri, 22 Jul 2016 05:59:43 -0400 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:34704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQXF7-0005pM-TC for guix-devel@gnu.org; Fri, 22 Jul 2016 05:59:42 -0400 Received: by mail-pa0-x232.google.com with SMTP id fi15so38395466pac.1 for ; Fri, 22 Jul 2016 02:59:41 -0700 (PDT) In-Reply-To: <20160721223501.3a989d55@scratchpost.org> (Danny Milosavljevic's message of "Thu, 21 Jul 2016 22:35:01 +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: Danny Milosavljevic Cc: guix-devel --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Danny Milosavljevic writes: > Hi, > > below is my (untested!) attempt at an u-boot-configuration for use like t= his > > (bootloader (u-boot-configuration (device "/dev/sda"))) Neat! Kudos to you for getting the ball rolling. I'm not familiar with u-boot, but based on recent emails, it sounds like it's important for getting GuixSD to run on ARM. > Now how do I make u-boot-configuration available in my /etc/config.scm > ? :) A mechanism exists for installing the bootloader and its configuration files. You can see it in guix/gnu/build/install.scm (where we actually execute the install-grub [1] program) and guix/guix/scripts/system.scm. It seems the code currently assumes that grub is the bootloader. To actually install u-boot, you'll probably need to add support for u-boot somewhere in there. [1] https://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-usin= g-grub_002dinstall.html#Installing-GRUB-using-grub_002dinstall I wonder if it would be possible to create a bootloader abstraction of some kind so that the installation mechanism can work with either u-boot or grub, without caring about which one it uses? It would be nice if the installation mechanism were generic enough so that the same mechanism could be used to install either bootloader. > (define-record-type* > u-boot-configuration make-u-boot-configuration > u-boot-configuration? > (board u-boot-configuration-board) ; string ; not o= ptional! > (u-boot u-boot-configuration-u-boot ; package > (default (@ (gnu packages u-boot) (make-u-boot-package= board)))) > (device u-boot-configuration-device) ; string > (menu-entries u-boot-configuration-menu-entries ; list > (default '())) > (default-entry u-boot-configuration-default-entry ; integer > (default 0)) > (timeout u-boot-configuration-timeout ; integer > (default 5))) This looks a little different from the grub-configuration record type (defined in guix/gnu/system/grub.scm). How do you intend to integrate it with the existing bootloader installation mechanism? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXke6JAAoJEN1AmhXYIkadmssP/jALLyIyyUCvurr2NuWR9HoH H+MrEHazydoVeVPEd50Ladk7dFfK1XRyB1zV4Wo550gJlzKbX7H5ZHlfLkKXj27Z kcjtT0XwvB+EYMOgEyjq+BKAn+PSp1RC2+S7ogyPoV5rHmrADWOFnGAL6OfiDWnx rJaLOQH4oNj7kJjsPa3xkOpuLlb1yIpkZezjeKBv46md9MW9LOHihBN2haa0iPrp 43DyS4VKZ0aQJgzWHFws0fINcTp7fizLsWyKhSsTVipLH2sPSc6NT9h2Uw0IC6dM HOvOepmrbZwMqjZo+KAIa4USG9Fz+G4FFxKq6qtBzRZjp+1R64FaHIAUPgaz6w08 vLEy2vbRPTXzQPcp+zvg07iIqc96/t45tLXYIKoShxS6UzUlFMqOeWlpS1qyUiN+ 3GMjAlTBC1SAirL+/GC10xOzZE7xDGBqGzf9nPnbA9ehatXOXa0u4D/wUwbMYeUO H4ZN6wF7NxeNqEpPy7PtUeC85siJRfCFDARhiD2oPV00wbJDS5BcLXj0schMm1Wn eqdTClgQzTMGBiyrVX5hGr1ZlXXSRsB/2hm+/6e7n1Tkl3OzHC/0B4s4j1Wz0tYa YuHy1AWK9KRAPw/Ty8KbCD1OcHXz/oeSCAzaZNftdaRFlrQ+4THtA5qvGp25+YNM K4Z6mZ8Qm2Q/oxojhIJU =wa8H -----END PGP SIGNATURE----- --=-=-=--