Hi Torres.
  
Some weeks ago I posted a similar question to this list. See 
https://lists.gnu.org/archive/html/help-guix/2024-04/msg00026.html.

My setup is quite similiar to yours. I want to deploy a custom kernel/system 
image from an x86 host to an rpi4 (aarch64).

Using 'guix deploy' with configuration 'system'  set to  'aarch64-linux' will 
compile the packages using qemu which is too slow. Compling locally on the pi4 
is imho too slow as well. Unfortunatly the deploy command don't have the 
'target' parameter/configuration to enable real crosscompilation using a 
crosscompile toolchain (anyone knows the reason?). However i think you can work 
around this, at least theory. If you first build your system with 

> guix system image --target=aarch64-linux-gnu my-image.scm --no-grafts 
> --skip-checks

the kernel should be build using a crosscompile toolchain (which is pretty 
fast) and put into the store. If you now deploy, the kernel shouldn't be 
compiled again but instead taken from the store. This is at least my current 
understanding of guix. 

I said "in theory" because this didn't work for me on the first try. 'Guix 
deploy' still rebuild the kernel with qemu even though it was already in store. 
However, after some trial and error it suddenly worked. Unfortunately i don't 
know what I did to make it work. Maybe you can give it a try and report back, 
if this approach works for you? 

Anyway, please take everything I said with a grain of salt because I am a guix 
newbie. I would be happy if someone clear things up if I am mistaken.

Ps: Sorry for the horrible formatting, I am on my mobile atm.





Am 10. Juni 2024 17:00:14 MESZ schrieb Lobo Torres <l...@quiltro.org>:
>Hi,
>
>I'm using the deploy utilities to manage a Raspberry Pi 4 running Guix System.
>
>The configuration for said system[1] involves compiling a custom kernel, which 
>I first tried to do normally (by running `guix deploy rpi4-deploy.scm` [2]), 
>which compiled the kernel using the native compilation, which was awfully 
>slow... I didn't bother to let it finish, I left it overnight and after 10 
>hours it was still building.
>
>[1] The system configuration being deployed: 
>https://quiltro.org/junk/rpi4.scm.html
>[2] The deployment file used: https://quiltro.org/junk/rpi4-deploy.scm.html
>
>I asked on the #guix IRC channel and I was told that adding `(build-locally? 
>#f)` to my `machine-ssh-configuration` object would work, as it would tell 
>Guix to build any derivations on the target machine, so I added that, went to 
>deploy again, and Guix was still doing the build locally via QEMU.
>
>Out of the bat I'm not sure why this is happening, disabling the `qemu-binfmt` 
>service of course fails to build because the host machine is not aarch64-linux.
>
>If something needs more explanation, please feel free to ask! English is not 
>my native language so I might have explained some things weirdly.
>
>Thanks!
>---
>Lobo Torres
>https://quiltro.org
>

Reply via email to