From: Danny Milosavljevic <dannym@scratchpost.org>
To: 31416@debbugs.gnu.org
Subject: [bug#31416] [PATCH 1/4] system: Add os-with-u-boot.
Date: Fri, 11 May 2018 16:36:49 +0200 [thread overview]
Message-ID: <20180511143652.26935-1-dannym@scratchpost.org> (raw)
In-Reply-To: <20180511143515.23435-1-dannym@scratchpost.org>
* 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.
---
doc/guix.texi | 21 +++++++++++++++++++++
gnu/packages/bootloaders.scm | 2 +-
gnu/system/install.scm | 16 +++++++++++++++-
3 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 637c9c3f4..b2b173ded 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8733,6 +8733,27 @@ Have a look at @file{gnu/system/install.scm} in the source tree,
and see also @ref{Invoking guix system} for more information
about the installation image.
+@subsection Building the Installation Image for ARM boards
+
+Many ARM boards require a board-specific bootloader in order to boot.
+
+If you build an entire disk image and the is not still available otherwise
+(on another available 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
+
+Or if you don't cross compile:
+
+@example
+guix system disk-image -e '((@ (gnu system install) os-with-u-boot) (@ (gnu system install) installation-os) "A20-OLinuXino-Lime2")'
+@end example
+
+"A20-OLinuXino-Lime2" is the name of the board. If you specify an invalid
+board, you get a list.
+
@node System Configuration
@section System Configuration
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index c0a0101c5..526e53384 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -359,7 +359,7 @@ tree binary files. These are board description files used by Linux and BSD.")
also initializes the boards (RAM etc).")
(license license:gpl2+)))
-(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."
(let ((same-arch? (if (string-prefix? (%current-system)
(gnu-triplet->nix-system triplet))
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index a2917e485..b563e8b5b 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -52,7 +52,8 @@
mx6cuboxi-installation-os
nintendo-nes-classic-edition-installation-os
novena-installation-os
- wandboard-installation-os))
+ wandboard-installation-os
+ os-with-u-boot))
;;; Commentary:
;;;
@@ -386,6 +387,19 @@ You have been warned. Thanks for being so brave.\x1b[0m
nvi ;:wq!
%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
#:key (extra-modules '()))
"Return an installation os for embedded systems.
next prev parent reply other threads:[~2018-05-11 14:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-11 14:35 [bug#31416] [PATCH 0/4] Generalize bootloader installer selection Danny Milosavljevic
2018-05-11 14:36 ` Danny Milosavljevic [this message]
2018-05-11 14:36 ` [bug#31416] [PATCH 2/4] bootloader: install-u-boot: Automatically select the correct installer Danny Milosavljevic
2018-05-13 9:31 ` Ludovic Courtès
2018-05-13 10:43 ` Danny Milosavljevic
2018-05-11 14:36 ` [bug#31416] [PATCH 3/4] bootloader: Add make-u-boot-bootloader Danny Milosavljevic
2018-05-13 9:36 ` Ludovic Courtès
2018-05-13 11:03 ` Danny Milosavljevic
2018-05-13 11:15 ` Danny Milosavljevic
2018-05-14 8:31 ` Ludovic Courtès
2018-05-13 13:46 ` Danny Milosavljevic
2018-05-14 8:34 ` Ludovic Courtès
2018-05-14 16:29 ` Danny Milosavljevic
2018-06-15 7:12 ` Ludovic Courtès
2018-06-17 0:28 ` Danny Milosavljevic
2018-06-17 12:35 ` Danny Milosavljevic
2018-06-17 20:33 ` Ludovic Courtès
2018-06-17 21:41 ` Danny Milosavljevic
2018-06-18 8:25 ` Ludovic Courtès
2018-05-11 14:36 ` [bug#31416] [PATCH 4/4] bootloader: Simplify bootloader installer selection Danny Milosavljevic
2018-05-13 9:24 ` [bug#31416] [PATCH 1/4] system: Add os-with-u-boot Ludovic Courtès
2018-05-13 12:09 ` Jelle Licht
2023-07-21 16:53 ` [bug#31416] [PATCH 0/4] Generalize bootloader installer selection Maxim Cournoyer
2023-09-01 18:47 ` bug#31416: " Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180511143652.26935-1-dannym@scratchpost.org \
--to=dannym@scratchpost.org \
--cc=31416@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.