help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building installation image for ROCK64


From: Pierre Langlois
Subject: Re: Building installation image for ROCK64
Date: Sun, 12 Apr 2020 12:18:10 +0200
User-agent: mu4e 1.2.0; emacs 26.3

Hi Simon,

Simon South writes:

> Has anyone successfully built an installation image for a PINE64 ROCK64
> ARM SBC?

I managed to setup a ROCKPRO64 a few months ago (rk3399 chipset instead
of rk3328), maybe I can help :-).

>
> There's a definition for it in gnu/system/install.scm, but building the
> image with
>
>   guix system disk-image --system=aarch64-linux \
>     -e "(@ (gnu system install) rock64-installation-os)"

You probably noticed this takes a *long* time to run, making it quite
tedious to test changes (I believe this is being worked on though).

In the meanwhile, what you can do instead is setup the SD card manually,
say using fdisk & mkfs.ext4, and then use the 'guix system init' command
to install guix on it:

  $ mount /dev/mmcblk0 /mnt
  $ guix system init my-config.scm /mnt

That's considerably faster and should take care of installing guix and
the bootloader in the right place.

>
> and writing it to a microSD card fails to boot completely as the root
> filesystem can't be mounted:
>
>   GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main 
> thread
>   GC Warning: Couldn't read /proc/stat
>   Welcome, this is GNU's early boot Guile.
>   Use '--repl' for an initrd REPL.
>
>   loading kernel modules...
>   waiting for partition '416bf41b-f6b1-2062-6e00-1979416bf41b' to appear...
>   waiting for partition '416bf41b-f6b1-2062-6e00-1979416bf41b' to appear...
>   (...)
>   waiting for partition '416bf41b-f6b1-2062-6e00-1979416bf41b' to appear...
>   ERROR: In procedure scm-error:
>   failed to resolve partition "416bf41b-f6b1-2062-6e00-1979416bf41b"
>
> (I've checked and the GUID above does match the root partition.) I
> understand this often means a necessary kernel module is missing from
> initrd, but rebuilding the image using the definition below (mostly
> copied from install.scm) that explicitly includes the Rockchip MMC
> driver produces the same non-functioning result.
>
> Do you know the magic incantation necessary to produce a bootable image
> for the ROCK64?
>
> Alternatively, how might I proceed in diagnosing the issue here?
>
>   (use-modules (gnu system install)
>                (gnu system linux-initrd)
>                (gnu bootloader)
>                (gnu bootloader u-boot)
>                (gnu packages linux))
>
>   (operating-system
>    (inherit installation-os)
>    (bootloader (bootloader-configuration
>                 (bootloader u-boot-rock64-rk3328-bootloader)
>                 (target "/dev/mmcblk0")))
>    (kernel linux-libre)
>    (kernel-arguments
>     (cons "console=ttyS2"
>           (operating-system-user-kernel-arguments installation-os)))

To help debug this, you might want to remove the "quiet" argument so you
see some output from the kernel, I think it's added by default in
installation-os. Just setting (kernel-arguments '("consolte=ttyS2"))
should do.

>    (initrd-modules (append '("dw_mmc" "dw_mmc-rockchip") 
> %base-initrd-modules)))

As Vagrant pointed out, you're probably missing some more modules. On
the rockpro64 I have the following:

    (initrd-modules
     (cons* "dw_mmc-rockchip"
            "phy-rockchip-emmc"
            "sdhci-of-arasan" ;; I believe this one is for rk3399 only,
                              ;; so won't help you.
            %base-initrd-modules))

It was quite some back-and-forth to figure out what was needed. What I
did was to boot a different distro, I think it was Arch at the time, and
look at the dmesg output to see what drivers were loading that I didn't
see with guix.

Hope this helps!

Thanks,
Pierre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]