From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IEQFNywO/WNaGAAAbAwnHQ (envelope-from ) for ; Mon, 27 Feb 2023 21:10:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id wPoENiwO/WPxHQAAG6o9tA (envelope-from ) for ; Mon, 27 Feb 2023 21:10:20 +0100 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 9426FAB8C for ; Mon, 27 Feb 2023 21:10:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWjog-0005Zg-CC; Mon, 27 Feb 2023 15:09:46 -0500 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 1pWjoe-0005Xt-TY for guix-devel@gnu.org; Mon, 27 Feb 2023 15:09:44 -0500 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWjoc-0003NM-RV for guix-devel@gnu.org; Mon, 27 Feb 2023 15:09:44 -0500 Received: by mail-ed1-x532.google.com with SMTP id cq23so30840974edb.1 for ; Mon, 27 Feb 2023 12:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:mail-followup-to:message-id :subject:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=UqxjY2rBn79hExA9uxBoRGm0YTcqgo+CZWCjxSDbpYg=; b=mk5s3/modCQO0+yGwjS+cYIrb1lvrtTKDtF4u/kV0GoanaDM1vehRLd/sIxfwyaZ+i 2zyq0Kar7vLgH0HA1C6y2vaqOEOT8+3PPG6BzDw0U8X6BkrxnzzPiAjgZb1E3WjMLJKY GV4/+9orfHiBvq3Axtxvua+7MUnL2wUDgcSEalHGTBb0lF7N+z4DPdW84mubUQq4+rGo qMpCcvXDU4/6Zhco5bpMs0nCkexTAiN9ZP/aQ509NKqczhwy7hThs4NAQcpwXKF2CS3d XHMs9qZIZ+lPbokjubpVhTWWClbPzvgeIPWLcNi1lYXCSxfvHJNVLv1yH9QaBuyPLYZ9 Pw6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:mail-followup-to:message-id :subject:to:from:date:sender:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=UqxjY2rBn79hExA9uxBoRGm0YTcqgo+CZWCjxSDbpYg=; b=JjdL7C4Knd9ljGGRsNKKXzaC/HRnchONfYvdP33nMJZL8ZCzA2iOvK1MD+euZyU9Qy jMnD2n+WU6rZMp76jVLjbMa5O4hthWikOCGiVySmQvxTRxxslsSMMt3VXauTrAfmmfd2 JoNPVVvh9rwacgkKrZF5KbnCkWYOiXGvtryrbSpyUNAauTnW/ij1efHz3DqwP611o4S4 AxNQTNC2VWosZTr9lb5r+IkBVMCOjIupNtjBuRp8m+ygBn24KeDTZeyzNRugHQumf2IW CvzZxaZZnFBoDhbXsri19cpWRpxvNWgWlOPRSBLgxx9pbn5tqUbnqHuzYqEbx4f4wOu0 kZgA== X-Gm-Message-State: AO0yUKXc1HNhpMkPXyrtzbENrjKH2lswztkT6VUdR6j5Z2NYdfXu3GQD YcOssj8PX+4lOUSnbuEhjtNPVslWtFPF/g== X-Google-Smtp-Source: AK7set9RL5SXpdvJvIXoTLAmNDv+HtHMROLaDA2UsM0WiM+Boa6o6SxPCnO2EdSVyBsOD89NqQldOQ== X-Received: by 2002:a17:906:8315:b0:88d:3c85:4ccf with SMTP id j21-20020a170906831500b0088d3c854ccfmr29381129ejx.25.1677528580978; Mon, 27 Feb 2023 12:09:40 -0800 (PST) Received: from localhost ([2a02:ed3:910:9200:b62e:99ff:fef0:7bc0]) by smtp.gmail.com with ESMTPSA id j19-20020a170906535300b008bbc9115038sm3635478ejo.56.2023.02.27.12.09.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 12:09:40 -0800 (PST) Date: Mon, 27 Feb 2023 22:09:38 +0200 From: Efraim Flashner To: guix-devel@gnu.org Subject: universal aarch64/riscv64 images Message-ID: Mail-Followup-To: guix-devel@gnu.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="X5ILiWkJXwEQdfY9" Content-Disposition: inline X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=efraim.flashner@gmail.com; helo=mail-ed1-x532.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-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=1677528620; a=rsa-sha256; cv=none; b=DO25eSsdrGhAf2ulD9GsWnbr/pCU0yf00LEdpzJMPo6hrkQqKe5rybZScgAB8b/K060KVN 0xkK87iWxDJq3Z6/D32LtIYDMoRxDKSC2k8bTBaPrvjMycSVFgDwLB+V5rJDf7Ei78VmOQ Ga3GXQfPEAR+N+OkcKnmgjqwxJ9upVA8Wewa6s20RAqhkRmeLI7jrUSuFjn+yOUQ4berHd zKt7JGUfQfG7Y4KwwwwsnuKDpsH7zXKEOtxeQxkOKjwgmGEX4QnpCvkVbUTBxnqv6Ldhx1 SEXMhT2xSarP80day7T5UHX7w1eaQ6LPmEz4vfTL5wc2cWwXqIKvZ6uEikMglw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="mk5s3/mo"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677528620; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=UqxjY2rBn79hExA9uxBoRGm0YTcqgo+CZWCjxSDbpYg=; b=Bn7HNZHT4VGuASXSxC0998BHL+sVfNdgI4K5mh9octAkZU9wGaNenT7W3R4QZNkwrF/r+m oLcPnPtHjkvuymeniBEDDqJFZ2ZZcAtwscVAXaivx4z+6eiBnuNYwTUiV4UqgCUXV/Vxrw mROZRk6ejmzwOvsmG/m7Yup20YCKX1E8LOgYXdshqkyAWYRsRC0o5l8EkksxQO4GdXmt3S FxnvwaS/o/+KK43+yypMgG+vNga/Yvdyg8haBNffB+yMJJRlg6B0qqL/1PiyasGSRFHYEf jhH+QwVnJtF4cyOaGlgFJxY7glk9evPfZ9A+pPb/w04iflv/Xg5z74RX6+Y0zw== X-Migadu-Spam-Score: -2.82 X-Spam-Score: -2.82 X-Migadu-Queue-Id: 9426FAB8C X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="mk5s3/mo"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-TUID: rnSYwIdjt06K --X5ILiWkJXwEQdfY9 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I've been thinking some about how we create our disk images for aarch64 devices and how we'll eventually create images for riscv64 devices. Currently we use u-boot to load extlinux to boot linux. I propose we use u-boot with its EFI interface to load grub-efi to boot linux. Major benefit of this is that we can create one generic aarch64 image using raw-with-offset to create the image and then ship a separate script to flash either the SD card or an SPI chip or whatever someone wants. We also don't need to reflash u-boot at every reconfigure (I couldn't follow the code well enough to see if that's currently the case), just regenerate extlinux or grub-efi like we do on x86_64. Currently here's the script to install u-boot on the disk image for a pine6= 4: (define install-allwinner64-u-boot #~(lambda (bootloader root-index image) (let ((spl (string-append bootloader "/libexec/u-boot-sunxi-with-spl.= bin")) (u-boot (string-append bootloader "/libexec/u-boot-sunxi-with-s= pl.fit.itb"))) (write-file-on-device spl (stat:size (stat spl)) image (* 8 1024)) (write-file-on-device u-boot (stat:size (stat u-boot)) image (* 40 1024))))) And in the OS config: (bootloader (bootloader-configuration (bootloader u-boot-pine64-lts-bootloader) (targets '("/dev/vda")))) This would transition to (work in progress): (define install-allwinner64-u-boot #~(lambda (bootloader root-index image) (let ((spl (string-append bootloader "/libexec/u-boot-sunxi-with-spl.= bin")) (u-boot (string-append bootloader "/libexec/u-boot-sunxi-with-s= pl.fit.itb"))) (write-file-on-device spl (stat:size (stat spl)) image (* 8 1024)) (write-file-on-device u-boot (stat:size (stat u-boot)) image (* 40 1024))))) ;; This needs to be fixed up to actually work!! ;; To be run (as root): 'u-boot-installer-pine64-lts /dev/sda' (define-public u-boot-installer-pine64-lts (program-file "u-boot-installer-pine64-lts" #~((let ((bootloader u-boot-pine64-lts) (image $1))) #$(install-allwinner-u-boot)))) (bootloader (bootloader-configuration (bootloader grub-efi) (targets '("/dev/vda")))) (extra-special-file `(("/sbin/flash-u-boot" ,u-boot-installer-pine64-lts))) --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --X5ILiWkJXwEQdfY9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmP9Df8ACgkQQarn3Mo9 g1GpqxAAuO48WZiqi2FKobb3E1jy+iQaLHcpldeKnv1Mkw3TCXKNSIcQKubjWPMq Z2c6t0abS61LMjDyjavd6GNN70Eov6YQLuewbIAKTOmgP2nswJoo4iphiBAW+0tV QUi/DbMAWTfT6lqWyBflVPtWAOZCqm5wxJRdjbfvk94gKa+NWpCfc0RTcfwhnrAE cKoeQUak9wdVAqVOHfqAvoMqCqSovKzpKoFEopzulvKYt3ypUFan50bcNwdFsQeM Yx3F40mhKegULhB6MrYHhg3J5Gfwj0P7DkiLiYn7tUA0rzIIGDP3d7vjweir65P3 qgox0nW8ZL3f8++QJhBfrtjZwCAPGb26PauiNGVlho6alEcN801YwKUINVOXbkoM 0P3C0Pnnhgzd/NwMhBwuO/sXx4eB3FSnHDnrXauYmpg0j1tvH629HJazdnIN9TPi bDlFwqZN+xbFDtaqC2U8zc1hs3RkcgfA5iRmTvtwBdDqWb+DwCN43cxJEzOYVfHL gf6CdkmKG5fiYJSCvx09JA8qs8+Lp0dueuy7dXnhjXxQ/n+YgWPp+zdRtIL9pU9m GHbghU2LCUZtZtWtF5G0nwKOmNGnwCyFT9+tvttEippeJjWWUgwD7zV4xF70hjQZ Ao9bJBg+7rzvweB8erPtX4POZQf49xq5GRp7CiSjHZqdBnISeBM= =Nl34 -----END PGP SIGNATURE----- --X5ILiWkJXwEQdfY9--