[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/21: system: hurd: Add hurd-grub-configuration-file.
From: |
guix-commits |
Subject: |
06/21: system: hurd: Add hurd-grub-configuration-file. |
Date: |
Thu, 7 May 2020 12:31:10 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 70981b2683e7cf5cc95561f0b02dfd0ef75b1388
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Sat Apr 25 14:45:54 2020 +0200
system: hurd: Add hurd-grub-configuration-file.
* gnu/system/hurd.scm (hurd-grub-configuration-file): New exported
procedure.
(cross-hurd-image): Use it.
---
gnu/system/hurd.scm | 55 ++++++++++++++++++++++++++++++-----------------------
1 file changed, 31 insertions(+), 24 deletions(-)
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 58bfdf8..02e57e5 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -32,7 +32,8 @@
#:use-module (gnu packages hurd)
#:use-module (gnu packages less)
#:use-module (gnu system vm)
- #:export (cross-hurd-image))
+ #:export (cross-hurd-image
+ hurd-grub-configuration-file))
;;; Commentary:
;;;
@@ -56,6 +57,34 @@
guile-3.0 guile-colorized guile-readline
net-base inetutils less which))
+(define* (hurd-grub-configuration-file config entries
+ #:key
+ (system (%current-target-system))
+ (old-entries '()))
+ ;; XXX Get from a hurd'ified config+entries
+ (let ((mach (with-parameters ((%current-system "i686-linux"))
+ - gnumach))
+ (libc (if system (cross-libc system) glibc)))
+ (computed-file "grub.cfg"
+ #~(call-with-output-file #$output
+ (lambda (port)
+ (format port "
+set timeout=2
+search.file ~a/boot/gnumach
+
+menuentry \"GNU\" {
+ multiboot ~a/boot/gnumach root=device:hd0s1
+ module ~a/hurd/ext2fs.static ext2fs \\
+ --multiboot-command-line='${kernel-command-line}' \\
+ --host-priv-port='${host-port}' \\
+ --device-master-port='${device-port}' \\
+ --exec-server-task='${exec-task}' -T typed '${root}' \\
+ '$(task-create)' '$(task-resume)'
+ module ~a/lib/ld.so.1 exec ~a/hurd/exec '$(exec-task=task-create)'
+}\n"
+ #$mach #$mach #$hurd
+ #$libc #$hurd))))))
+
(define* (cross-hurd-image #:key (hurd hurd) (gnumach gnumach))
"Return a cross-built GNU/Hurd image."
@@ -75,29 +104,7 @@
(packages->manifest %base-packages/hurd)))
(define grub.cfg
- (let ((hurd (cross-built hurd))
- (mach (with-parameters ((%current-system "i686-linux"))
- gnumach))
- (libc (cross-libc "i586-pc-gnu")))
- (computed-file "grub.cfg"
- #~(call-with-output-file #$output
- (lambda (port)
- (format port "
-set timeout=2
-search.file ~a/boot/gnumach
-
-menuentry \"GNU\" {
- multiboot ~a/boot/gnumach root=device:hd0s1
- module ~a/hurd/ext2fs.static ext2fs \\
- --multiboot-command-line='${kernel-command-line}' \\
- --host-priv-port='${host-port}' \\
- --device-master-port='${device-port}' \\
- --exec-server-task='${exec-task}' -T typed '${root}' \\
- '$(task-create)' '$(task-resume)'
- module ~a/lib/ld.so.1 exec ~a/hurd/exec '$(exec-task=task-create)'
-}\n"
- #+mach #+mach #+hurd
- #+libc #+hurd))))))
+ (hurd-grub-configuration-file #f '() #:system "i586-pc-gnu"))
(define fstab
(plain-file "fstab"
- branch wip-hurd-vm created (now ed48faf), guix-commits, 2020/05/07
- 01/21: syscalls: Add ioctl flags for the Hurd., guix-commits, 2020/05/07
- 02/21: gnu: glibc/hurd-headers: Cross-build fix for the Hurd., guix-commits, 2020/05/07
- 06/21: system: hurd: Add hurd-grub-configuration-file.,
guix-commits <=
- 04/21: system: vm: Add defaults for the Hurd., guix-commits, 2020/05/07
- 07/21: system: hurd: Add hurd-grub-minimal-bootloader., guix-commits, 2020/05/07
- 08/21: system: Add 'hurd' field to <operating-system>., guix-commits, 2020/05/07
- 09/21: system: vm: Initial vm-image support for the Hurd., guix-commits, 2020/05/07
- 03/21: system: vm: Fix for cross-build to the Hurd., guix-commits, 2020/05/07
- 05/21: system: hurd: Add hurd-default-essential-services., guix-commits, 2020/05/07
- 10/21: system: examples: Add bare-hurd.tmpl., guix-commits, 2020/05/07
- 16/21: services: Add `hurd-getty-service-type'., guix-commits, 2020/05/07
- 17/21: HACK services: hurd: Add dummy `loopback'., guix-commits, 2020/05/07
- 11/21: services: hurd: Add `hurd-etc-sevcice'., guix-commits, 2020/05/07