system: Add Banana Pi M2 Ultra installer.

* gnu/bootloader/u-boot.scm (u-boot-banana-pi-m2-ultra-bootloader): New
exported variable.
(install-allwinner-u-boot): New variable.
(u-boot-allwinner-bootloader): New variable.
* gnu/packages/bootloaders.scm (u-boot-banana-pi-m2-ultra): New exported
variable.
* gnu/system/install.scm (banana-pi-m2-ultra-installation-os): New exported
variable.
This commit is contained in:
Danny Milosavljevic 2018-01-19 00:25:13 +01:00
parent ed19fea0e5
commit 30aeb846d7
No known key found for this signature in database
GPG Key ID: E71A35542C30BAA5
3 changed files with 38 additions and 0 deletions

View File

@ -28,6 +28,7 @@
#:use-module (guix records) #:use-module (guix records)
#:use-module (guix utils) #:use-module (guix utils)
#:export (u-boot-bootloader #:export (u-boot-bootloader
u-boot-banana-pi-m2-ultra-bootloader
u-boot-beaglebone-black-bootloader)) u-boot-beaglebone-black-bootloader))
(define install-u-boot (define install-u-boot
@ -50,6 +51,13 @@
(write-file-on-device u-boot (* 1024 512) (write-file-on-device u-boot (* 1024 512)
device (* 768 512))))) device (* 768 512)))))
(define install-allwinner-u-boot
#~(lambda (bootloader device mount-point)
(let ((u-boot (string-append bootloader
"/libexec/u-boot-sunxi-with-spl.bin")))
(write-file-on-device u-boot (stat:size (stat u-boot))
device (* 8 1024)))))
;;; ;;;
@ -68,3 +76,13 @@
(inherit u-boot-bootloader) (inherit u-boot-bootloader)
(package u-boot-beagle-bone-black) (package u-boot-beagle-bone-black)
(installer install-beaglebone-black-u-boot))) (installer install-beaglebone-black-u-boot)))
(define u-boot-allwinner-bootloader
(bootloader
(inherit u-boot-bootloader)
(installer install-allwinner-u-boot)))
(define u-boot-banana-pi-m2-ultra-bootloader
(bootloader
(inherit u-boot-allwinner-bootloader)
(package u-boot-banana-pi-m2-ultra)))

View File

@ -423,6 +423,9 @@ also initializes the boards (RAM etc).")
(define-public u-boot-odroid-c2 (define-public u-boot-odroid-c2
(make-u-boot-package "odroid-c2" "aarch64-linux-gnu")) (make-u-boot-package "odroid-c2" "aarch64-linux-gnu"))
(define-public u-boot-banana-pi-m2-ultra
(make-u-boot-package "Bananapi_M2_Ultra" "arm-linux-gnueabihf"))
(define-public vboot-utils (define-public vboot-utils
(package (package
(name "vboot-utils") (name "vboot-utils")

View File

@ -44,6 +44,7 @@
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:use-module (srfi srfi-26) #:use-module (srfi srfi-26)
#:export (installation-os #:export (installation-os
banana-pi-m2-ultra-installation-os
beaglebone-black-installation-os)) beaglebone-black-installation-os))
;;; Commentary: ;;; Commentary:
@ -399,6 +400,22 @@ You have been warned. Thanks for being so brave.\x1b[0m
(tty "ttyO0")))) (tty "ttyO0"))))
(operating-system-user-services installation-os))))) (operating-system-user-services installation-os)))))
(define banana-pi-m2-ultra-installation-os
(operating-system
(inherit installation-os)
(bootloader (bootloader-configuration
(bootloader u-boot-banana-pi-m2-ultra-bootloader)
(target "/dev/mmcblk1"))) ; eMMC storage
(kernel linux-libre)
(services (append
(list (agetty-service
(agetty-configuration
(extra-options '("-L"))
(baud-rate "115200")
(term "vt100")
(tty "ttyS0"))))
(operating-system-user-services installation-os)))))
;; Return the default os here so 'guix system' can consume it directly. ;; Return the default os here so 'guix system' can consume it directly.
installation-os installation-os