diff options
| author | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-12-12 16:41:56 +0100 |
|---|---|---|
| committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-12-15 12:15:15 +0100 |
| commit | ceb3952764e49400d4419fea64a9201a32dad3de (patch) | |
| tree | 4ea6bf263e780b514edfa39936d76f07c72a98ab /gnu/bootloader | |
| parent | 5a72ddf176d53a7f4df922985d9d7fd4cfa160f5 (diff) | |
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.scm | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index 963b0d7597e..397eb8181cf 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm | |||
| @@ -21,18 +21,35 @@ | |||
| 21 | #:use-module (gnu bootloader extlinux) | 21 | #:use-module (gnu bootloader extlinux) |
| 22 | #:use-module (gnu bootloader) | 22 | #:use-module (gnu bootloader) |
| 23 | #:use-module (gnu system) | 23 | #:use-module (gnu system) |
| 24 | #:use-module (gnu build bootloader) | ||
| 24 | #:use-module (gnu packages bootloaders) | 25 | #:use-module (gnu packages bootloaders) |
| 25 | #:use-module (guix gexp) | 26 | #:use-module (guix gexp) |
| 26 | #:use-module (guix monads) | 27 | #:use-module (guix monads) |
| 27 | #:use-module (guix records) | 28 | #:use-module (guix records) |
| 28 | #:use-module (guix utils) | 29 | #:use-module (guix utils) |
| 29 | #:export (u-boot-bootloader)) | 30 | #:export (u-boot-bootloader |
| 31 | u-boot-beaglebone-black-bootloader)) | ||
| 30 | 32 | ||
| 31 | (define install-u-boot | 33 | (define install-u-boot |
| 32 | #~(lambda (bootloader device mount-point) | 34 | #~(lambda (bootloader device mount-point) |
| 33 | (if bootloader | 35 | (if bootloader |
| 34 | (error "Failed to install U-Boot")))) | 36 | (error "Failed to install U-Boot")))) |
| 35 | 37 | ||
| 38 | (define install-beaglebone-black-u-boot | ||
| 39 | ;; http://wiki.beyondlogic.org/index.php?title=BeagleBoneBlack_Upgrading_uBoot | ||
| 40 | ;; This first stage bootloader called MLO (U-Boot SPL) is expected at | ||
| 41 | ;; 0x20000 by BBB ROM code. The second stage bootloader will be loaded by | ||
| 42 | ;; the MLO and is expected at 0x60000. Write both first stage ("MLO") and | ||
| 43 | ;; second stage ("u-boot.img") images, read in BOOTLOADER directory, to the | ||
| 44 | ;; specified DEVICE. | ||
| 45 | #~(lambda (bootloader device mount-point) | ||
| 46 | (let ((mlo (string-append bootloader "/libexec/MLO")) | ||
| 47 | (u-boot (string-append bootloader "/libexec/u-boot.img"))) | ||
| 48 | (write-file-on-device mlo (* 256 512) | ||
| 49 | device (* 256 512)) | ||
| 50 | (write-file-on-device u-boot (* 1024 512) | ||
| 51 | device (* 768 512))))) | ||
| 52 | |||
| 36 | 53 | ||
| 37 | 54 | ||
| 38 | ;;; | 55 | ;;; |
| @@ -45,3 +62,9 @@ | |||
| 45 | (name 'u-boot) | 62 | (name 'u-boot) |
| 46 | (package #f) | 63 | (package #f) |
| 47 | (installer install-u-boot))) | 64 | (installer install-u-boot))) |
| 65 | |||
| 66 | (define u-boot-beaglebone-black-bootloader | ||
| 67 | (bootloader | ||
| 68 | (inherit u-boot-bootloader) | ||
| 69 | (package u-boot-beagle-bone-black) | ||
| 70 | (installer install-beaglebone-black-u-boot))) | ||
