From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giovanni Biscuolo Subject: Re: wip blog post: running Guix System on ARM Date: Thu, 14 Nov 2019 10:10:46 +0100 Message-ID: <87blteomax.fsf@roquette.mug.biscuolo.net> References: <20191113222154.6eb6a78c@sybil.lepiller.eu> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:57445) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVB9T-00020l-AE for guix-devel@gnu.org; Thu, 14 Nov 2019 04:10:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVB9R-00054X-EI for guix-devel@gnu.org; Thu, 14 Nov 2019 04:10:54 -0500 Received: from ns13.heimat.it ([46.4.214.66]:57488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iVB9R-00054G-3w for guix-devel@gnu.org; Thu, 14 Nov 2019 04:10:53 -0500 In-Reply-To: <20191113222154.6eb6a78c@sybil.lepiller.eu> 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Julien Lepiller , guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Julien, Julien Lepiller writes: > Hi, attached is a draft for a blog post (or a section in the cookbook) > for explaining how to install the Guix System on an ARM board. WDYT? LOL! \O/ This should be a cookbook section, and released soon unless other people find some error or important things missing (I still do not use some ARM SoC, but hope to test soon) What about to start a wip-cookbook-install-on-arm branch with a 1/2 weeks time frame to allow patch proposals from interested parties?... then publish? :-) I have just a couple of comments and one typo... BTW discussion based on my comments should be postponed after your section is published in the cookbook, since I don't have patch proposals :-D [...] > Most boards can be booted from an existing GNU+Linux distribution. You w= ill > need to install a distribution (any of them) and install GNU Guix on it, = using > e.g. the installer script. Is it possible to install to SDD (eventually with external HDD) using another host (e.g. my laptop) with `guix system disk-image...` and then ``dd ... of=3D/dev/sdX`` on SDD? [...] > ### The kernel modules [...] AFAIU this is the only "tricky" part for the user: can we find a way for Guix to help them automagically populate the list of needed initrd kernel modules for their SoC? > Your own board may need other kernel modules to boot properly, however it= is hard to discover > them. Guix can tell you when a module is missing in your configuration f= ile if it is loaded > as a module. Most distros however build these modules in the kernel dire= ctly, so Guix cannot > detect them reliably. Another way to find what drivers might be needed i= s to look at the output > of `dmesg`. You'll find messages such as: This implies that we are booting a distro on the SoC, so (if possible) we cannot install using `guix system disk-image`. This means that the only way to make Guix automagically know the list of base modules needed for each SoC should be to... define them in Guix. Should be possible to extend (gnu system linux-initrd) whith code defining default-initrd-modules if string-match some specific SoC architectures (are they detected?) ? =2D-8<---------------cut here---------------start------------->8--- (define* (default-initrd-modules #:optional (system (or (%current-target-system) (%current-system)))) "Return the list of modules included in the initrd by default." (define virtio-modules ;; Modules for Linux para-virtualized devices, for use in QEMU guests. '("virtio_pci" "virtio_balloon" "virtio_blk" "virtio_net" "virtio_console" "virtio-rng")) `("ahci" ;for SATA controllers "usb-storage" "uas" ;for the installation image etc. "usbhid" "hid-generic" "hid-apple" ;keyboards during early boot "dm-crypt" "xts" "serpent_generic" "wp512" ;for encrypted root partitio= ns "nls_iso8859-1" ;for `mkfs.fat`, et.al ,@(if (string-match "^(x86_64|i[3-6]86)-" system) '("pata_acpi" "pata_atiixp" ;for ATA controllers "isci") ;for SAS controllers like Intel C6= 02 '()) ,@virtio-modules)) =2D-8<---------------cut here---------------end--------------->8--- I mean something like adding a proper form of this pseudocode: =2D-8<---------------cut here---------------start------------->8--- ,@(if (string-match "^()-" system) '("sd_mod" "ahci_sunxi" ;for sunxi ATA controller "sunxi-mmc") ;for sunxi MMC '()) =2D-8<---------------cut here---------------end--------------->8--- Obviously there should be quite some work to do to extend our default-initrd-modules this way for each SoC (or class of SoCs) since we should find them reading some appropriate documentation or testing things like you described in this draft, but once done it's forever and for all :-) > Installing the Guix System > -------------------------- [...] > In this scenario, we use the foreign system as we would the installer iso= , using the manual > installation procedures described in the manual. Essentially, you have t= o partition your SSD > to your liking, format your new partations and make sure to reference the= correct partition ^ i (typo) [...] Thanks! Gio' =2D-=20 Giovanni Biscuolo Xelera IT Infrastructures --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEERcxjuFJYydVfNLI5030Op87MORIFAl3NGhYACgkQ030Op87M ORLgQg//a1J7zgHelzE+Onl4/UDCQbkZXOf48mtj8QnqB7w4JjoJg1EvevL2RL6b Vo0XOYpcYwMgbaN56OhGME4CG6cjN3hG5VUuQTr5QbHuZeUwZzOd43gv0lFSlhxt Suo8P6wxm/BCW5LLv+XNXrN9TW4Q+5nfOuD8JbAoP4ftMVuMkTXYydOJtRc9Aezs ToPwBhq1USscokSO+hufeMWswHX3livozZc/xhbgr55Q+w8THhoaY67UjS1eDWrH li3JePH6nWhF2tlyCx9GwpB+GsBx2jTIHtab6Im2HPCD3jrywiYMp6YLiQPw1yC5 KaTj+iw+dU9j5b/ZHNdicLTTaWPpbNbOzDSTf0/zItAblrGpdzGpzTEJjue44dpT MoeLgKwqCpfNiBlp8UWl32J14JqS4ReTuDl1s0o5aJDSa6Z3od93pXDtSzZhYgwW OPoVhob+K4TnjQkXftcQ2fAphlgWmDcrUvYALsacgtG4DkaHKQcPcNOQIE4z2YhV 052NdNVw9Ey99EfKc6ec8Nuh90f51GZooWecGOk55W23n4KjhSHcp/xtUCFSaWXn /7Yg6GsdcICw3wa5dbOJFyndN46f9N0K/Q3DD9cmIcKz4ogYtZFVhpMhbRaMEoqw NX9yJUosVZ+hRRhmRIwMHWbxSIVFBlQJLbc18L+6824q/IAQWNU= =W4ZJ -----END PGP SIGNATURE----- --=-=-=--