[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnu/system/u-boot.scm

From: Chris Marusich
Subject: Re: gnu/system/u-boot.scm
Date: Fri, 22 Jul 2016 02:59:34 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Danny Milosavljevic <address@hidden> writes:

> Hi,
> below is my (untested!) attempt at an u-boot-configuration for use like this
>   (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.


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>
>   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).  How do you intend to integrate
it with the existing bootloader installation mechanism?


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]