unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: 31416@debbugs.gnu.org
Subject: [bug#31416] [PATCH 4/4] bootloader: Simplify bootloader installer selection.
Date: Fri, 11 May 2018 16:36:52 +0200	[thread overview]
Message-ID: <20180511143652.26935-4-dannym@scratchpost.org> (raw)
In-Reply-To: <20180511143652.26935-1-dannym@scratchpost.org>

* gnu/bootloader/u-boot.scm (u-boot-bootloader): Delete variable.
(u-boot-a20-olinuxino-lime-bootloader): Delete variable.
(u-boot-a20-olinuxino-lime2-bootloader): Delete variable.
(u-boot-a20-olinuxino-micro-bootloader): Delete variable.
(u-boot-banana-pi-m2-ultra-bootloader): Delete variable.
(u-boot-beaglebone-black-bootloader): Delete variable.
(u-boot-mx6cuboxi-bootloader): Delete variable.
(u-boot-nintendo-nes-classic-edition-bootloader): Delete variable.
(u-boot-novena-bootloader): Delete variable.
(u-boot-wandboard-bootloader): Delete variable.
* gnu/packages/bootloader.scm (u-boot-beagle-bone-black): Rename to...
(u-boot-beaglebone-black): ...this.
* gnu/system/examples/beaglebone-black.tmpl: Use make-u-boot-bootloader.
* gnu/system/install.scm (os-with-u-boot): Use make-u-boot-bootloader.
(beaglebone-black-installation-os): Use make-u-boot-bootloader.
(a20-olinuxino-lime-installation-os): Use make-u-boot-bootloader.
(a20-olinuxino-lime2-emmc-installation-os): Use make-u-boot-bootloader.
(a20-olinuxino-micro-installation-os): Use make-u-boot-bootloader.
(banana-pi-m2-ultra-installation-os): Use make-u-boot-bootloader.
(mx6cuboxi-installation-os): Use make-u-boot-bootloader.
(novena-installation-os): Use make-u-boot-bootloader.
(nintendo-nes-classic-edition-installation-os): Use make-u-boot-bootloader.
(wandboard-installation-os): Use make-u-boot-bootloader.
---
 gnu/bootloader/u-boot.scm                 | 39 +------------------------------
 gnu/packages/bootloaders.scm              |  2 +-
 gnu/system/examples/beaglebone-black.tmpl |  2 +-
 gnu/system/install.scm                    | 21 ++++++++---------
 4 files changed, 13 insertions(+), 51 deletions(-)

diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index feda17f99..f804997a4 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -27,17 +27,7 @@
   #:use-module (guix monads)
   #:use-module (guix records)
   #:use-module (guix utils)
-  #:export (u-boot-bootloader
-            u-boot-a20-olinuxino-lime-bootloader
-            u-boot-a20-olinuxino-lime2-bootloader
-            u-boot-a20-olinuxino-micro-bootloader
-            u-boot-banana-pi-m2-ultra-bootloader
-            u-boot-beaglebone-black-bootloader
-            u-boot-mx6cuboxi-bootloader
-            u-boot-nintendo-nes-classic-edition-bootloader
-            u-boot-novena-bootloader
-            u-boot-wandboard-bootloader
-            make-u-boot-bootloader))
+  #:export (make-u-boot-bootloader))
 
 (define install-u-boot
   #~(lambda (bootloader device mount-point)
@@ -110,30 +100,3 @@
   (bootloader
     (inherit u-boot-bootloader)
     (package bootloader-package)))
-
-(define u-boot-beaglebone-black-bootloader
-  (make-u-boot-bootloader u-boot-beagle-bone-black))
-
-(define u-boot-nintendo-nes-classic-edition-bootloader
-  (make-u-boot-bootloader u-boot-nintendo-nes-classic-edition))
-
-(define u-boot-a20-olinuxino-lime-bootloader
-  (make-u-boot-bootloader u-boot-a20-olinuxino-lime))
-
-(define u-boot-a20-olinuxino-lime2-bootloader
-  (make-u-boot-bootloader u-boot-a20-olinuxino-lime2))
-
-(define u-boot-a20-olinuxino-micro-bootloader
-  (make-u-boot-bootloader u-boot-a20-olinuxino-micro))
-
-(define u-boot-banana-pi-m2-ultra-bootloader
-  (make-u-boot-bootloader u-boot-banana-pi-m2-ultra))
-
-(define u-boot-mx6cuboxi-bootloader
-  (make-u-boot-bootloader u-boot-mx6cuboxi))
-
-(define u-boot-wandboard-bootloader
-  (make-u-boot-bootloader u-boot-wandboard))
-
-(define u-boot-novena-bootloader
-  (make-u-boot-bootloader u-boot-novena))
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 526e53384..759abdc92 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -424,7 +424,7 @@ also initializes the boards (RAM etc).")
 (define-public u-boot-malta
   (make-u-boot-package "malta" "mips64el-linux-gnuabi64"))
 
-(define-public u-boot-beagle-bone-black
+(define-public u-boot-beaglebone-black
   (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf"))
 
 (define-public u-boot-pine64-plus
diff --git a/gnu/system/examples/beaglebone-black.tmpl b/gnu/system/examples/beaglebone-black.tmpl
index 97201330c..1fd03dab9 100644
--- a/gnu/system/examples/beaglebone-black.tmpl
+++ b/gnu/system/examples/beaglebone-black.tmpl
@@ -13,7 +13,7 @@
   ;; Assuming /dev/mmcblk1 is the eMMC, and "my-root" is
   ;; the label of the target root file system.
   (bootloader (bootloader-configuration
-               (bootloader u-boot-beaglebone-black-bootloader)
+               (bootloader (make-u-boot-bootloader u-boot-beaglebone-black))
                (target "/dev/mmcblk1")))
 
   ;; This module is required to mount the SD card.
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index b563e8b5b..7508f95a8 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -396,8 +396,7 @@ If you want a serial console, make sure to specify one in your
 operating-system's kernel-arguments (\"console=ttyS0\" or similar)."
   (operating-system (inherit os)
     (bootloader (bootloader-configuration
-                 (bootloader (bootloader (inherit u-boot-bootloader)
-                              (package (make-u-boot-package board triplet))))
+                 (bootloader (make-u-boot-bootloader (make-u-boot-package board triplet)))
                  (target bootloader-target)))))
 
 (define* (embedded-installation-os bootloader bootloader-target tty
@@ -418,7 +417,7 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
     (initrd-modules (append extra-modules %base-initrd-modules))))
 
 (define beaglebone-black-installation-os
-  (embedded-installation-os u-boot-beaglebone-black-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-beaglebone-black)
                             "/dev/sda"
                             "ttyO0"
                             #:extra-modules
@@ -427,42 +426,42 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
 
 
 (define a20-olinuxino-lime-installation-os
-  (embedded-installation-os u-boot-a20-olinuxino-lime-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-a20-olinuxino-lime)
                             "/dev/mmcblk0" ; SD card storage
                             "ttyS0"))
 
 (define a20-olinuxino-lime2-emmc-installation-os
-  (embedded-installation-os u-boot-a20-olinuxino-lime2-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-a20-olinuxino-lime2)
                             "/dev/mmcblk1" ; eMMC storage
                             "ttyS0"))
 
 (define a20-olinuxino-micro-installation-os
-  (embedded-installation-os u-boot-a20-olinuxino-micro-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-a20-olinuxino-micro)
                             "/dev/mmcblk0" ; SD card storage
                             "ttyS0"))
 
 (define banana-pi-m2-ultra-installation-os
-  (embedded-installation-os u-boot-banana-pi-m2-ultra-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-banana-pi-m2-ultra)
                             "/dev/mmcblk1" ; eMMC storage
                             "ttyS0"))
 
 (define mx6cuboxi-installation-os
-  (embedded-installation-os u-boot-mx6cuboxi-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-mx6cuboxi)
                             "/dev/mmcblk0" ; SD card storage
                             "ttymxc0"))
 
 (define novena-installation-os
-  (embedded-installation-os u-boot-novena-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-novena)
                             "/dev/mmcblk1" ; SD card storage
                             "ttymxc1"))
 
 (define nintendo-nes-classic-edition-installation-os
-  (embedded-installation-os u-boot-nintendo-nes-classic-edition-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-nintendo-nes-classic-edition)
                             "/dev/mmcblk0" ; SD card (solder it yourself)
                             "ttyS0"))
 
 (define wandboard-installation-os
-  (embedded-installation-os u-boot-wandboard-bootloader
+  (embedded-installation-os (make-u-boot-bootloader u-boot-wandboard)
                             "/dev/mmcblk0" ; SD card storage
                             "ttymxc0"))
 

  parent reply	other threads:[~2018-05-11 14:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11 14:35 [bug#31416] [PATCH 0/4] Generalize bootloader installer selection Danny Milosavljevic
2018-05-11 14:36 ` [bug#31416] [PATCH 1/4] system: Add os-with-u-boot Danny Milosavljevic
2018-05-11 14:36   ` [bug#31416] [PATCH 2/4] bootloader: install-u-boot: Automatically select the correct installer Danny Milosavljevic
2018-05-13  9:31     ` Ludovic Courtès
2018-05-13 10:43       ` Danny Milosavljevic
2018-05-11 14:36   ` [bug#31416] [PATCH 3/4] bootloader: Add make-u-boot-bootloader Danny Milosavljevic
2018-05-13  9:36     ` Ludovic Courtès
2018-05-13 11:03       ` Danny Milosavljevic
2018-05-13 11:15         ` Danny Milosavljevic
2018-05-14  8:31           ` Ludovic Courtès
2018-05-13 13:46         ` Danny Milosavljevic
2018-05-14  8:34         ` Ludovic Courtès
2018-05-14 16:29           ` Danny Milosavljevic
2018-06-15  7:12             ` Ludovic Courtès
2018-06-17  0:28               ` Danny Milosavljevic
2018-06-17 12:35                 ` Danny Milosavljevic
2018-06-17 20:33                 ` Ludovic Courtès
2018-06-17 21:41                   ` Danny Milosavljevic
2018-06-18  8:25                     ` Ludovic Courtès
2018-05-11 14:36   ` Danny Milosavljevic [this message]
2018-05-13  9:24   ` [bug#31416] [PATCH 1/4] system: Add os-with-u-boot Ludovic Courtès
2018-05-13 12:09   ` Jelle Licht
2023-07-21 16:53 ` [bug#31416] [PATCH 0/4] Generalize bootloader installer selection Maxim Cournoyer
2023-09-01 18:47   ` bug#31416: " Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180511143652.26935-4-dannym@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=31416@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).