From patchwork Tue May 16 13:48:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 50040 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DF88E27BBEA; Tue, 16 May 2023 14:49:44 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5EBFD27BBE2 for ; Tue, 16 May 2023 14:49:42 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyv32-0004Hv-Ky; Tue, 16 May 2023 09:49:04 -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 1pyv31-0004H1-3g for guix-patches@gnu.org; Tue, 16 May 2023 09:49:03 -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 1pyv30-0004Ja-Ry for guix-patches@gnu.org; Tue, 16 May 2023 09:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pyv30-0007eg-Nz for guix-patches@gnu.org; Tue, 16 May 2023 09:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63527] [PATCH v2 1/3] gnu: Add rumpkernel. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 May 2023 13:49:02 +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.168424494029402 (code B ref 63527); Tue, 16 May 2023 13:49:02 +0000 Received: (at 63527) by debbugs.gnu.org; 16 May 2023 13:49:00 +0000 Received: from localhost ([127.0.0.1]:45770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyv2w-0007e2-Sf for submit@debbugs.gnu.org; Tue, 16 May 2023 09:48:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyv2u-0007dS-Bx for 63527@debbugs.gnu.org; Tue, 16 May 2023 09:48:57 -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 1pyv2o-0004I4-Q9; Tue, 16 May 2023 09:48:50 -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=avtzZpJ7ustNEdjptt/ZkjSimTVwwmV5x6jPu6RskeM=; b=kBfWrfKUnhLyQLhwzc9+ 7E2E1iatuHEhDZpDNGieFitjJ0JnKECyj1NhNl022saoPLjJOaGxyw48n/NQsUpQRXtUcQ5zRMYPY /nmv+xBTaWlLZEa9Zp1xgJ25I7j85E5A/KwpoGvyf82pvMY8KXRh4U4TR6NZxouZD5vzl/eZMzUar HogbMc1MpLj4XCgPO+PX6lPpeAKvTL+ojzmZNn07bKMjAk5cRsHILmmZ+Ba9zNSKlowpHJDaa2J8J h0it4KBklKzBDlVzfv4mvUwURX2yL2XfLyiQs4+7weicMaR1cxp+Smm514wdQit2e4l2npZyH6IFL NxqGI+ZA60EJJQ==; 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 1pyv2o-00086i-Ak; Tue, 16 May 2023 09:48:50 -0400 From: Janneke Nieuwenhuizen Date: Tue, 16 May 2023 15:48:44 +0200 Message-Id: <8b12244dab33c893860c6247d96a595e0fb9a345.1684244425.git.janneke@gnu.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This uses Debian Salsa package management as upstream as that is where delopment happens. Once things have stabalized upstream may change to the NetBSD git from where Debian takes their snapshots. * gnu/packages/patches/rumpkernel-cross-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/hurd.scm (rumpkernel): Use it in new variable. --- gnu/local.mk | 1 + gnu/packages/hurd.scm | 208 +++++++++++++++++- .../patches/rumpkernel-cross-build.patch | 153 +++++++++++++ 3 files changed, 361 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/rumpkernel-cross-build.patch diff --git a/gnu/local.mk b/gnu/local.mk index 012ce84d2d..0e394e5c36 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1860,6 +1860,7 @@ dist_patch_DATA = \ %D%/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch \ %D%/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch \ %D%/packages/patches/rottlog-direntry.patch \ + %D%/packages/patches/rumpkernel-cross-build.patch \ %D%/packages/patches/ruby-hiredis-use-system-hiredis.patch \ %D%/packages/patches/ruby-hydra-minimal-no-byebug.patch \ %D%/packages/patches/ruby-anystyle-data-immutable-install.patch \ diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 34c7c00f2d..8edf5d91c6 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2018, 2020-2023 Ludovic Courtès ;;; Copyright © 2020 Efraim Flashner ;;; Copyright © 2020 Marius Bakke -;;; Copyright © 2020, 2022 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2022, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2020 Ricardo Wurmus ;;; Copyright © 2020 Rene Saavedra ;;; @@ -662,3 +662,209 @@ (define-public netdde ;; Some drivers are dually licensed with the options being GPLv2 or one ;; of MPL/Expat/BSD-3 (dependent on the driver). (license gpl2)))) + +(define-public rumpkernel + (let ((commit "ec2ab9612be4dc48a316a21a0c96d3388478a064") + (revision "2")) + (package + (name "rumpkernel") + (version (git-version "0-20211031" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://salsa.debian.org/hurd-team/rumpkernel.git") + (commit commit))) + (sha256 + (base32 + "1ypjg3jyzhh3gnanmk6fh76dwl5ml78n311nbi0hw7f7hygzn7vk")) + (file-name (git-file-name name commit)))) + (build-system gnu-build-system) + (arguments + (list + #:tests? #f + #:modules '((srfi srfi-26) + (ice-9 match) + (ice-9 rdelim) + (guix build utils) + (guix build gnu-build-system)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'apply-patches + (lambda* (#:key target #:allow-other-keys) + (let* ((patch-directory "debian/patches/") + (series (string-append patch-directory "series")) + (text (with-input-from-file series read-string)) + (lines (string-split (string-trim-right text) #\newline)) + (patches (filter (negate (cute string-prefix? "#" <>)) + lines)) + (patch-files (map + (cute string-append patch-directory <>) + patches))) + (for-each + (cute invoke "patch" "--force" "-p1" "-i" <>) + patch-files) + ;; Somewhere in the build.sh/make process MIG is not being + ;; exported, apparently. + (when target + (substitute* "pci-userspace/src-gnu/Makefile.inc" + (("MIG=mig") + (string-append "MIG=" target "-mig"))))))) + (add-before 'configure 'setenv + (lambda* (#:key build target #:allow-other-keys) + (define (noisy-setenv name value) + (setenv name value) + (format (current-error-port) "set ~a=~s\n" name value)) + (noisy-setenv "HOST_CC" "gcc") + (when target + (noisy-setenv "MIG" (string-append target "-mig"))) + (let ((target (or target build))) + (noisy-setenv "TARGET_AR" (string-append target "-ar")) + (noisy-setenv "TARGET_CC" (string-append target "-gcc")) + (noisy-setenv "TARGET_CXX" (string-append target "-g++")) + (noisy-setenv "TARGET_LD" (string-append target "-ld")) + (noisy-setenv "TARGET_MIG" (string-append target "-mig")) + (noisy-setenv "TARGET_NM" (string-append target "-nm"))) + (setenv "PAWD" "pwd") + (for-each + (cute noisy-setenv <> "") + '("_GCC_CRTENDS" + "_GCC_CRTEND" + "_GCC_CRTBEGINS" + "_GCC_CRTBEGIN" + "_GCC_CRTI" + "_GCC_CRTN")) + (noisy-setenv "BSDOBJDIR=" (string-append (getcwd) "/obj")))) + (replace 'configure + (lambda args + (let ((configure (assoc-ref %standard-phases 'configure))) + (with-directory-excursion "buildrump.sh/src/lib/librumpuser" + (apply configure args))))) + (replace 'build + (lambda* (#:key parallel-build? #:allow-other-keys) + (let* ((jobs (if parallel-build? (parallel-job-count) 1)) + (host-cpu (match #$(or (%current-target-system + (%current-system))) + ("i586-pc-gnu" "i386") + ("i686-linux" "i386") + ("x86_64-linux" "amd64"))) + (toprump (string-append + (getcwd) + "/buildrump.sh/src/sys/rump")) + (rump-make (string-append + (getcwd) + "/buildrump.sh/src/obj/tooldir/bin/nbmake-" + host-cpu))) + (mkdir "obj") + (with-directory-excursion "buildrump.sh/src" + (invoke + "sh" "build.sh" + "-V" "TOOLS_BUILDRUMP=yes" + "-V" "MKBINUTILS=no" + "-V" "MKGDB=no" + "-V" "MKGROFF=no" + "-V" (string-append "TOPRUMP=" toprump) + "-V" "BUILDRUMP_CPPFLAGS=-Wno-error=stringop-overread" + "-V" "RUMPUSER_EXTERNAL_DPLIBS=pthread" + "-V" (string-append + "CPPFLAGS=" + " -I../../obj/destdir." host-cpu "/usr/include" + " -D_FILE_OFFSET_BITS=64" + " -DRUMP_REGISTER_T=int" + " -DRUMPUSER_CONFIG=yes" + " -DNO_PCI_MSI_MSIX=yes" + " -DNUSB_DMA=1") + "-V" (string-append + "CWARNFLAGS=" + " -Wno-error=maybe-uninitialized" + " -Wno-error=address-of-packed-member" + " -Wno-error=unused-variable" + " -Wno-error=stack-protector" + " -Wno-error=array-parameter" + " -Wno-error=array-bounds" + " -Wno-error=stringop-overflow") + "-V" "LIBCRTBEGIN=" + "-V" "LIBCRTEND=" + "-V" "LIBCRT0=" + "-V" "LIBCRTI=" + "-V" "_GCC_CRTENDS=" + "-V" "_GCC_CRTEND=" + "-V" "_GCC_CRTBEGINS=" + "-V" "_GCC_CRTBEGIN=" + "-V" "_GCC_CRTI=" + "-V" "_GCC_CRTN=" + "-U" + "-u" + "-T" "./obj/tooldir" + "-m" host-cpu + "-j" (number->string jobs) + "tools" + "rump")) + (with-directory-excursion "buildrump.sh/src/lib/librumpuser" + (setenv "RUMPRUN" "true") + (invoke rump-make "dependall")) + (with-directory-excursion "pci-userspace/src-gnu" + (invoke rump-make "dependall"))))) + (replace 'install + (lambda _ + (define (install-file file target) + (let ((dest (string-append target (basename file)))) + (format (current-output-port) "`~a' -> `~a'~%" file dest) + (mkdir-p (dirname dest)) + (if (file-exists? dest) + (format (current-error-port) + "warning: skipping: ~a\n" file) + (let ((stat (lstat file))) + (case (stat:type stat) + ((symlink) + (let ((target (readlink file))) + (symlink target dest))) + (else + (copy-file file dest))))))) + (let ((header (string-append #$output "/include/rump")) + (lib (string-append #$output "/lib/"))) + (mkdir-p header) + (copy-recursively "buildrump.sh/src/sys/rump/include/rump" + header) + (mkdir-p lib) + (for-each + (cute install-file <> lib) + (append (find-files "buildrump.sh/src" "librump.*[.](a|so.*)") + (find-files "obj" "librump.*[.](a|so.*)"))))))))) + (inputs + (list gnumach-headers libpciaccess)) + (native-inputs + (list + autoconf + automake + libgcrypt + (if (%current-target-system) + (let* ((cross-base (resolve-interface '(gnu packages cross-base))) + (cross-mig (module-ref cross-base 'cross-mig))) + (cross-mig (%current-target-system))) + mig) + zlib)) + (supported-systems %hurd-systems) + (home-page "https://wiki.netbsd.org/rumpkernel") + (synopsis "NetBSD as rumpkernel for the GNU/Hurd") + (description + "This package provides NetBSD as rumpkernel for the GNU/Hurd, so that +the Hurd may be installed on iron. Using this rumpkernel package, the hurd +package's rumpdisk can be built which provides the pci.arbiter and rumpdisk +servers.") + (license (list + asl2.0 + boost1.0 + bsd-2 + bsd-3 + bsd-4 + cddl1.0 + expat + gpl1 + gpl2+ + gpl3+ + isc + lgpl2.0+ + public-domain + (@ (guix licenses) zlib) + (non-copyleft "file://src/lib/libc/hash/hashhl.c" + "See debian/copyright in the distribution.")))))) diff --git a/gnu/packages/patches/rumpkernel-cross-build.patch b/gnu/packages/patches/rumpkernel-cross-build.patch new file mode 100644 index 0000000000..a8c7d93e20 --- /dev/null +++ b/gnu/packages/patches/rumpkernel-cross-build.patch @@ -0,0 +1,153 @@ +This patch fixes cross-building the rumpkernel: + + * Fixes for non-multiarch toolchains, + * Support cross-mig, + * Cater for non-FHS .../bin/sh. + +Upstream status: not presented upstream. + +From 3e080e8a43f8b2f7a107849dd2e7e38ee2732d20 Mon Sep 17 00:00:00 2001 +From: Janneke Nieuwenhuizen +Date: Tue, 16 May 2023 07:29:23 +0200 +Subject: [PATCH 1/3] squash! patch: debian/patches/crossbuild + +--- + buildrump.sh/src/build.sh | 10 ++++++++-- + pci-userspace/src-gnu/Makefile.inc | 3 ++- + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/buildrump.sh/src/build.sh b/buildrump.sh/src/build.sh +index 60375f5f4..0e80813c1 100755 +--- a/buildrump.sh/src/build.sh ++++ b/buildrump.sh/src/build.sh +@@ -2230,12 +2230,18 @@ maketoolwrapper () + musthave=$1 + tool=$2 + +- if [ "${tool}" = "CC" ]; then ++ if [ "${tool}" = "AR" ]; then ++ lctool=${TARGET_AR-ar} ++ elif [ "${tool}" = "CC" ]; then + lctool=${TARGET_CC-gcc} + elif [ "${tool}" = "CXX" ]; then + lctool=${TARGET_CXX-g++} + elif [ "${tool}" = "LD" ]; then + lctool=${TARGET_LD-ld} ++ elif [ "${tool}" = "MIG" ]; then ++ lctool=${TARGET_MIG-mig} ++ elif [ "${tool}" = "NM" ]; then ++ lctool=${TARGET_NM-nm} + else + lctool=$(echo ${tool} | tr '[A-Z]' '[a-z]') + fi +@@ -2302,7 +2308,7 @@ makerumptools () + for x in CC AR NM OBJCOPY; do + maketoolwrapper true $x + done +- for x in AS LD OBJDUMP RANLIB READELF SIZE STRINGS STRIP CXX; do ++ for x in AS LD OBJDUMP RANLIB READELF SIZE STRINGS STRIP CXX MIG; do + maketoolwrapper false $x + done + +diff --git a/pci-userspace/src-gnu/Makefile.inc b/pci-userspace/src-gnu/Makefile.inc +index 6f8db357e..ef25bac3a 100644 +--- a/pci-userspace/src-gnu/Makefile.inc ++++ b/pci-userspace/src-gnu/Makefile.inc +@@ -8,11 +8,12 @@ RUMPCOMP_USER_CPPFLAGS+=-I${PCIDIR} -I${DESTDIR}/usr/include + RUMPCOMP_CPPFLAGS+= -I${PCIDIR} -I${DESTDIR}/usr/include + CPPFLAGS+= -I${PCIDIR} + LDFLAGS+= -lmachuser -Wl,--no-as-needed -lpciaccess -Wl,--as-needed ++MIG=mig + + mach_debugUser.c: + echo '#include ' \ + | ${CC} -E -x c - -o - \ +- | mig -cc cat - /dev/null -subrprefix __ \ ++ | $(MIG) -cc cat - /dev/null -subrprefix __ \ + -user mach_debugUser.c \ + -server /dev/null \ + -header mach_debug_U.h +-- +2.39.2 + +From af67549b7c5da5970a9330d281bd8305e1f6e8ed Mon Sep 17 00:00:00 2001 +From: Janneke Nieuwenhuizen +Date: Tue, 16 May 2023 07:39:54 +0200 +Subject: [PATCH 2/3] crossbuild: Cater for non-FHS shell. + +--- + buildrump.sh/src/tools/genassym/Makefile | 2 +- + buildrump.sh/src/tools/lorder/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/buildrump.sh/src/tools/genassym/Makefile b/buildrump.sh/src/tools/genassym/Makefile +index e597c522b..96ca4ac21 100644 +--- a/buildrump.sh/src/tools/genassym/Makefile ++++ b/buildrump.sh/src/tools/genassym/Makefile +@@ -17,7 +17,7 @@ ${TIMESTAMP}: genassym + ${HOST_INSTALL_FILE} -m ${BINMODE} ${.ALLSRC} ${.TARGET} + + genassym: genassym.sh +- ${TOOL_SED} -e "s,/bin/sh,${HOST_BSHELL},g" \ ++ ${TOOL_SED} -e "s,\([ \!]\)/bin/sh,\1${HOST_BSHELL},g" \ + -e "s,{AWK:=.*},{AWK:="${TOOL_AWK:Q}"}," \ + < ${.ALLSRC} > ${.TARGET} + +diff --git a/buildrump.sh/src/tools/lorder/Makefile b/buildrump.sh/src/tools/lorder/Makefile +index f3c599e12..92af83d51 100644 +--- a/buildrump.sh/src/tools/lorder/Makefile ++++ b/buildrump.sh/src/tools/lorder/Makefile +@@ -17,7 +17,7 @@ ${TIMESTAMP}: lorder + ${HOST_INSTALL_FILE} -m ${BINMODE} ${.ALLSRC} ${.TARGET} + + lorder: lorder.sh +- ${TOOL_SED} -e "s,/bin/sh,"${HOST_BSHELL:Q}",g" \ ++ ${TOOL_SED} -e "s,\([ \!]\)/bin/sh,\1"${HOST_BSHELL:Q}",g" \ + -e "s,{JOIN:=.*},{JOIN:="${TOOL_JOIN:Q}"}," \ + -e "s,{MKTEMP:=.*},{MKTEMP:="${TOOL_MKTEMP:Q}"}," \ + -e "s,{NM:=.*},{NM:="${NM:Q}"}," \ +-- +2.39.2 + +From 9c8c93485e688bcc3db129bb56da03b18daae52c Mon Sep 17 00:00:00 2001 +From: Janneke Nieuwenhuizen +Date: Tue, 16 May 2023 08:55:51 +0200 +Subject: [PATCH 3/3] squash! pci-userspace: Add acpi lookup of irqs with + fallback + +--- + debian/patches/acpi.diff | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/debian/patches/acpi.diff b/debian/patches/acpi.diff +index 8015a6e63..8e359b2c0 100644 +--- a/debian/patches/acpi.diff ++++ b/debian/patches/acpi.diff +@@ -1,6 +1,6 @@ + --- a/pci-userspace/src-gnu/Makefile.inc + +++ b/pci-userspace/src-gnu/Makefile.inc +-@@ -3,7 +3,7 @@ ++@@ -3,8 +3,8 @@ + PCIDIR:= ${.PARSEDIR} + .PATH: ${PCIDIR} + +@@ -9,6 +9,7 @@ + RUMPCOMP_USER_CPPFLAGS+=-I${PCIDIR} -I${DESTDIR}/usr/include + RUMPCOMP_CPPFLAGS+= -I${PCIDIR} -I${DESTDIR}/usr/include + CPPFLAGS+= -I${PCIDIR} ++ MIG=mig + @@ -16,3 +16,11 @@ + -user mach_debugUser.c \ + -server /dev/null \ +@@ -17,7 +18,7 @@ + +acpiUser.c: + + echo '#include ' \ + + | ${CC} -E -x c - -o - \ +-+ | mig -cc cat - /dev/null -subrprefix __ \ +++ | $(MIG) -cc cat - /dev/null -subrprefix __ \ + + -user acpiUser.c \ + + -server /dev/null \ + + -header acpi_U.h +-- +2.39.2 + From patchwork Tue May 16 13:48:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 50041 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A97EA27BBE9; Tue, 16 May 2023 14:49:48 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DE1B127BBE2 for ; Tue, 16 May 2023 14:49:47 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyv33-0004IE-Gv; Tue, 16 May 2023 09:49:05 -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 1pyv31-0004HA-HI for guix-patches@gnu.org; Tue, 16 May 2023 09:49:03 -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 1pyv31-0004Jm-94 for guix-patches@gnu.org; Tue, 16 May 2023 09:49:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pyv31-0007eo-5B for guix-patches@gnu.org; Tue, 16 May 2023 09:49:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63527] [PATCH v2 2/3] gnu: hurd: Add rumpkernel. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 May 2023 13:49:03 +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.168424494029408 (code B ref 63527); Tue, 16 May 2023 13:49:03 +0000 Received: (at 63527) by debbugs.gnu.org; 16 May 2023 13:49:00 +0000 Received: from localhost ([127.0.0.1]:45772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyv2x-0007eB-VW for submit@debbugs.gnu.org; Tue, 16 May 2023 09:49:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyv2u-0007dT-IU for 63527@debbugs.gnu.org; Tue, 16 May 2023 09:48:58 -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 1pyv2p-0004IF-CI; Tue, 16 May 2023 09:48:51 -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=oJlzhM2EtZTxYs9/OtZH9nYMALaefAyBMm3TTTXWNi0=; b=G1oEYXAL0DHPJDUkgnSN ypaaYWeNHacptbU9gfkZ7ku4vUMOfArprZw6HgecsIeeD7jSPyiL58au3yn1I/lNSTO6coYje4eGo JJ8NqvfZLk7bGU9TJZ2Ct34HigPkNs7YbwT8lJdIl9nPJekge57Li1tb/vGTxLB2guZ+MiqRrfsCS Pio20A7DMhRjXGOiJdDcXI/rsyULaN9nLL208Twp2ZMUmcnXzxjv8k1QOR6j2U5lBykHqJFaNxH5z zJQmx14c176JBvGBTHDwfU+7rfZ2mSofzeYr9yS2h/zyu63iEXj1ekMA6+4P5TiJsjdnO13yPEHPt Jh1GlcDqEiRhEA==; 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 1pyv2p-00086i-02; Tue, 16 May 2023 09:48:51 -0400 From: Janneke Nieuwenhuizen Date: Tue, 16 May 2023 15:48:45 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/hurd.scm (hurd)[inputs]: Add rumpkernel. [arguments]: Rename `prepare-dde' phase to 'prepare-addons'. Add "rumpdisk" directory. Add --enable-static-progs=... option to #:configure-flags. --- gnu/packages/hurd.scm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 8edf5d91c6..e419859c05 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -356,7 +356,7 @@ (define-public hurd (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'prepare-dde + (add-after 'unpack 'prepare-addons (lambda* (#:key native-inputs inputs #:allow-other-keys) ;; First we import the things we want from dde. (for-each make-file-writable (find-files ".")) @@ -370,7 +370,10 @@ (define-public hurd ;; Makefile. libdde_linux26 is built later in its own phase. (substitute* "Makefile" (("libbpf ") - "libbpf libmachdevdde libddekit")))) + "libbpf libmachdevdde libddekit rumpdisk")) + (substitute* "rumpdisk/Makefile" + (("rumpdev_ahcisata" all) + (string-append all " rumpdev_ata"))))) (add-after 'unpack 'find-tirpc (lambda* (#:key inputs #:allow-other-keys) (for-each (lambda (var) @@ -533,6 +536,7 @@ (define-public hurd #:configure-flags ,#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib") + "--enable-static-progs=ext2fs,iso9660fs,rumpdisk,pci-arbiter,acpi" "--disable-ncursesw" "--without-libbz2" "--without-libz" @@ -541,7 +545,11 @@ (define-public hurd ;; clnt_create "ac_func_search_save_LIBS=-ltirpc" "ac_cv_search_clnt_create=false" - "CFLAGS=-fcommon"))) + "CFLAGS=-fcommon") + #:make-flags + (list (string-append "RUMPPATH=" + (assoc-ref %build-inputs "rumpkernel") + "/lib")))) (build-system gnu-build-system) (inputs `(("libgcrypt" ,libgcrypt) ;for /hurd/random @@ -557,7 +565,8 @@ (define-public hurd ("coreutils" ,coreutils) ("sed" ,sed) ("grep" ,grep) - ("util-linux" ,util-linux))) + ("util-linux" ,util-linux) + ("rumpkernel" ,rumpkernel))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) From patchwork Tue May 16 13:48:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Janneke Nieuwenhuizen X-Patchwork-Id: 50042 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id ED1BB27BBE9; Tue, 16 May 2023 14:50:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 078F627BBE2 for ; Tue, 16 May 2023 14:50:14 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pyv40-0005q5-5F; Tue, 16 May 2023 09:50:04 -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 1pyv3z-0005pc-18 for guix-patches@gnu.org; Tue, 16 May 2023 09:50:03 -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 1pyv3y-0004Uq-Ni for guix-patches@gnu.org; Tue, 16 May 2023 09:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pyv3y-0007gn-JH for guix-patches@gnu.org; Tue, 16 May 2023 09:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63527] [PATCH v2 3/3] DRAFT system: hurd: Boot with pci.arbiter and rumpdisk. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 16 May 2023 13:50:02 +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.168424494729463 (code B ref 63527); Tue, 16 May 2023 13:50:02 +0000 Received: (at 63527) by debbugs.gnu.org; 16 May 2023 13:49:07 +0000 Received: from localhost ([127.0.0.1]:45777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyv34-0007f9-Dl for submit@debbugs.gnu.org; Tue, 16 May 2023 09:49:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pyv2v-0007dW-5i for 63527@debbugs.gnu.org; Tue, 16 May 2023 09:48:58 -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 1pyv2p-0004IN-V1; Tue, 16 May 2023 09:48:51 -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=HiDTInrTu63V/Px0vRdE+BACW5iH9PypFWKCI0xPMvY=; b=ebKqFXPXwaEsgZv6l8Tt +KZVq6Mp+c+5UlTrj7EO4p/+m4YpLTAF8mmuo1+BeTQa4rSxVI08FVJPxiFByrTfcXnZvsDN+Su+a NUNvnQ5Y+W44q2GAhtK7LCOS679NPqIKybhIG7r0rYYeaxTSkDuytOFH9F1Ha8yYceoeb94SC4hk1 3rQq7zf2XQTvPXKKUdTsA4rN15GKKU+d3kHxszVKG2Yj6tdqdROA0QjxQhO88KAdZK9zYWQvzjtEq WvbZcbJrk3mCmKTAIrvCaFWI+9gdcX0B+33go7mva6OVmqlpuN0Tro7ZmCZyCYDz2IP5qJdJw/XJ5 fw4hK9R0s8EZ6w==; 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 1pyv2p-00086i-Ib; Tue, 16 May 2023 09:48:51 -0400 From: Janneke Nieuwenhuizen Date: Tue, 16 May 2023 15:48:46 +0200 Message-Id: <6ac4d3d9d5e19a86304e6bcefced3cf88462bbf5.1684244425.git.janneke@gnu.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches XXX This hangs at start pci.arbiter: * gnu/system.scm (hurd-multiboot-modules): Add commands for pci.arbiter and rumpdisk. --- gnu/system.scm | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 354f58f55b..12e646ad51 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -10,7 +10,7 @@ ;;; Copyright © 2020, 2021 Brice Waegeneire ;;; Copyright © 2020 Florian Pelz ;;; Copyright © 2020, 2022 Maxim Cournoyer -;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen ;;; Copyright © 2020, 2022 Efraim Flashner ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 raid5atemyhomework @@ -1486,16 +1486,28 @@ (define (operating-system-multiboot-modules os) (define (hurd-multiboot-modules os) (let* ((hurd (operating-system-hurd os)) + (pci-arbiter-command + (list (file-append hurd "/hurd/pci-arbiter.static") + "pci.arbiter" + "--host-priv-port='${host-port}'" + "--device-master-port='${device-port}'" + "--next-task='${disk-task}'" + "'$(pci-task=task-create)'" + "'$(task-resume)'")) + (rumpdisk-command + (list (file-append hurd "/hurd/rumpdisk.static") + "rumpdisk" + "--next-task='${fs-task}'" + "'$(disk-task=task-create)'")) (root-file-system-command (list (file-append hurd "/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}'" "--store-type=typed" "--x-xattr-translator-records" - "'${root}'" "'$(task-create)'" "'$(task-resume)'")) + "'${root}'" + "'$(fs-task=task-create)'")) (target (%current-target-system)) (libc (if target (with-parameters ((%current-target-system #f)) @@ -1512,7 +1524,10 @@ (define (hurd-multiboot-modules os) ;; (file-append hurd "/hurd/exec") "'$(exec-task=task-create)'") (list (file-append hurd "/hurd/exec.static") "exec" "'$(exec-task=task-create)'"))) - (list root-file-system-command exec-server-command))) + (list pci-arbiter-command + rumpdisk-command + root-file-system-command + exec-server-command))) (define* (operating-system-boot-parameters os root-device #:key system-kernel-arguments?)