[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
32/36: system: hurd: Add hurd-grub-configuration-file.
From: |
guix-commits |
Subject: |
32/36: system: hurd: Add hurd-grub-configuration-file. |
Date: |
Mon, 27 Apr 2020 06:19:52 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 1428084abcb189d4d0ac2826531f9dfd00b144a7
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 | 59 ++++++++++++++++++++++++++++++++---------------------
1 file changed, 36 insertions(+), 23 deletions(-)
diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 88082de..33e832e 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -55,6 +55,7 @@
#:use-module (gnu system shadow)
#:use-module (gnu system vm)
#:export (cross-hurd-image
+ hurd-grub-configuration-file
%base-packages/hurd
%base-services/hurd
%hurd-default-operating-system))
@@ -100,6 +101,40 @@
"--disable-deduplication"
"--max-jobs=1"))))))
+(define* (hurd-grub-configuration-file config entries
+ #:key
+ (system (%current-system))
+ (old-entries '()))
+ (pk "hurd-grub-configuration-file")
+ (let ((hurd (if (equal? system (%current-system))
+ hurd
+ (with-parameters ((%current-target-system system))
+ hurd)))
+ (mach (with-parameters ((%current-system "i686-linux"))
+ gnumach))
+ (libc (if (equal? system (%current-system))
+ glibc
+ (cross-libc system))))
+ (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 %hurd-default-operating-system
(operating-system
(host-name "guixygnu")
@@ -186,29 +221,7 @@
%bootstrap-glibc))))))
(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"
- 15/36: services: Add user-processes-service as a Hurd service., (continued)
- 15/36: services: Add user-processes-service as a Hurd service., guix-commits, 2020/04/27
- 20/36: system: hurd: Add the Shepherd., guix-commits, 2020/04/27
- 22/36: system: hurd: Add openssh service., guix-commits, 2020/04/27
- 21/36: system: gnu: Populate "/etc" from "/boot/activation"., guix-commits, 2020/04/27
- 17/36: services: hurd: Add dummy syslog., guix-commits, 2020/04/27
- 16/36: services: Add guix-daemon-service as a Hurd service., guix-commits, 2020/04/27
- 18/36: services: hurd: Add dummy loopback., guix-commits, 2020/04/27
- 25/36: system: hurd: Add guix., guix-commits, 2020/04/27
- 28/36: services: Add hurd-file-systems-service-type., guix-commits, 2020/04/27
- 29/36: services: hurd: Move hurd-default-essential-services., guix-commits, 2020/04/27
- 32/36: system: hurd: Add hurd-grub-configuration-file.,
guix-commits <=
- 33/36: system: hurd: Add hurd-grub-minimal-bootloader., guix-commits, 2020/04/27
- 23/36: system: hurd: Create system profile for guix development., guix-commits, 2020/04/27
- 30/36: system: hurd: Export system variables., guix-commits, 2020/04/27
- 27/36: services: hurd: Move hurd-etc-sevcices., guix-commits, 2020/04/27
- 09/36: gnu: Add libtirpc/hurd., guix-commits, 2020/04/27
- 31/36: services: hurd: Use hurd-file-systems-service., guix-commits, 2020/04/27
- 35/36: system: vm: Add defaults for the Hurd., guix-commits, 2020/04/27
- 24/36: system: gnu: Add %bootstrap-{gcc, binutils, glibc} for devel profile., guix-commits, 2020/04/27
- 34/36: system: Add hurd-operating-system-directory-base-entries., guix-commits, 2020/04/27
- 36/36: DRAFT system: examples: Add bare-hurd.tmpl., guix-commits, 2020/04/27