unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: Jan Nieuwenhuizen <janneke@gnu.org>
Cc: 41541@debbugs.gnu.org
Subject: bug#41541: merge wip-hurd-vm
Date: Wed, 27 May 2020 12:01:25 +0200	[thread overview]
Message-ID: <87tv01vgqy.fsf@gnu.org> (raw)
In-Reply-To: <87o8qavktf.fsf@gnu.org> (Jan Nieuwenhuizen's message of "Tue, 26 May 2020 16:21:16 +0200")

[-- Attachment #1: Type: text/plain, Size: 503 bytes --]


Hello Jan,

That's a good summary of the (complex) situation, thank you!

> Mattieu is looking into cleaning up of
>
> b605a36031 * origin/wip-hurd-vm WIP hurd-directives

About that, I'd like to limit at maximum the (if hurd ...) conditionals
in (gnu system image).

So for the "make-device-node", I would propose to "link" it to the
image definition, as proposed in the attached patch.

I'll see if we can do something similar for the "extra-directives" and
the "boot-activation".

Thanks,

Mathieu


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-hurd-nodes.patch --]
[-- Type: text/x-diff, Size: 2821 bytes --]

From 371f2bab466cef53f66ac69927014278055572fc Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@gnu.org>
Date: Wed, 27 May 2020 10:56:13 +0200
Subject: [PATCH] hurd nodes

---
 gnu/build/image.scm  |  5 +++++
 gnu/system/image.scm | 11 ++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index 087e2c78d9..d0722616f2 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -157,6 +157,8 @@ deduplicates files common to CLOSURE and the rest of PREFIX."
                                     references-graphs
                                     (register-closures? #t)
                                     system-directory
+                                    (make-device-nodes
+                                     make-essential-device-nodes)
                                     #:allow-other-keys)
   "Initialize the given ROOT directory. Use BOOTCFG and BOOTCFG-LOCATION to
 install the bootloader configuration.
@@ -168,6 +170,9 @@ of the directory of the 'system' derivation."
   (populate-root-file-system system-directory root)
   (populate-store references-graphs root)
 
+  ;; Populate /dev.
+  (make-device-nodes root)
+
   (when register-closures?
     (for-each (lambda (closure)
                 (register-closure root
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 03588f7d38..67e560891b 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -89,6 +89,13 @@
    (flags '(boot))
    (initializer (gexp initialize-root-partition))))
 
+(define hurd-initialize-root-partition
+  #~(lambda* (#:rest args)
+      (apply initialize-root-partition
+             (append args
+                     (list #:make-device-nodes
+                           make-hurd-device-nodes)))))
+
 (define hurd-disk-image
   (image
    (format 'disk-image)
@@ -99,7 +106,7 @@
            (label root-label)
            (file-system "ext2")
            (flags '(boot))
-           (initializer (gexp initialize-root-partition)))))))
+           (initializer hurd-initialize-root-partition))))))
 
 (define efi-disk-image
   (image
@@ -154,12 +161,14 @@
     (with-imported-modules `(,@(source-module-closure
                                 '((gnu build vm)
                                   (gnu build image)
+                                  (gnu build linux-boot)
                                   (guix store database))
                                 #:select? not-config?)
                              ((guix config) => ,(make-config.scm)))
       #~(begin
           (use-modules (gnu build vm)
                        (gnu build image)
+                       (gnu build linux-boot)
                        (guix store database)
                        (guix build utils))
           gexp* ...))))
-- 
2.26.2


  reply	other threads:[~2020-05-27 10:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 14:21 bug#41541: merge wip-hurd-vm Jan Nieuwenhuizen
2020-05-27 10:01 ` Mathieu Othacehe [this message]
2020-05-27 11:11   ` Jan Nieuwenhuizen
2020-05-30 14:40   ` Jan Nieuwenhuizen
2020-06-02  8:48     ` Mathieu Othacehe
2020-06-02  9:24       ` Jan Nieuwenhuizen
2020-06-02 10:16         ` Mathieu Othacehe
2020-06-02 12:23           ` Jan Nieuwenhuizen
2020-06-02 12:40             ` Ludovic Courtès
2020-06-02 13:39               ` Jan Nieuwenhuizen
2020-06-03  9:18                 ` Ludovic Courtès
2020-06-03 15:22                   ` Jan Nieuwenhuizen
2020-06-03 15:38                     ` Mathieu Othacehe
2020-06-03 20:27                       ` Jan Nieuwenhuizen
2020-06-04  9:32                         ` Ludovic Courtès
2020-06-04 11:33                           ` Jan Nieuwenhuizen
2020-06-05 16:08                             ` Ludovic Courtès
2020-06-05 16:24                               ` Jan Nieuwenhuizen
2020-06-04 13:59 ` bug#41541: [PATCH 0/9] Merge wip-hurd-vm "last review round" Jan (janneke) Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 1/8] system: Add 'hurd' field to <operating-system> Jan (janneke) Nieuwenhuizen
2020-06-06  7:21     ` Mathieu Othacehe
2020-06-06  8:26       ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 2/8] bootloader: Extend `<menu-entry>' for multiboot Jan (janneke) Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 3/8] system: Add 'multiboot-modules' field to <boot-parameters> Jan (janneke) Nieuwenhuizen
2020-06-06  7:32     ` Mathieu Othacehe
2020-06-06 10:13       ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 4/8] bootloader: grub: Add support for multiboot Jan (janneke) Nieuwenhuizen
2020-06-06  7:47     ` Mathieu Othacehe
2020-06-06  8:46       ` Jan Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 5/8] system: Use 'hurd' package in label Jan (janneke) Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 6/8] system: examples: Add bare-hurd.tmpl Jan (janneke) Nieuwenhuizen
2020-06-06  7:56     ` Mathieu Othacehe
2020-06-04 13:59   ` bug#41541: [PATCH 7/8] services: hurd: Add `hurd-etc-service' Jan (janneke) Nieuwenhuizen
2020-06-04 13:59   ` bug#41541: [PATCH 8/8] system: Add `hurd-activation' Jan (janneke) Nieuwenhuizen
2020-06-06  8:03     ` Mathieu Othacehe
2020-06-06  8:54       ` Jan Nieuwenhuizen

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tv01vgqy.fsf@gnu.org \
    --to=othacehe@gnu.org \
    --cc=41541@debbugs.gnu.org \
    --cc=janneke@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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).