Subject: [PATCH] system: Add Cubieboard2.

From: Danny Milosavljevic <[email-masked]>
Date: Tue, 6 Feb 2018 18:58:42 +0100

* gnu/bootloader/u-boot.scm (u-boot-cubieboard2-bootloader): New
exported variable.
* gnu/packages/bootloaders.scm (u-boot-cubieboard2): New exported
variable.
* gnu/system/install.scm (cubieboard2-installation-os): New exported
variable.
---
 gnu/bootloader/u-boot.scm    | 6 ++++++
 gnu/packages/bootloaders.scm | 3 +++
 gnu/system/install.scm       | 6 ++++++
 3 files changed, 15 insertions(+)

diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index 21d0aecce..c88dba10f 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -33,6 +33,7 @@
             u-boot-a20-olinuxino-micro-bootloader
             u-boot-banana-pi-m2-ultra-bootloader
             u-boot-beaglebone-black-bootloader
+            u-boot-cubieboard2-bootloader
             u-boot-nintendo-nes-classic-edition-bootloader))
 
 (define install-u-boot
@@ -106,6 +107,11 @@
    (inherit u-boot-allwinner-bootloader)
    (package u-boot-a20-olinuxino-micro)))
 
+(define u-boot-cubieboard2-bootloader
+  (bootloader
+   (inherit u-boot-allwinner-bootloader)
+   (package u-boot-cubieboard2)))
+
 (define u-boot-banana-pi-m2-ultra-bootloader
   (bootloader
    (inherit u-boot-allwinner-bootloader)
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 498b807ce..4a800e87e 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -439,6 +439,9 @@ also initializes the boards (RAM etc).")
 (define-public u-boot-a20-olinuxino-micro
   (make-u-boot-package "A20-OLinuXino_MICRO" "arm-linux-gnueabihf"))
 
+(define-public u-boot-cubieboard2
+  (make-u-boot-package "Cubieboard2" "arm-linux-gnueabihf"))
+
 (define-public u-boot-nintendo-nes-classic-edition
   (make-u-boot-package "Nintendo_NES_Classic_Edition" "arm-linux-gnueabihf"))
 
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index e4b2e8237..87ab57c48 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -49,6 +49,7 @@
             a20-olinuxino-micro-installation-os
             banana-pi-m2-ultra-installation-os
             beaglebone-black-installation-os
+            cubieboard2-installation-os
             nintendo-nes-classic-edition-installation-os))
 
 ;;; Commentary:
@@ -437,6 +438,11 @@ The bootloader BOOTLOADER is installed to BOOTLOADER-TARGET."
                             "/dev/mmcblk1" ; eMMC storage
                             "ttyS0"))
 
+(define cubieboard2-installation-os
+  (embedded-installation-os u-boot-cubieboard2-bootloader
+                            "/dev/mmcblk0" ; SD card storage
+                            "ttyS0"))
+
 (define nintendo-nes-classic-edition-installation-os
   (embedded-installation-os u-boot-nintendo-nes-classic-edition-bootloader
                             "/dev/mmcblk0" ; SD card (solder it yourself)