system: Add os-with-u-boot.
* gnu/system/install.scm (os-with-u-boot): New procedure. * gnu/packages/bootloaders.scm (make-u-boot-package): Export. * doc/guix.texi (Building the Installation Image for ARM Boards): New subsection.master
parent
0017e55f89
commit
4ce4fc5010
|
@ -8881,6 +8881,22 @@ Have a look at @file{gnu/system/install.scm} in the source tree,
|
||||||
and see also @ref{Invoking guix system} for more information
|
and see also @ref{Invoking guix system} for more information
|
||||||
about the installation image.
|
about the installation image.
|
||||||
|
|
||||||
|
@subsection Building the Installation Image for ARM Boards
|
||||||
|
|
||||||
|
Many ARM boards require a specific variant of the
|
||||||
|
@uref{http://www.denx.de/wiki/U-Boot/, U-Boot} bootloader.
|
||||||
|
|
||||||
|
If you build a disk image and the bootloader is not available otherwise
|
||||||
|
(on another boot drive etc), it's advisable to build an image that
|
||||||
|
includes the bootloader, specifically:
|
||||||
|
|
||||||
|
@example
|
||||||
|
guix system disk-image --system=armhf-linux -e '((@@ (gnu system install) os-with-u-boot) (@@ (gnu system install) installation-os) "A20-OLinuXino-Lime2")'
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@code{A20-OLinuXino-Lime2} is the name of the board. If you specify an invalid
|
||||||
|
board, a list of possible boards will be printed.
|
||||||
|
|
||||||
@node System Configuration
|
@node System Configuration
|
||||||
@section System Configuration
|
@section System Configuration
|
||||||
|
|
||||||
|
|
|
@ -439,7 +439,7 @@ def test_ctrl_c"))
|
||||||
also initializes the boards (RAM etc). This package provides its
|
also initializes the boards (RAM etc). This package provides its
|
||||||
board-independent tools.")))
|
board-independent tools.")))
|
||||||
|
|
||||||
(define (make-u-boot-package board triplet)
|
(define-public (make-u-boot-package board triplet)
|
||||||
"Returns a u-boot package for BOARD cross-compiled for TRIPLET."
|
"Returns a u-boot package for BOARD cross-compiled for TRIPLET."
|
||||||
(let ((same-arch? (if (string-prefix? (%current-system)
|
(let ((same-arch? (if (string-prefix? (%current-system)
|
||||||
(gnu-triplet->nix-system triplet))
|
(gnu-triplet->nix-system triplet))
|
||||||
|
|
|
@ -54,7 +54,8 @@
|
||||||
novena-installation-os
|
novena-installation-os
|
||||||
pine64-plus-installation-os
|
pine64-plus-installation-os
|
||||||
rk3399-puma-installation-os
|
rk3399-puma-installation-os
|
||||||
wandboard-installation-os))
|
wandboard-installation-os
|
||||||
|
os-with-u-boot))
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;;;
|
;;;
|
||||||
|
@ -386,6 +387,19 @@ You have been warned. Thanks for being so brave.\x1b[0m
|
||||||
nvi ;:wq!
|
nvi ;:wq!
|
||||||
%base-packages))))
|
%base-packages))))
|
||||||
|
|
||||||
|
(define* (os-with-u-boot os board #:key (bootloader-target "/dev/mmcblk0")
|
||||||
|
(triplet "arm-linux-gnueabihf"))
|
||||||
|
"Given OS, amend it with the u-boot bootloader for BOARD,
|
||||||
|
installed to BOOTLOADER-TARGET (a drive), compiled for TRIPLET.
|
||||||
|
|
||||||
|
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))))
|
||||||
|
(target bootloader-target)))))
|
||||||
|
|
||||||
(define* (embedded-installation-os bootloader bootloader-target tty
|
(define* (embedded-installation-os bootloader bootloader-target tty
|
||||||
#:key (extra-modules '()))
|
#:key (extra-modules '()))
|
||||||
"Return an installation os for embedded systems.
|
"Return an installation os for embedded systems.
|
||||||
|
|
Reference in New Issue