On Thu, 27 Mar 2025 11:48:21 -0700
Vagrant Cascadian <vagr...@debian.org> wrote:

> First I would boot your MNT Reform with whatever OS you have now. You
> will need to make some changes to kernel-arguments (check the contents
> of /proc/cmdline) and initrd-modules (check lsmod output).
[...]
> For the initrd-modules, you should be able to just add all the modules
> you get from lsmod. Probably overkill, but hopefully will work! :)
On many ARM computers it's not overkill, you often lack very basic
modules for linux-libre or linux-libre-lts (example: rockpro64). I'm
unsure how to fix this mess.

linux-libre-arm64-generic usually works fine for booting but then you
miss things like the Wireguard module, so I'm unsure if there is only
Wireguard or if it's a bigger issue.

The way forward now is to create system configurations in
gnu/system/images/ but it doesn't address the problem of how to
actually generate this module list in a convenient way.

And while the module list in the machine config might work, the list is
also tied to a specific kernel version as modules get renamed or
split (like rk808_regulator, rk8xx-i2c), even for modules that are
required for booting, so it also requires some maintenance (basically
to reconfigure + reboot from time to time + sending patches).

If someone has ideas here on how to generate module names from
linux-libre-arm64-generic it would be more than welcome as it would
simplify things a lot.

So far I did it manually, by looking in the devicetree and from there
getting the driver names and from there getting the module name, cross
referenced with the kernel configuration shipped by Guix (CONFIG_*) and
I end up with something like that:
> (initrd-modules
>  (append                     
>   (list                     
>    "dw_mmc-rockchip"        ;; CONFIG_MMC_DW_ROCKCHIP         for uSD boot
>    "dwc3"                   ;; CONFIG_USB_DWC3                for USB boot
>    "dwc3_of_simple"         ;; CONFIG_USB_DWC3_OF_SIMPLE      for USB boot
>    "ehci_platform"          ;; CONFIG_USB_EHCI_HCD_PLATFORM   for USB boot
>    "fixed"                  ;; CONFIG_REGULATOR_FIXED_VOLTAGE for USB boot
>    "i2c_rk3x"               ;; CONFIG_I2C_RK3X                for uSD boot
>    "mmc_block"              ;; CONFIG_MMC_BLOCK               for eMMC boot
>    "ohci_platform"          ;; CONFIG_USB_OHCI_HCD_PLATFORM   for USB boot
>    "phy_rockchip_emmc"      ;; CONFIG_PHY_ROCKCHIP_EMMC       for eMMC boot
>    "phy_rockchip_inno_usb2" ;; CONFIG_PHY_ROCKCHIP_INNO_USB2  for USB boot
>    "phy_rockchip_usb"       ;; CONFIG_PHY_ROCKCHIP_USB        for USB boot
>    "pl330"                  ;; CONFIG_USB_SERIAL_PL2303       for uSD boot
>    "rk8xx-core"             ;; CONFIG_MFD_RK8XX               for uSD boot
>    "rk8xx-i2c"              ;; CONFIG_MFD_RK8XX_I2C           for uSD boot
>    "rk808_regulator"        ;; CONFIG_REGULATOR_RK808         for uSD boot
>    "sd_mod"                 ;; CONFIG_BLK_DEV_SD              for USB boot
>    "sdhci_of_arasan"        ;; CONFIG_MMC_SDHCI_OF_ARASAN     for eMMC boot
>    "uas"                    ;; CONFIG_USB_UAS                 for USB boot
>    "usb_storage"            ;; CONFIG_USB_STORAGE             for USB boot
>    "xhci_plat_hcd")         ;; CONFIG_USB_XHCI_PLATFORM       for USB boot
>    %base-initrd-modules))

I also plan to upstream all that at some point, but I also have other
issues with GRUB on this computer (I want to upstream something that I
can test and that actually works), and it's also my main server so that
complicates things.

So it would probably be easier for me to upstream support for another
ARM computer first (like the rock (pi) 4c plus), hence this mail as
once u-boot/grub is fixed I'll need to re-generate the modules for this
computer to upstream support for it.

Denis.

Attachment: pgpcd6HNK3asU.pgp
Description: OpenPGP digital signature

Reply via email to