From debbugs-submit-bounces@debbugs.gnu.org Wed May 20 17:59:03 2020 Received: (at 41350) by debbugs.gnu.org; 20 May 2020 21:59:03 +0000 Received: from localhost ([127.0.0.1]:54560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbWjv-0006KU-Hj for submit@debbugs.gnu.org; Wed, 20 May 2020 17:59:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jbWjt-0006K0-Ol for 41350@debbugs.gnu.org; Wed, 20 May 2020 17:59:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59709) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbWjn-0005Ea-KK; Wed, 20 May 2020 17:58:55 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=56660 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jbWjm-0003U2-6g; Wed, 20 May 2020 17:58:54 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: "Jan \(janneke\) Nieuwenhuizen" Subject: Re: [PATCH v2 3/3] system: vm: Build vm-image using native qemu, for the Hurd. References: <20200519072302.9202-1-janneke@gnu.org> <20200519072302.9202-3-janneke@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 2 Prairial an 228 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 20 May 2020 23:58:52 +0200 In-Reply-To: <20200519072302.9202-3-janneke@gnu.org> (Jan Nieuwenhuizen's message of "Tue, 19 May 2020 09:23:02 +0200") Message-ID: <87367ue09v.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41350 Cc: Mathieu Othacehe , 41350@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Howdy! "Jan (janneke) Nieuwenhuizen" skribis: > Cross-building a vm-image is usually done using a cross-qemu, e.g, qemu-A= RM, > because, e.g., a native, x86_64 Grub cannot install an armhf-Grub. That > solution does not work for the Hurd, as there is no qemu-HURD. > > This patch enables cross building vm-images for the Hurd using a native q= emu > vm. > > * gnu/system/vm.scm (expression->derivation-in-linux-vm): Run native > qemu-command; use native linux, initrd, bootloader-package and > bootloader-installer, for the Hurd. > [preserve-target]: New helper to install cross-packages into the native v= m. > * gnu/bootloader/grub.scm (eye-candy): Use native font, for the Hurd. > > Co-authored-by: Ludovic Court=C3=A8s I think the big question here, not Hurd-specific, is about the abstractions: 1. When cross-compiling, can the =E2=80=98qemu-image=E2=80=99 procedure t= o its job by running exclusively native software (in particular using a native QEMU, native kernel, etc.)? 2. What should =E2=80=98expression->derivation-in-linux-vm=E2=80=99 do wh= en cross-compiling? I think the answer to (1) is yes, right? That is, we can build a QEMU image for AArch64/EFI from an x86_64 box. That means we=E2=80=99d run the x86_64/EFI =E2=80=98grub-install=E2=80=99 in the final step, an x86_64 =E2= =80=98mke2fs=E2=80=99 and =E2=80=98parted=E2=80=99 to create the partitions, and so on. Likewise, we= can create a QEMU GNU/Hurd image without entirely on GNU/Linux. As for (2), I=E2=80=99d say that when cross-compiling, it should just run n= ative software but simply preserve references to cross-compiled software, which is what janneke=E2=80=99s patch does. How does that sound? Mathieu? (I guess I=E2=80=99m rewording what janneke wrote, but my mind became fuzzy= last time I looked at it, so I thought it=E2=80=99s best to double-check. :-)) Thanks! Ludo=E2=80=99.