all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Giovanni Biscuolo <g@xelera.eu>
To: Julien Lepiller <julien@lepiller.eu>, guix-devel@gnu.org
Subject: Re: wip blog post: running Guix System on ARM
Date: Thu, 14 Nov 2019 10:10:46 +0100	[thread overview]
Message-ID: <87blteomax.fsf@roquette.mug.biscuolo.net> (raw)
In-Reply-To: <20191113222154.6eb6a78c@sybil.lepiller.eu>

[-- Attachment #1: Type: text/plain, Size: 4585 bytes --]

Hi Julien,

Julien Lepiller <julien@lepiller.eu> 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 will
> 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=/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 file if it is loaded
> as a module.  Most distros however build these modules in the kernel directly, so Guix cannot
> detect them reliably.  Another way to find what drivers might be needed is 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?) ?

--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 partitions
    "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 C602
          '())

    ,@virtio-modules))
--8<---------------cut here---------------end--------------->8---

I mean something like adding a proper form of this pseudocode:

--8<---------------cut here---------------start------------->8---
    ,@(if (string-match "^(<architecture+SoC>)-" system)
          '("sd_mod" "ahci_sunxi"    ;for sunxi ATA controller
            "sunxi-mmc")             ;for sunxi MMC
          '())
--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 to partition your SSD
> to your liking, format your new partations and make sure to reference the correct partition
                                      ^ i (typo)
[...]

Thanks! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2019-11-14  9:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 21:21 wip blog post: running Guix System on ARM Julien Lepiller
2019-11-14  9:10 ` Giovanni Biscuolo [this message]
2019-11-14  9:29 ` Pierre Neidhardt
2019-11-14 10:32   ` zimoun
2019-11-14 11:05   ` pelzflorian (Florian Pelz)
2019-11-17 16:53     ` Julien Lepiller
2019-11-17 19:39   ` Ludovic Courtès
2019-11-14 12:12 ` Danny Milosavljevic
2019-11-17 16:57   ` wip blog post (v2): " Julien Lepiller
2019-11-18 17:03     ` Danny Milosavljevic
2019-11-23 17:19       ` Ludovic Courtès
2019-11-24  7:56         ` Julien Lepiller
2019-11-17 19:37   ` wip blog post: " Ludovic Courtès
2019-11-17 19:43 ` Ludovic Courtès
2019-11-18  8:25   ` Pjotr Prins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blteomax.fsf@roquette.mug.biscuolo.net \
    --to=g@xelera.eu \
    --cc=guix-devel@gnu.org \
    --cc=julien@lepiller.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.