Message ID | cover.1684177770.git.janneke@gnu.org |
---|---|
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3D76827BBE2; Mon, 15 May 2023 20:36:21 +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 E591927BBE9 for <patchwork@mira.cbaines.net>; Mon, 15 May 2023 20:36:18 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1pydzH-0008Jm-GQ; Mon, 15 May 2023 15:36:03 -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 <Debian-debbugs@debbugs.gnu.org>) id 1pydzG-0008JX-QP for guix-patches@gnu.org; Mon, 15 May 2023 15:36:02 -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 <Debian-debbugs@debbugs.gnu.org>) id 1pydzG-0008G2-I6 for guix-patches@gnu.org; Mon, 15 May 2023 15:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pydzG-0004A0-Ct for guix-patches@gnu.org; Mon, 15 May 2023 15:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63527] [PATCH 0/3] Initial attempt at rumpdisk support for the Hurd. Resent-From: Janneke Nieuwenhuizen <janneke@gnu.org> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 May 2023 19:36:02 +0000 Resent-Message-ID: <handler.63527.B.168417934115964@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63527 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63527@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168417934115964 (code B ref -1); Mon, 15 May 2023 19:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 May 2023 19:35:41 +0000 Received: from localhost ([127.0.0.1]:44467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1pydyu-00049Q-Us for submit@debbugs.gnu.org; Mon, 15 May 2023 15:35:41 -0400 Received: from lists.gnu.org ([209.51.188.17]:40732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <janneke@gnu.org>) id 1pydys-00049G-9c for submit@debbugs.gnu.org; Mon, 15 May 2023 15:35:40 -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 <janneke@gnu.org>) id 1pydyr-0008H9-RC for guix-patches@gnu.org; Mon, 15 May 2023 15:35:37 -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 <janneke@gnu.org>) id 1pydyr-00087V-4F; Mon, 15 May 2023 15:35:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=ZSC+njlzsJzVusOEFMp8IElczBrSudSZ8ei/0hxpv1A=; b=JAUqEve87iR0ls FntOuCt7CUa/EHbt86Y+OSxDR+NkxiYW1nJz9QB7OOjEiZLzpr0IiQfa7iTbDRcoV4lpK45trSSaW 0+cdMHe+nLyqYOzxrpBQ+Wn9HsKbSkSCV2kNgWBHQnoF2jhWq4PtU/Gjn7UKOKGCv0lA6vqll5CO/ rxCk8Rv7MLGe4bsf9u+pjKZ2cSRusf2yweljOJra6oeO93VoSs6p2XFKtj7mDutXHiEcBdpOLT7ez 6cj17ckpGDr9tdiVDzzoQ6oJredfJjfqU3PSsJ0uk4G+AAHb/B5sEn4KBFZ5pJMBVX0rLWGjQ9ZGr mLlyrQnnj/1JKU/tvb1Q==; 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 <janneke@gnu.org>) id 1pydyp-0002Bh-9Y; Mon, 15 May 2023 15:35:36 -0400 From: Janneke Nieuwenhuizen <janneke@gnu.org> Date: Mon, 15 May 2023 21:35:31 +0200 Message-Id: <cover.1684177770.git.janneke@gnu.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=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 |
Series |
Initial attempt at rumpdisk support for the Hurd.
|
|
Message
Janneke Nieuwenhuizen
May 15, 2023, 7:35 p.m. UTC
Hi! Some time ago we kind of promised to move forward with the Hurd[0] and while we have had this pretty neat "childhurd" feature for some time[1], to really do that we should get it to boot on real iron. An important ingredient to make that happen made it into Hurd upstream over a year ago[2]: rumpdisk support making use of the NetBSD rumpkernel[3]. Building this rumpkernel is a bit tricksy, Debian uses an import of the NetBSD git archive[4] --which is quite large--with some twenty-odd custom patches[5]. Some of us asked bug-hurd to document their rumpkernel support[6] or distribute it in a less Debian-centric and more usual way to make it more digestible for other parties (such as Guix) to adopt, but that was rejected at the time[7]. Inspired by Josselin Poiret's recent Hurd updates[8] our chats on IRC and especially their succes in getting it to boot again on master[9], I decided to just take the easiest route possible and build the rumpkernel from Debian's salsa package git archive and its patch series. The good news is that with this patch series the Hurd now has two additional servers: pci.arbiter and rumpdisk. Sadly, it currently hangs for me on --8<---------------cut here---------------start------------->8--- start: pci.arbiter: --8<---------------cut here---------------end--------------->8--- Anyway, while this builds, we probably do not want to rely on Debian's packaging support in this way but I'm also not sure what would be a better course of action right now. Other than asking bug-hurd again to create an upstream for their code outside/independent of their packaging. Help and thoughts much appreciated! See also: https://gitlab.com/janneke/guix/-/tree/wip-hurd Greetings, Janneke PS: I build it like this --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix system image -t hurd-qcow2 gnu/system/examples/bare-hurd.tmpl --8<---------------cut here---------------end--------------->8--- and start it doing --8<---------------cut here---------------start------------->8--- guix shell qemu -- qemu-system-i386 \ -m 1024 \ --enable-kvm \ --device rtl8139,netdev=net0 \ --netdev user,id=net0,hostfwd=tcp:0.0.0.0:11022-:2222 \ --snapshot \ --hda /gnu/store/0zmdmjafmz0hgzw3gszl38nd0n2bblq9-disk-image --8<---------------cut here---------------end--------------->8--- [0] https://guix.gnu.org/en/blog/2020/deprecating-support-for-the-linux-kernel/ [1] https://guix.gnu.org/en/blog/2020/childhurds-and-substitutes/ [2] https://archive.fosdem.org/2022/schedule/event/dzammit/ [3] https://wiki.netbsd.org/rumpkernel [4] https://salsa.debian.org/hurd-team/rumpkernel [5] https://salsa.debian.org/hurd-team/rumpkernel/-/tree/master/debian/patches [6] https://lists.gnu.org/archive/html/bug-hurd/2022-02/msg00020.html [7] https://lists.gnu.org/archive/html/bug-hurd/2022-02/msg00051.html [8] https://mail.gnu.org/archive/html/guix-patches/2023-03/msg01597.html [9] https://issues.guix.gnu.org/63501 Janneke Nieuwenhuizen (3): DRAFT gnu: Add rumpkernel. gnu: hurd: Add rumpkernel. DRAFT system: hurd: Boot with pci.arbiter and rumpdisk. gnu/packages/hurd.scm | 232 +++++++++++++++++++++++++++++++++++++++++- gnu/system.scm | 26 ++++- 2 files changed, 248 insertions(+), 10 deletions(-) base-commit: 555a41f31c9ec9f4344d00beb94f663b44017019
Comments
Hi, Our patches for the rumpkernel crossbuild have been accepted upstream https://lists.gnu.org/archive/html/bug-hurd/2023-05//msg00276.html which makes our rumpkernel package a lot nicer. I suggest using the Debian Salsa rumpkernel package as upstream for now until development has stabilized. The pci.arbiter and rumpdisk are now also built statically and the .STATIC variants are used for grub.cfg. A copy/pasto was fixed for the grub.cfg. Sadly, we only get just a little bit further, boot now hangs like this for me: start pci.arbiter: pci pci.arbiter: Starting the PCI system: Gratuitous error Greetings, Janneke Janneke Nieuwenhuizen (3): gnu: Add rumpkernel. gnu: hurd: Add rumpkernel. DRAFT system: hurd: Boot with pci.arbiter and rumpdisk. gnu/local.mk | 1 + gnu/packages/hurd.scm | 225 +++++++++++++++++- .../patches/rumpkernel-cross-build.patch | 153 ++++++++++++ gnu/system.scm | 25 +- 4 files changed, 394 insertions(+), 10 deletions(-) create mode 100644 gnu/packages/patches/rumpkernel-cross-build.patch base-commit: 555a41f31c9ec9f4344d00beb94f663b44017019
So, good progress and amazing news since the v2 series: * Add libpciaccess-0.17, and * Use that for the Hurd, * Actually setup translators for pci.arbiter and rumpdisk, * For QEMU update the memory-size to 2048MB, and * Suggest to do so in our bare-hurd.tmpl example, and * It boots! \o/ I had a lot of kind debugging help from Samuel Thibault and Sergey Bugaev on libera.chat #hurd (https://logs.guix.gnu.org/hurd/2023-05-17.log#132259) as well as on the bug-hurd list (https://lists.gnu.org/archive/html/bug-hurd/2023-05//msg00326.html) to get here, thank you! With https://issues.guix.gnu.org/63501 by Josselin Poiret being merged yesterday and this patch series we now have Rumpkernel/rumpdisk support for the Hurd! I've now succesfully been doing something like --8<---------------cut here---------------start------------->8--- ./pre-inst-env guix system image -t hurd-raw gnu/system/examples/bare-hurd.tmpl guix shell qemu -- qemu-system-i386 \ -m 4096 \ --enable-kvm \ --device rtl8139,netdev=net0 \ --netdev user,id=net0,hostfwd=tcp:0.0.0.0:11022-:2222 \ --snapshot \ --no-reboot \ --hda /gnu/store/r5dpblnfsj08jh3hdmn8s6l9xaczwn65-disk-image --8<---------------cut here---------------end--------------->8--- and ssh into the Hurd VM again. (Should we update the the Childhurds blogpost too, it suggest -m 512 https://guix.gnu.org/en/blog/2020/childhurds-and-substitutes/?) Greetings, Janneke Janneke Nieuwenhuizen (7): gnu: Add libpciaccess-0.17. gnu: hurd: Update libpciaccess to 0.17. gnu: Add rumpkernel. gnu: hurd: Add rumpkernel. hurd-boot: Setup pci-arbiter and rumpdisk translators. services: childhurd: Bump default qemu memory to 2048MB. system: hurd: Boot with pci.arbiter and rumpdisk. gnu/build/hurd-boot.scm | 10 +- gnu/packages/hurd.scm | 231 ++++++++++++++++++++++++++++- gnu/packages/xorg.scm | 17 +++ gnu/services/virtualization.scm | 4 +- gnu/system.scm | 25 +++- gnu/system/examples/bare-hurd.tmpl | 4 +- 6 files changed, 271 insertions(+), 20 deletions(-) base-commit: 5b700945fb0b33eec410de8979cae2fbf0d4f118
Most everything mentioned in the v3 patch series still holds, apart from the little fact that the rumpkernel will panic unless we use the complete time patches from Debian Salsa glibc package management, as was discussed/suggested on IRC by youpi: https://logs.guix.gnu.org/hurd/2023-05-17.log#150916 So one additional patch for cross-glibc, no changes in any of the patches since v3. Greetings, Janneke Janneke Nieuwenhuizen (8): gnu: glibc: Update time patches for the Hurd. gnu: Add libpciaccess-0.17. gnu: hurd: Update libpciaccess to 0.17. gnu: Add rumpkernel. gnu: hurd: Add rumpkernel. hurd-boot: Setup pci-arbiter and rumpdisk translators. services: childhurd: Bump default qemu memory to 2048MB. system: hurd: Boot with pci.arbiter and rumpdisk. gnu/build/hurd-boot.scm | 10 +- gnu/local.mk | 2 + gnu/packages/cross-base.scm | 34 ++- gnu/packages/hurd.scm | 231 +++++++++++++++++- ...bc-2.35-hurd-clock_gettime_monotonic.patch | 137 +++++++++++ ...glibc-2.35-hurd-clock_t_centiseconds.patch | 63 +++++ gnu/packages/xorg.scm | 17 ++ gnu/services/virtualization.scm | 4 +- gnu/system.scm | 25 +- gnu/system/examples/bare-hurd.tmpl | 4 +- 10 files changed, 504 insertions(+), 23 deletions(-) create mode 100644 gnu/packages/patches/glibc-2.35-hurd-clock_gettime_monotonic.patch create mode 100644 gnu/packages/patches/glibc-2.35-hurd-clock_t_centiseconds.patch base-commit: 5b700945fb0b33eec410de8979cae2fbf0d4f118