[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
25/36: system: hurd: Add hurd-grub-configuration-file.
From: |
guix-commits |
Subject: |
25/36: system: hurd: Add hurd-grub-configuration-file. |
Date: |
Fri, 1 May 2020 11:54:02 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit dac62cfdba973f579e3e4f89673c32cf7e8d883b
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 c5cc09a..c454fdf 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-target-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")
@@ -187,29 +222,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"
- 17/36: system: gnu: Add %bootstrap-{gcc, binutils, glibc} for devel profile., (continued)
- 17/36: system: gnu: Add %bootstrap-{gcc, binutils, glibc} for devel profile., guix-commits, 2020/05/01
- 08/36: squash! Use static-networking for loopback, guix-commits, 2020/05/01
- 24/36: services: hurd: Use hurd-file-systems-service., guix-commits, 2020/05/01
- 23/36: system: hurd: Export system variables., guix-commits, 2020/05/01
- 06/36: HACK services: hurd: Add dummy syslog., guix-commits, 2020/05/01
- 11/36: DRAFT system: hurd: Add the Shepherd., guix-commits, 2020/05/01
- 18/36: system: hurd: Add guix., guix-commits, 2020/05/01
- 21/36: services: Add hurd-file-systems-service-type., guix-commits, 2020/05/01
- 22/36: services: hurd: Move hurd-default-essential-services., guix-commits, 2020/05/01
- 20/36: services: hurd: Move hurd-etc-sevcices., guix-commits, 2020/05/01
- 25/36: system: hurd: Add hurd-grub-configuration-file.,
guix-commits <=
- 36/36: HACK Don't fail on running host's localedef., guix-commits, 2020/05/01
- 28/36: system: vm: Add defaults for the Hurd., guix-commits, 2020/05/01
- 29/36: gnu: glibc/hurd-headers: Cross-build fix for the Hurd., guix-commits, 2020/05/01
- 34/36: WIP: gnu: services: Add %hurd-bare-metal-service., guix-commits, 2020/05/01
- 32/36: DRAFT system: examples: Add bare-hurd.tmpl., guix-commits, 2020/05/01
- 35/36: HACK system: vm: Add Hurd specifics., guix-commits, 2020/05/01
- 19/36: system: hurd: Add the guix service., guix-commits, 2020/05/01
- 26/36: system: hurd: Add hurd-grub-minimal-bootloader., guix-commits, 2020/05/01
- 27/36: system: Add hurd-operating-system-directory-base-entries., guix-commits, 2020/05/01
- 31/36: gnu: hurd: Switch system in RC., guix-commits, 2020/05/01