From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: gnu/system/u-boot.scm Date: Wed, 27 Jul 2016 11:32:48 +0200 Message-ID: <20160727113248.2ee9087c@scratchpost.org> References: <20160721223501.3a989d55@scratchpost.org> <877fc815wg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSLD2-00067n-Ty for guix-devel@gnu.org; Wed, 27 Jul 2016 05:33:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSLCx-00037E-0N for guix-devel@gnu.org; Wed, 27 Jul 2016 05:32:59 -0400 In-Reply-To: <877fc815wg.fsf@gnu.org> 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: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Cc: guix-devel Hi Ludo, On Tue, 26 Jul 2016 22:49:35 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > > (u-boot u-boot-configuration-u-boot ; package > > (default (@ (gnu packages u-boot) (make-u-boot-packa= ge board)))) =20 >=20 > The default value has invalid syntax. Should be simply: >=20 > (default (make-u-boot-package board)) >=20 > but I think this doesn=E2=80=99t work (=E2=80=98board=E2=80=99 will be un= bound; yeah, > counter-intuitive.) >=20 > You could instead do (default #f) and call =E2=80=98make-u-boot-package= =E2=80=99 when > that value is #f. >=20 > > (define (eye-candy config root-fs system port) > > "dummy" > > (mlet* %store-monad ((image #f)) > > (return (and image > > #~(format #$port ""))))) > > =20 >=20 > Simply remove it. :-) Yeah, but there's a=20 (mlet %store-monad ((sugar (eye-candy config store-fs system #~port))) in the same file. Can I remove that and #$sugar , too? Will it still work? Also, I'm trying to s/grub.cfg/bootloader-configuration-file/g right now, b= ut I wonder (1) Whether it's possible to determine the basename of the config-file deri= vation in order to find out what bootloader to install (2) Whether we want to do it that way . If so, we could have a install-bootloader routine that detects what the fil= ename of the bootloader-configuration-file object is and then calls either = install-grub or install-u-boot. For an overview, I searched: $ grep -rl grub . |grep '\.scm' ./gnu/build/vm.scm ; initialize-hard-disk has a key #:grub.cfg ./gnu/build/install.scm ; actual invocation of grub-install is here ./gnu/packages/admin.scm ; fine; some person is called grubb ./gnu/packages/grub.scm ; fine to use it in there ./gnu/system/grub.scm ; fine to use it in there ./gnu/system/vm.scm ; qemu-image has a key #:grub-configuration; source fil= e hardcodes grub package (?) ./gnu/system/install.scm ; references grub package "mostly so xrefs to its = manual work" ./gnu/system.scm ; needs to be adapted ./tests/system.scm ; harmless, just uses grub-configuration ./build-aux/hydra/demo-os.scm ; harmless, just uses grub-configuration ./guix/scripts/system.scm ; install-grub* needs to be generalized ./gnu.scm ; %public-modules grub for grub-configuration Some of these would have to be adapted.=20