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 UOqRBv9A/WOuVAAAbAwnHQ (envelope-from ) for ; Tue, 28 Feb 2023 00:47:11 +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 wOiwBf9A/WPcRQAAG6o9tA (envelope-from ) for ; Tue, 28 Feb 2023 00:47:11 +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 8E01E11538 for ; Tue, 28 Feb 2023 00:47:10 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debian.org header.s=1.vagrant.user header.b="Q+ZHwT/X"; 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"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677541630; a=rsa-sha256; cv=none; b=SKF5SamLFJ3WRQZBwzoflGMKuhrDLWtCrfeVcItfB004rmiPCzXDcAtT8pQ0Gqqxln5+Z2 riMRySU+O9YSNb0cEQSME49iKdtep2rVROgIdUmFasJh5+vwNDtnScMXvFklTXLq/FWYZL qA43aecqd22dnFY2BPP2H+KUwpSyyrdP4Yq7cnOBSKcoz8vfwruyJt59PtwLUwTtj6oBnt 9Pfs+isoO4pTxKwD35rYjrNYh3JThJ2qM8wiFm4W+2lBbZY1CHDQ8Ie018CRp+cNFg+mFP G0qfAnPh94Y5qUzFQMy8nTHcXk50trgKra5dwWYxHyz39VRD/XQ1IdHg39V3Kw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debian.org header.s=1.vagrant.user header.b="Q+ZHwT/X"; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677541630; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ck6RcTxbfHSsAGgiItGaopjxtrr1tEG+rD3riCBL2yw=; b=I27KpvaOK0TmyPm+iRYkAU0jlQ8sgeyCIKYCzb+yy8ErHYjL69GQ6sAcQ5TdvdJFreNgdn X9Ly5uLNhIsxBOOqG4WczP8IBoEFXOapt1l6cozADIBenp5QmJ6zcaJvi4GN2KcDl/yEuL 4KV792lmdB0kA7HJiSQEQiQu0s0WRZPK1simVevi4QY17clLxh5Yfxmd2OYcx13wbi26wI yChBAgZ4AZjuMhIVuPgq+mEKvjoGQ6lS6cp8CsppBaTF6U1DVOtkkzvVQqG0Umg9AqGc9/ FU+S/5Pk/FxQaU5abId03VXrCJTFFJkjJMCoI4MY48xCuz2lPHLir2RKlMV9fA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWnCd-0007At-2m; Mon, 27 Feb 2023 18:46:43 -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 1pWnCb-0007AQ-C2 for guix-devel@gnu.org; Mon, 27 Feb 2023 18:46:41 -0500 Received: from cascadia.aikidev.net ([173.255.214.101]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWnCZ-0000uh-5j for guix-devel@gnu.org; Mon, 27 Feb 2023 18:46:41 -0500 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:7:77:0:40]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id D76011AB8C; Mon, 27 Feb 2023 15:46:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=debian.org; s=1.vagrant.user; t=1677541589; bh=bj4mFufbojdnV1PhAnSrigSkJJC6RKsNJpwEtsdQDgU=; h=From:To:Subject:In-Reply-To:References:Date:From; b=Q+ZHwT/X+hFbCutkX3GU3ukZEfsgK+rTJmTfFqaALpanBbHmbEPXB3w3dH+H/WVSq GJmifXvHtYfrsvB7O7kTGHA7X23+LlHEkGVTk8R1SDiav0Cjkkp0JZUmWdi4lqFSPR 1GvT3sGJlLoaNGscaDCAytDBCQzdt9UqzLn/tT07eDUE/1BM9bNoAsXs/PqYwaWY6L gfELMDY7iHVZb7TUjkJJO6U8hFA4F4em3m4OMlGljTOxV5tu2S0iiguA71ZVRSaMWD 4e+4C3k4iZSLFvmy4YaI3Dgm88Ec1qGZehQAmnGRxp3eDzTstkqHqzvrnif7sne+kG Fah4P2CgCKt+g== From: Vagrant Cascadian To: Efraim Flashner , guix-devel@gnu.org Subject: Re: universal aarch64/riscv64 images In-Reply-To: References: Date: Mon, 27 Feb 2023 15:46:24 -0800 Message-ID: <87cz5u1xkf.fsf@yucca> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: none client-ip=173.255.214.101; envelope-from=vagrant@debian.org; helo=cascadia.aikidev.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham 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: X-Migadu-Queue-Id: 8E01E11538 X-Spam-Score: -9.41 X-Migadu-Spam-Score: -9.41 X-Migadu-Scanner: scn0.migadu.com 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-Flow: FLOW_IN X-Migadu-Country: US X-TUID: 5KZ/uer4pGmW --=-=-= Content-Type: text/plain On 2023-02-27, Efraim Flashner wrote: > 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. It is certainly worth exploring this! That said... By default u-boot will pass a device-tree from the one included u-boot, which may or may not be compatible with the kernel you want to boot. There is a mechanism for grub to load a specific device-tree, but... that will be device-specific again, kind of weakening the benefits of a device-agnostic "universal" image. Or fix grub to support a device-tree-directory (much like u-boot syslinux/extlinux support). U-boot does not (yet?) implement EFI variables, such as the boot order for EFI to load, so you have to use the fallback /EFI/BOOT/BOOTX64.efi path, rather than, say, /EFI/GUIX/GRUBX64.efi. There are probably more surprises! Ideally, you could build an image that supports both grub-efi and one of u-boot's other boot methods (boot.scr, syslinux/extlinux style menu, etc.) ... fundamentally speaking, I do not see any compelling reason you could not have both grub-efi/grub.cfg and extlinux.conf on the same boot media, and I have manually built images that do exactly that. Then people can "bring their own boot firmware" either by using a system with EFI already out of the box, or installing u-boot (possibly shipped with guix) to other media, or directly onto the image itself. Or using https://tow-boot.org, a u-boot fork for some platforms configured to be installed outside of the boot media when possible (e.g. SPI or eMMC boot partitions). For maximal compatibility, I would suggest the first partition should start at 16MB with an MBR/DOS-style partition table(GPT is basically incompatible with sunxi64), leaving the rest of the image empty up till the first partition, so that you can install u-boot directly to the image if needed or desired. Welcome to the festival of rabbit holes! live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCY/1A0QAKCRDcUY/If5cW qieoAPwIZlQLJCVgFOJWXQl3k7Os21vZYF7pF5wdtQCLJdtlngEAjRHgrbSQFEle 9ojW90g4K4/lL3l3WpMcJI2PMC505QU= =DYpZ -----END PGP SIGNATURE----- --=-=-=--