[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
29/62: linux-boot: Add 'make-hurd-device-nodes'.
From: |
guix-commits |
Subject: |
29/62: linux-boot: Add 'make-hurd-device-nodes'. |
Date: |
Sat, 11 Apr 2020 11:35:50 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 16069390a1068b051c11ea8ff4e5d48bc07d3efd
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"))
- 38/62: system: hurd: Add openssh, shepherd., (continued)
- 38/62: system: hurd: Add openssh, shepherd., guix-commits, 2020/04/11
- 36/62: gnu: hurd: Install a BDF font., guix-commits, 2020/04/11
- 46/62: system: hurd: Add guile-candy., guix-commits, 2020/04/11
- 47/62: system: hurd: Ensure propagated inputs are also cross-built., guix-commits, 2020/04/11
- 51/62: gnu: guix: Cross-build fixup for wrap-program., guix-commits, 2020/04/11
- 52/62: gnu: guix: Add dependency on `hurd' when building for the Hurd., guix-commits, 2020/04/11
- 50/62: gnu: Fix typo., guix-commits, 2020/04/11
- 58/62: HACK build.sh, 2GiB disk., guix-commits, 2020/04/11
- 59/62: Revert "compile: Run the load phase within 'with-target'.", guix-commits, 2020/04/11
- 24/62: vm: Preserve file permissions on /dev., guix-commits, 2020/04/11
- 29/62: linux-boot: Add 'make-hurd-device-nodes'.,
guix-commits <=
- 31/62: gnu: guix: Fix cross-compilation., guix-commits, 2020/04/11
- 37/62: gnu: openssh: Build fix for the Hurd., guix-commits, 2020/04/11
- 33/62: gnu: libdaemon: Allow cross-compilation., guix-commits, 2020/04/11
- 43/62: gnu: hurd: "/libexec/rc" spawns the console client., guix-commits, 2020/04/11
- 44/62: system: hurd: Create a proper profile., guix-commits, 2020/04/11
- 45/62: system: hurd: Add net-base and inetutils., guix-commits, 2020/04/11
- 61/62: REMOVEME gnu: guix: Bugfix for cross compiling to the Hurd., guix-commits, 2020/04/11
- 57/62: DRAFT daemon: Create wrapper for mount (2)., guix-commits, 2020/04/11
- 60/62: Revert "records: Have ABI check work well for cross-compilation.", guix-commits, 2020/04/11
- 53/62: gnu: guix: Cross-build fix: override compressors., guix-commits, 2020/04/11