From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: gnu/system/u-boot.scm Date: Fri, 22 Jul 2016 20:21:57 +0200 Message-ID: <20160722202157.68317e11@scratchpost.org> References: <20160721223501.3a989d55@scratchpost.org> <87wpke3se1.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47604) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQf5O-0002sz-96 for guix-devel@gnu.org; Fri, 22 Jul 2016 14:22:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQf5J-0007Q1-2a for guix-devel@gnu.org; Fri, 22 Jul 2016 14:22:09 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:54580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQf5I-0007Pu-Rp for guix-devel@gnu.org; Fri, 22 Jul 2016 14:22:05 -0400 In-Reply-To: <87wpke3se1.fsf@gmail.com> 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: Chris Marusich Cc: guix-devel Hi, On Fri, 22 Jul 2016 02:59:34 -0700 Chris Marusich wrote: > 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. Yeah, because many ARM platforms don't have a BIOS (or any similar replacement), the bootloader has to do things you wouldn't believe. U-Boot has support for that. There would be support for Grub as an U-Boot payload (in a fork), but I figured it's not really necessary [for now?] and complicates things too much - see how similar the U-Boot config body is to the Grub config body... > 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. That would be nice. I'm not sure whether different bootloaders are similar in their installation mechanism, though. ARM platforms have... weird ways of booting - so getting all ARM boards to boot in the first place is difficult. Supporting those and Grub should be easy afterwards. > > (define-record-type* > > u-boot-configuration make-u-boot-configuration > > u-boot-configuration? > > (board u-boot-configuration-board) ; string ; not optional! > > (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). It should be very similar. I added "board" and removed the theme stuff since it's unsupported. I don't think leaving the theme stuff in there would hurt either - it would just be ignored. >How do you intend to integrate it with the existing bootloader installation mechanism? I have no idea yet. Have to read up on what's there first :)