Subject: [bug#29409] [PATCH] system: Add BeagleBone Black installer.

From: ng0 <[email-masked]>
Date: Mon, 11 Dec 2017 17:32:56 +0000

Ludovic Courtès transcribed 1.9K bytes:
> [email-masked] skribis:
> 
> > From: Mathieu Othacehe <[email-masked]>
> >
> > * gnu/bootloader/u-boot.scm (u-boot-beaglebone-black-bootloader): New exported
> >   bootloader.
> > * gnu/system/boards/beaglebone-black.scm: New file returning bbb installer.
> > * gnu/local.mk (GNU_SYSTEM_MODULES): Add new file.
> 
> [...]
> 
> > +(define install-beaglebone-black-u-boot
> > +  #~(lambda (bootloader device mount-point)
> > +      (let ((mlo (string-append bootloader "/libexec/MLO"))
> > +            (u-boot (string-append bootloader "/libexec/u-boot.img")))
> 
> Could you add a comment explaining what’s specific to the BBB, perhaps
> with a link to relevant documentation?
> 
> > +++ b/gnu/system/boards/beaglebone-black.scm
> > @@ -0,0 +1,33 @@
> > +(define-module (gnu system boards beaglebone-black)
> > +  #:use-module (gnu)
> > +  #:use-module (gnu system install)
> > +  #:use-module (gnu bootloader u-boot)
> > +  #:use-module (gnu packages bootloaders)
> > +  #:use-module (gnu packages linux)
> > +  #:export (beaglebone-black-installation-os))
> > +
> > +(define beaglebone-black-installation-os
> > +  (operating-system
> > +    (inherit installation-os)
> 
> I’d be tempted to just add it to (gnu system install) and then we’d do:
> 
>   guix system disk-image -e '(@ (gnu system install) beaglebone-black-installation-os)'
> 
> WDYT?
> 
> Of course we first need to add support for -e but that should be fine.
> ;-)

For portability (extending into more templates and more installers etc)
this seems like a nice idea.

For example: you want to have a minimal XFCE image with just one
definition, and you want to maintain deriviates of this minimal
XFCE image in the same file. Or more in the spirit of this thread:
You have one system install definition, but for hardware compability
reasons you need to change some tiny pieces in it and add 3 variants
for various hardware architecture. This would allow me to reduce

 infotropique/system/{core,$arch-core,$arch-$wm,…}
or something like infottropique/system/$arch/$wm
to a more clean library overview.

Just as a potential reference sneak-peak without
much context ;)

> > +beaglebone-black-installation-os
> 
> Now that sounds really awesome.  :-)
> 
> So you’ve successfully installed GuixSD on BBB using this image?
> 
> Is the BBB powerful enough to run ‘guix pull’?  (I have an Olimex A20
> with 1G of RAM that just dies.)
> 
> For small devices, it would also make sense to (cross-)build a
> ready-to-use GuixSD image and just write it to the device.
> 
> Thoughts?
> 
> Anyway, kudos on that one!  I think you owe us a blog post with pictures
> of the BBB running GuixSD.  :-)
> 
> Ludo’.

Definitely very exciting!

-- 
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://c.n0.is/ng0_pubkeys/tree/keys
  WWW: https://n0.is