aboutsummaryrefslogtreecommitdiff
path: root/gnu/bootloader
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2017-12-12 16:41:56 +0100
committerMathieu Othacehe <m.othacehe@gmail.com>2017-12-15 12:15:15 +0100
commitceb3952764e49400d4419fea64a9201a32dad3de (patch)
tree4ea6bf263e780b514edfa39936d76f07c72a98ab /gnu/bootloader
parent5a72ddf176d53a7f4df922985d9d7fd4cfa160f5 (diff)
downloadguix-ceb3952764e49400d4419fea64a9201a32dad3de.tar
guix-ceb3952764e49400d4419fea64a9201a32dad3de.tar.gz
system: Add BeagleBone Black installer.
* gnu/bootloader/u-boot.scm (u-boot-beaglebone-black-bootloader): New exported bootloader. * gnu/system/install.scm (beaglebone-black-installation-os): New exported variable.
Diffstat (limited to 'gnu/bootloader')
-rw-r--r--gnu/bootloader/u-boot.scm25
1 files changed, 24 insertions, 1 deletions
diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm
index 963b0d7597..397eb8181c 100644
--- a/gnu/bootloader/u-boot.scm
+++ b/gnu/bootloader/u-boot.scm
@@ -21,18 +21,35 @@
#:use-module (gnu bootloader extlinux)
#:use-module (gnu bootloader)
#:use-module (gnu system)
+ #:use-module (gnu build bootloader)
#:use-module (gnu packages bootloaders)
#:use-module (guix gexp)
#:use-module (guix monads)
#:use-module (guix records)
#:use-module (guix utils)
- #:export (u-boot-bootloader))
+ #:export (u-boot-bootloader
+ u-boot-beaglebone-black-bootloader))
(define install-u-boot
#~(lambda (bootloader device mount-point)
(if bootloader
(error "Failed to install U-Boot"))))
+(define install-beaglebone-black-u-boot
+ ;; http://wiki.beyondlogic.org/index.php?title=BeagleBoneBlack_Upgrading_uBoot
+ ;; This first stage bootloader called MLO (U-Boot SPL) is expected at
+ ;; 0x20000 by BBB ROM code. The second stage bootloader will be loaded by
+ ;; the MLO and is expected at 0x60000. Write both first stage ("MLO") and
+ ;; second stage ("u-boot.img") images, read in BOOTLOADER directory, to the
+ ;; specified DEVICE.
+ #~(lambda (bootloader device mount-point)
+ (let ((mlo (string-append bootloader "/libexec/MLO"))
+ (u-boot (string-append bootloader "/libexec/u-boot.img")))
+ (write-file-on-device mlo (* 256 512)
+ device (* 256 512))
+ (write-file-on-device u-boot (* 1024 512)
+ device (* 768 512)))))
+
;;;
@@ -45,3 +62,9 @@
(name 'u-boot)
(package #f)
(installer install-u-boot)))
+
+(define u-boot-beaglebone-black-bootloader
+ (bootloader
+ (inherit u-boot-bootloader)
+ (package u-boot-beagle-bone-black)
+ (installer install-beaglebone-black-u-boot)))