all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#41350] [PATCH 0/3] Use native qemu to build vm-image.
@ 2020-05-17 10:01 Jan Nieuwenhuizen
  2020-05-17 10:03 ` [bug#41350] [PATCH 1/3] utils: Move 'reset-timestamps' out of database Jan (janneke) Nieuwenhuizen
                   ` (5 more replies)
  0 siblings, 6 replies; 50+ messages in thread
From: Jan Nieuwenhuizen @ 2020-05-17 10:01 UTC (permalink / raw)
  To: 41350

Hi!

Cross-building a vm-image used to be done using a cross-qemu, e.g, qemu-ARM.
That does not work for the Hurd, as there is no qemu-HURD.

This patch switches to cross building vm-images using a native qemu vm.  If
there a reason for using qemu-TARGET we may want to make this switch
conditional for cross building to the Hurd?

There is a tricky aspect to this: the "user-builder" includes all the
cross-built packages for TARGET, but we need to hard the native qemu a
native #+LOADER, loading native #+LINUX and #+INITRD.

To accomplish this NATIVE/CROSS mixt, the builder is then run with a native
guile, like so

--8<---------------cut here---------------start------------->8---
(system* #+(file-append (default-guile) "/bin/guile")
         "--no-auto-compile"
         #$(preserve-target user-builder))
--8<---------------cut here---------------end--------------->8---

while the packages in USER-BUILDER will still be cross-built.  However,
because the builder has

    (with-extensions gcrypt-sqlite3&co
         (use-modules (gnu store database))
      ...)

this makes the native guile "see" the cross-built .GO files.  That would
"only" be a secondary problem except that loading (sqlite3) throws an
exception when dynamic-loading the .SO fails.  Seeing it like this I am not so
sure anymore this is a bug, WDYT?  ...so instead

...the problem is now avoided by removing the sqlite dependency when
cross-building by not registering closures and postponing the loading of (gnu
store database) and thus (sqlite3).

I have reset wip-hurd-vm onto these changes, so you can also look there.
Doing

    ./pre-inst-env guix system vm-image --target=i586-pc-gnu --no-grafts \
        gnu/system/examples/bare-hurd.tmpl

now produces a pretty nice hurd VM :-)

Greetings,
Janneke

Jan (janneke) Nieuwenhuizen (3):
  utils: Move 'reset-timestamps' out of database.
  system: vm: Do not register-closures when cross-building.
  system: vm: Build vm-image using native qemu.

 gnu/bootloader/grub.scm |  4 +--
 gnu/build/vm.scm        |  3 ++-
 gnu/system/vm.scm       | 54 ++++++++++++++++++++++++++---------------
 guix/store/database.scm | 41 +++----------------------------
 guix/utils.scm          | 41 ++++++++++++++++++++++++++++---
 5 files changed, 79 insertions(+), 64 deletions(-)

-- 
2.26.0

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




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

end of thread, other threads:[~2022-09-29 15:54 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-17 10:01 [bug#41350] [PATCH 0/3] Use native qemu to build vm-image Jan Nieuwenhuizen
2020-05-17 10:03 ` [bug#41350] [PATCH 1/3] utils: Move 'reset-timestamps' out of database Jan (janneke) Nieuwenhuizen
2020-05-17 10:03   ` [bug#41350] [PATCH 2/3] system: vm: Do not register-closures when cross-building Jan (janneke) Nieuwenhuizen
2020-05-17 10:03   ` [bug#41350] [PATCH 3/3] system: vm: Build vm-image using native qemu Jan (janneke) Nieuwenhuizen
2020-05-18  9:10 ` [bug#41350] [PATCH 0/3] Use native qemu to build vm-image Mathieu Othacehe
2020-05-19  7:22   ` Jan Nieuwenhuizen
2020-05-19 10:02     ` Mathieu Othacehe
2020-05-20 14:03       ` Mathieu Othacehe
2020-05-20 15:09         ` Jan Nieuwenhuizen
2020-05-19  7:23 ` [bug#41350] [PATCH v2 1/3] utils: Move 'reset-timestamps' out of database Jan (janneke) Nieuwenhuizen
2020-05-19  7:23   ` [bug#41350] [PATCH v2 2/3] system: vm: Do not register-closures when cross-building to the Hurd Jan (janneke) Nieuwenhuizen
2020-05-19  7:23   ` [bug#41350] [PATCH v2 3/3] system: vm: Build vm-image using native qemu, for " Jan (janneke) Nieuwenhuizen
2020-05-19  9:14     ` Mathieu Othacehe
2020-05-20 21:49       ` Ludovic Courtès
2020-05-23  9:28       ` Jan Nieuwenhuizen
2020-05-23 17:45         ` Mathieu Othacehe
2020-05-23 19:07           ` Jan Nieuwenhuizen
2020-05-24  9:18             ` Mathieu Othacehe
2020-05-27  9:30               ` Ludovic Courtès
2020-05-28  7:00                 ` Mathieu Othacehe
2020-05-24 11:19             ` Jan Nieuwenhuizen
2020-05-24 12:07               ` Mathieu Othacehe
2020-05-24 14:20                 ` Jan Nieuwenhuizen
2020-05-24 16:36             ` Ludovic Courtès
2020-05-20 21:58     ` Ludovic Courtès
2020-05-22 19:24 ` Mathieu Othacehe
2020-05-27 22:54   ` Ludovic Courtès
2020-05-28  6:36     ` Mathieu Othacehe
2020-05-28 12:29       ` Jan Nieuwenhuizen
2020-05-28 15:39         ` Ludovic Courtès
2020-05-28 17:07           ` Jan Nieuwenhuizen
2020-05-28 17:10           ` Mathieu Othacehe
2020-05-28 18:19             ` Jan Nieuwenhuizen
2020-05-29  8:18             ` Ludovic Courtès
2020-05-29  9:06               ` Jan Nieuwenhuizen
2020-05-30 10:08                 ` Jan Nieuwenhuizen
2020-05-30 13:54                   ` Ludovic Courtès
2022-09-28 20:18                     ` [bug#41350] [PATCH 0/3] Use native qemu to build vm-image Maxim Cournoyer
2022-09-29 14:17                       ` bug#41350: " Mathieu Othacehe
2020-05-23  9:30 ` [bug#41350] [PATCH v3 1/3] utils: Move 'reset-timestamps' out of database Jan (janneke) Nieuwenhuizen
2020-05-23  9:30   ` [bug#41350] [PATCH v3 2/3] system: vm: Do not register-closures when cross-building to the Hurd Jan (janneke) Nieuwenhuizen
2020-05-27  8:45     ` Ludovic Courtès
2020-05-27  9:13       ` Jan Nieuwenhuizen
2020-05-23  9:30   ` [bug#41350] [PATCH v3 3/3] system: vm: Build vm-image using native qemu, for " Jan (janneke) Nieuwenhuizen
2020-05-27  8:43   ` [bug#41350] [PATCH v3 1/3] utils: Move 'reset-timestamps' out of database Ludovic Courtès
2020-05-27  8:59     ` Ludovic Courtès
2020-05-27  9:10     ` Jan Nieuwenhuizen
2020-05-24 18:11 ` [bug#41350] [PATCH v2 3/3] system: vm: Build vm-image using native qemu, for the Hurd Mathieu Othacehe
2020-05-24 18:40   ` Jan Nieuwenhuizen
2020-05-25 15:46     ` Jan Nieuwenhuizen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.