[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
29/52: linux-boot: Add 'make-hurd-device-nodes'.
From: |
guix-commits |
Subject: |
29/52: linux-boot: Add 'make-hurd-device-nodes'. |
Date: |
Thu, 9 Apr 2020 13:29:09 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 71df122570dbef673304f766723dbb05a5401a3e
Author: Ludovic Courtès <address@hidden>
AuthorDate: Tue Apr 7 09:47:36 2020 +0200
linux-boot: Add 'make-hurd-device-nodes'.
* gnu/build/linux-boot.scm (make-hurd-device-nodes): New procedure.
---
gnu/build/linux-boot.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 787665e..d1c9f47 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -40,6 +40,7 @@
find-long-option
find-long-options
make-essential-device-nodes
+ make-hurd-device-nodes
make-static-device-nodes
configure-qemu-networking
@@ -323,6 +324,36 @@ one specific hardware device. These we have to create."
;; File systems in user space (FUSE).
(mknod (scope "dev/fuse") 'char-special #o666 (device-number 10 229)))
+(define* (make-hurd-device-nodes #:optional (root "/"))
+ "Make some of the nodes needed on GNU/Hurd."
+ (define (scope dir)
+ (string-append root
+ (if (string-suffix? "/" root)
+ ""
+ "/")
+ dir))
+
+ (mkdir (scope "dev"))
+ (for-each (lambda (file)
+ (call-with-output-file (scope file)
+ (lambda (port)
+ (chmod port #o666))))
+ '("dev/null"
+ "dev/zero"
+ "dev/full"
+ "dev/random"
+ "dev/urandom"))
+ ;; Don't create /dev/console, /dev/vcs, etc.: they are created by
+ ;; console-run on first boot.
+
+ (mkdir (scope "servers"))
+ (mkdir (scope "servers/socket"))
+ ;; Don't create /servers/socket/1 & co: runsystem does that on first boot.
+
+ ;; TODO: Set the 'gnu.translator' extended attribute for passive translator
+ ;; settings?
+ )
+
(define %host-qemu-ipv4-address
(inet-pton AF_INET "10.0.2.10"))
- 18/52: gnu: cross-libc: Add patch to allow 'gettyent' reading store file names., (continued)
- 18/52: gnu: cross-libc: Add patch to allow 'gettyent' reading store file names., guix-commits, 2020/04/09
- 20/52: system: hurd: Add "/etc/shadow"., guix-commits, 2020/04/09
- 24/52: vm: Preserve file permissions on /dev., guix-commits, 2020/04/09
- 25/52: linux-boot: 'make-essential-device-nodes' root parameter is optional., guix-commits, 2020/04/09
- 19/52: system: hurd: Add "/bin/sh" symlink., guix-commits, 2020/04/09
- 16/52: system: hurd: Add ttys symlink in "/etc/ttys"., guix-commits, 2020/04/09
- 30/52: vm: Make the device node procedure a parameter., guix-commits, 2020/04/09
- 26/52: gnu: libgcrypt: Fix cross-compilation., guix-commits, 2020/04/09
- 23/52: database: 'reset-timestamps' can optionally preserve permissions., guix-commits, 2020/04/09
- 22/52: system: hurd: Create /etc/{hostname,motd,login} and /root., guix-commits, 2020/04/09
- 29/52: linux-boot: Add 'make-hurd-device-nodes'.,
guix-commits <=
- 28/52: gnu: guix: Apply courage for the Hurd., guix-commits, 2020/04/09
- 34/52: gnu: hurd: Add dependency on libgcrypt., guix-commits, 2020/04/09
- 32/52: system: hurd: Add guix., guix-commits, 2020/04/09
- 36/52: gnu: hurd: Install a BDF font., guix-commits, 2020/04/09
- 33/52: gnu: libdaemon: Allow cross-compilation., guix-commits, 2020/04/09
- 21/52: gnu: hurd: Install the UTF-8 motd., guix-commits, 2020/04/09
- 31/52: gnu: guix: Fix cross-compilation., guix-commits, 2020/04/09
- 27/52: gnu: openssl: Support cross-compilation to the Hurd., guix-commits, 2020/04/09
- 35/52: gnu: hurd: Add dependency on libdaemon., guix-commits, 2020/04/09
- 38/52: system: hurd: Add openssh, shepherd., guix-commits, 2020/04/09