Hi! Mathieu Othacehe skribis: >> 1. When cross-compiling, can the ‘qemu-image’ procedure to its job by >> running exclusively native software (in particular using a native >> QEMU, native kernel, etc.)? > > I think the answer is yes, but I raised a concern about being able to > run grub-install from an ARM system to build a cross-compiled x86-64 > system (for instance). > > For now, running this command shows: > > ls $(guix build --system=aarch64-linux grub)/lib/grub/ > arm64-efi > > So, the native aarch64-linux is only able to install itself on the same > system. I think can be fixed though (same as for grub-hybrid package). > >> As for (2), I’d say that when cross-compiling, it should just run native >> software but simply preserve references to cross-compiled software, >> which is what janneke’s patch does. > > Yes, I agree. So it took me the whole day, but I ended up with the following patches addressing these two points. With that on master, I can do: guix system vm --target=arm-linux-gnueabihf --no-grafts \ gnu/system/examples/bare-bones.tmpl and get a usable script that spawns an ARM VM (I still need to add ‘-M virt -nographic’ and remove ‘-enable-kvm’, but that’s a secondary issue.) Likewise, this produces what looks like a valid image, except probably for the bootloader (I used GRUB in bare-bones, which didn’t complain, but the result doesn’t work): guix system vm-image --target=arm-linux-gnueabihf … Thoughts? I’ll see if I can test it with ‘wip-hurd-vm’ on top but I’m not sure I’ll do it before the week-end. > However, I think I found a way to install Grub, without root > permissions, from the host system (see: > https://lists.gnu.org/archive/html/guix-patches/2020-05/msg00988.html). Yay! > This should allow to deprecate the whole (gnu system vm) module. Yeah, using the new image API will be nicer. We still need to keep some of the API in (guix system vm), at least for the ‘guix system vm’ command. Thanks, Ludo’.