unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Guix Deploy not respecting `build-locally?` field in `machine-ssh-configuration`
@ 2024-06-10 15:00 Lobo Torres
  2024-06-12 21:38 ` Dev@icepic
  0 siblings, 1 reply; 2+ messages in thread
From: Lobo Torres @ 2024-06-10 15:00 UTC (permalink / raw)
  To: help-guix

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Guix Deploy not respecting `build-locally?` field in `machine-ssh-configuration`
  2024-06-10 15:00 Guix Deploy not respecting `build-locally?` field in `machine-ssh-configuration` Lobo Torres
@ 2024-06-12 21:38 ` Dev@icepic
  0 siblings, 0 replies; 2+ messages in thread
From: Dev@icepic @ 2024-06-12 21:38 UTC (permalink / raw)
  To: help-guix

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 <lobo@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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-12 21:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-10 15:00 Guix Deploy not respecting `build-locally?` field in `machine-ssh-configuration` Lobo Torres
2024-06-12 21:38 ` Dev@icepic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).