From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KHmRHWzgbGT+GQEASxT56A (envelope-from ) for ; Tue, 23 May 2023 17:49:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KKKfHWzgbGTiMQEAauVa8A (envelope-from ) for ; Tue, 23 May 2023 17:49:00 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3E0E49836 for ; Tue, 23 May 2023 17:49:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1UFG-0007Mz-Uw; Tue, 23 May 2023 11:48:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1UF5-00074s-U8 for guix-patches@gnu.org; Tue, 23 May 2023 11:48:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1UF5-0006GB-FU for guix-patches@gnu.org; Tue, 23 May 2023 11:48:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q1UF5-0007tW-Aw for guix-patches@gnu.org; Tue, 23 May 2023 11:48:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63527] [PATCH v5 07/11] hurd-boot: Setup pci-arbiter and rumpdisk translators. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 May 2023 15:48:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63527 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63527@debbugs.gnu.org Received: via spool by 63527-submit@debbugs.gnu.org id=B63527.168485688530313 (code B ref 63527); Tue, 23 May 2023 15:48:07 +0000 Received: (at 63527) by debbugs.gnu.org; 23 May 2023 15:48:05 +0000 Received: from localhost ([127.0.0.1]:40235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1UF2-0007sL-Gq for submit@debbugs.gnu.org; Tue, 23 May 2023 11:48:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37246) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q1UEk-0007oJ-7V for 63527@debbugs.gnu.org; Tue, 23 May 2023 11:47:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1UEf-00064O-11; Tue, 23 May 2023 11:47:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=8N6feLo5kn4RP/kvaZN7h7YRCEDqTxBLgcHl14eYrhE=; b=iTQHX9/NnlRb3Q5Dr0AH SuOpnrUaDaRSX6m9apkhCujOMUttrkQ+frEAcarDID9sLB71nrSV8gLT5+lPqI42zRdenUrsRA6Ng 8OrYDPujvBvVif8xm1Xngwt2APsIAIdqNVUU59tfwsPlG2F3G71UZBlJWFOdSLpMqNJJ2FpW24mEJ F4Vki20ALlhFid63JijSI9Z8jCN6nylvIjEOLUJyBAbjthqSwfN6l91XoQzaSz25EMtW5xP1gs248 8Je7jFJrjKqw/qhz3UWrDH8TfFeOB6D7HGZd1QAlvkz5sZ1ugOLKk9Wg+dAMMXp3mKYw8vL7ydXTZ Zl0T24YGI6g+mA==; Received: from 2a02-a462-da03-1-2701-7f81-a736-4607.fixed6.kpn.net ([2a02:a462:da03:1:2701:7f81:a736:4607] helo=drakenpad.fritz.box) by fencepost.gnu.org with esmtpa (Exim 4.90_1) (envelope-from ) id 1q1UEe-0002jp-K6; Tue, 23 May 2023 11:47:40 -0400 From: Janneke Nieuwenhuizen Date: Tue, 23 May 2023 17:47:28 +0200 Message-Id: <80f8fd0cb008971867e8b550535d7e4673d532c7.1684855847.git.janneke@gnu.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1684856940; a=rsa-sha256; cv=none; b=pdFLj0VfTWnjS60wKYcwMMmGP2RSqVFaHCGMEgiJXZqWg6fixYXgKEFHk2iAaQa9A4SLTy zA7e0MumLSHf3OUV4Ap2tLlNXdJU2a5M8Forj32r8Rk/4qvJNsxN+l/a//yvCCyBUuQUrv 2FSlFNwkLHGjLZR93QhU9KIyJRX7b9OqPUp9dN64jX2h2PckpIm4Vx3ZXNOdTPMT7T3m86 yWJ/D7jZWtx4FQpPhrQ4SI71cymnL0EUO8V83yisnLOqY8ijoJNfXAA5lCwGhbRGe0HSqe bmm1Ao/aCBesrb6fLi5us/OtuY+yN21mww/RbO63pEKofSCDMHJFNtkgpAjGcw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="iTQHX9/N"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684856940; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=8N6feLo5kn4RP/kvaZN7h7YRCEDqTxBLgcHl14eYrhE=; b=iYDbc3hTv7xFx8xujZ4cHG80kC8i2nsDNViDa8jHZfgZRwNQE5F4x5aQGbjXH8c5gsD41Q efRSjJnuUBDB6s2y3nfpVHxDMSXBztohy6NF4x3IjL26t16zBY4bSYpruIQGDO4PvXsZ+5 I08JIs5tY48jPDcdB/zy+K8uPoqZZrkNaq1lq9AkA8/Js0nDeYJWqrXYVI6b+iRCgiJDyV gBeMRCSrl0UIWbVo3NqIK2q+m83Ymwjum5NuwNYJ9U3VwreUZ2ZwOKppd8Ec7RzFhlf5e1 343p0SXzJM3iM65nJMerjElOWoZ3zx1DPsBBlNIOgpl0do1uHALVyvpcKF2YJQ== X-Migadu-Spam-Score: -2.67 X-Spam-Score: -2.67 X-Migadu-Queue-Id: 3E0E49836 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="iTQHX9/N"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-TUID: t8MBdcHxzuLi * gnu/build/hurd-boot.scm (make-hurd-device-nodes): Create "servers/bus/pci. (set-hurd-device-translators): Create transators for pci-arbiter, rumpdisk, and /dev/wd0..4s1..4. --- gnu/build/hurd-boot.scm | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm index 14bfc5e809..93324ac3f3 100644 --- a/gnu/build/hurd-boot.scm +++ b/gnu/build/hurd-boot.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020-2022 Ludovic Courtès -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -105,7 +105,7 @@ (define* (make-hurd-device-nodes #:optional (root "/")) ;; TODO: Set the 'gnu.translator' extended attribute for passive translator ;; settings? - ) + (mkdir-p (scope "servers/bus/pci"))) (define (passive-translator-xattr? file-name) "Return true if FILE-NAME has an extended @code{gnu.translator} attribute @@ -183,7 +183,8 @@ (define* (set-hurd-device-translators #:optional (root "/")) (mkdir-p dir)))) (define servers - '(("servers/crash-dump-core" ("/hurd/crash" "--dump-core")) + '(("servers/bus/pci" ("/hurd/pci-arbiter")) + ("servers/crash-dump-core" ("/hurd/crash" "--dump-core")) ("servers/crash-kill" ("/hurd/crash" "--kill")) ("servers/crash-suspend" ("/hurd/crash" "--suspend")) ("servers/password" ("/hurd/password")) @@ -216,6 +217,8 @@ (define* (set-hurd-device-translators #:optional (root "/")) ;; 'fd_to_filename' in libc expects it. ("dev/fd" ("/hurd/magic" "--directory" "fd") #o555) + ("dev/rumpdisk"("/hurd/rumpdisk") #o660) + ;; Create a number of ttys; syslogd writes to tty12 by default. ;; FIXME: Creating /dev/tty12 leads the console client to switch to ;; tty12 when syslogd starts, which is confusing for users. Thus, do @@ -239,7 +242,22 @@ (define* (set-hurd-device-translators #:optional (root "/")) ("/hurd/term" ,(string-append "/dev/ttyp" n) "pty-slave" ,(string-append "/dev/ptyp" n)) #o666)))) - (iota 10 0)))) + (iota 10 0)) + ,@(append-map (lambda (n) + (let* ((n (number->string n)) + (drive (string-append "dev/wd" n)) + (disk (string-append "@/dev/disk:wd" n))) + `((,drive ("/hurd/storeio" ,disk) #o600) + ,@(map (lambda (p) + (let ((p (number->string p))) + `(,(string-append drive "s" p) + ("/hurd/storeio" + "--store-type=typed" + ,(string-append + "part:" p ":device:@/dev/disk:wd0")) + #o660))) + (iota 4 1))))) + (iota 4 0)))) (for-each scope-set-translator servers) (mkdir* "dev/vcs/1") @@ -252,6 +270,7 @@ (define* (set-hurd-device-translators #:optional (root "/")) (false-if-EEXIST (symlink "/dev/fd/1" (scope "dev/stdout"))) (false-if-EEXIST (symlink "/dev/fd/2" (scope "dev/stderr"))) (false-if-EEXIST (symlink "crash-dump-core" (scope "servers/crash"))) + (false-if-EEXIST (symlink "/dev/rumpdisk" (scope "dev/disk"))) ;; Make sure /etc/mtab is a symlink to /proc/mounts. (false-if-exception (delete-file (scope "etc/mtab"))) -- 2.40.1