Commit graph

87 commits

Author SHA1 Message Date
Ludovic Courtès
0793833c59
database: Remove #:deduplicate? from 'register-items'.
It is now up to the caller to deduplicate store contents.

* guix/store/database.scm (register-items): Remove #:deduplicate?
parameter and call to 'deduplicate'.
(register-path): Call 'deduplicate' when #:deduplicate? is true.
* gnu/build/image.scm (register-closure): Adjust call accordingly.
* gnu/build/vm.scm (register-closure): Likewise.
* guix/nar.scm (finalize-store-file): Likewise.
* guix/scripts/pack.scm (store-database): Likewise.
2020-12-15 17:32:11 +01:00
Ludovic Courtès
2aa512ec28
image: 'register-closure' leaves it up to the caller to deduplicate.
* gnu/build/image.scm (register-closure): Remove #:deduplicate?
parameter and pass #:deduplicate? #f to 'register-items'.
(initialize-root-partition): Adjust accordingly.
* gnu/build/vm.scm (register-closure, root-partition-initializer):
Likewise.
2020-12-15 17:32:10 +01:00
Ludovic Courtès
6a060ff27f
store-copy: 'populate-store' can optionally deduplicate files.
Until now deduplication was performed as an additional pass after
copying files, which involve re-traversing all the files that had just
been copied.

* guix/store/deduplication.scm (copy-file/deduplicate): New procedure.
* tests/store-deduplication.scm ("copy-file/deduplicate"): New test.
* guix/build/store-copy.scm (populate-store): Add #:deduplicate?
parameter and honor it.
* tests/gexp.scm ("gexp->derivation, store copy"): Pass #:deduplicate? #f
to 'populate-store'.
* gnu/build/image.scm (initialize-root-partition): Pass #:deduplicate?
to 'populate-store'.  Pass #:deduplicate? #f to 'register-closure'.
* gnu/build/vm.scm (root-partition-initializer): Likewise.
* gnu/build/install.scm (populate-single-profile-directory): Pass
 #:deduplicate? #f to 'populate-store'.
* gnu/build/linux-initrd.scm (build-initrd): Likewise.
* guix/scripts/pack.scm (self-contained-tarball)[import-module?]: New
procedure.
[build]: Pass it as an argument to 'source-module-closure'.
* guix/scripts/pack.scm (squashfs-image)[build]: Wrap in
'with-extensions'.
* gnu/system/linux-initrd.scm (expression->initrd)[import-module?]: New
procedure.
[builder]: Pass it to 'source-module-closure'.
* gnu/system/install.scm (cow-store-service-type)[import-module?]: New
procedure.  Pass it to 'source-module-closure'.
2020-12-15 17:32:10 +01:00
Ludovic Courtès
dea1ee1fd7
database: Remove #:reset-timestamps? from 'register-items'.
The assumption now is that the caller took care of resetting timestamps
and permissions.

* guix/store/database.scm (register-items): Remove #:reset-timestamps?
parameter and the call to 'reset-timestamps'.
(register-path): Adjust accordingly and add call to 'reset-timestamps'.
* gnu/build/image.scm (register-closure): Remove #:reset-timestamps?
parameter to 'register-items'.
* gnu/build/vm.scm (register-closure): Likewise.
* guix/nar.scm (finalize-store-file): Adjust accordingly.
* guix/scripts/pack.scm (store-database)[build]: Likewise.
2020-12-15 17:32:10 +01:00
Ludovic Courtès
0f15fd5c12
image: 'register-closure' assumes already-reset timestamps.
* gnu/build/image.scm (register-closure): Remove #:reset-timestamps?
parameter.  Pass #:reset-timestamps? #f to 'register-items'.
(initialize-root-partition): Adjust accordingly.
* gnu/build/vm.scm (register-closure, root-partition-initializer):
Likewise.
2020-12-15 17:32:10 +01:00
Ludovic Courtès
7b8d239ec2
store-copy: 'populate-store' resets timestamps.
Until now, 'populate-store' would reset permissions but not timestamps,
so callers would resort to going through an extra directory traversal to
reset timestamps.

* guix/build/store-copy.scm (reset-permissions): Remove.
(copy-recursively): New procedure.
(populate-store): Pass #:keep-permissions? to 'copy-recursively'.
Remove call to 'reset-permissions'.
* tests/gexp.scm ("gexp->derivation, store copy"): In BUILD-DRV, check
whether 'populate-store' canonicalizes permissions and timestamps.
* gnu/build/image.scm (initialize-root-partition): Pass #:reset-timestamps? #f
to 'register-closure'.
* gnu/build/vm.scm (root-partition-initializer): Likewise.
2020-12-15 17:32:10 +01:00
Ludovic Courtès
97a46055ca
database: 'register-items' takes an open database.
* guix/store/database.scm (store-database-directory)
(store-database-file): New procedures.
(call-with-database): Add call to 'mkdir-p'.
(register-items): Add 'db' parameter and remove #:state-directory and #:schema.
(register-path): Use 'store-database-file' and 'with-database', and
parameterize SQL-SCHEMA.
* gnu/build/image.scm (register-closure): Likewise.
* gnu/build/vm.scm (register-closure): Likewise.
* guix/scripts/pack.scm (store-database)[build]: Likewise.
2020-06-18 14:48:17 +02:00
Ludovic Courtès
b347723445
vm: 'expression->derivation-in-linux-vm' always returns a native build.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Remove #:target.
[builder]: Use #+.  Don't pass #:target-arm32? and #:target-aarch64? to
'load-in-linux-vm'.
Pass #:target #f to 'gexp->derivation'.
(qemu-image): Adjust accordingly.
* gnu/build/vm.scm (load-in-linux-vm): Remove #:target-aarch64?
and #:target-arm32?.  Define them as local variables.
2020-06-06 23:28:49 +02:00
Marius Bakke
87a40d7203
Merge branch 'master' into core-updates 2020-05-05 20:43:21 +02:00
Mathieu Othacehe
77f5296236
vm: Remove obsolete procedures.
* gnu/build/vm.scm (install-efi, make-iso9660-image): Remove those procedures
that are now implemented in (gnu build image) module,
(initialize-hard-disk): remove efi support.
* gnu/system/vm.scm (iso9660-image): Remove it,
(qemu-image): adapt it to remove ISO9660 support.
2020-05-05 16:13:55 +02:00
Mathieu Othacehe
f8fd115717
build: bootloader: Add install-efi procedure.
* gnu/build/bootloader.scm (install-efi): New procedure copied from (gnu build vm).
(install-efi-loader): New exported procedure, wrapping install-efi.
* gnu/build/vm.scm (initialize-hard-disk): Adapt to use install-efi-loader.
2020-05-05 16:08:33 +02:00
Ludovic Courtès
cd45d656f1
vm: Make the device node procedure a parameter.
* gnu/build/vm.scm (root-partition-initializer): Add #:make-device-nodes
parameter and use it.
* gnu/system/vm.scm (qemu-image): Add #:device-node parameter.  Pass
 #:make-device-nodes to 'root-partition-initializer'.
2020-04-11 20:59:40 +02:00
Ludovic Courtès
683cba75ea
linux-boot: 'make-essential-device-nodes' root parameter is optional.
* gnu/build/linux-boot.scm (make-essential-device-nodes): Change 'root'
to an optional parameter.
* gnu/build/vm.scm (root-partition-initializer): Adjust accordingly.
2020-04-11 20:48:12 +02:00
Ludovic Courtès
6a488a3504
vm: Preserve file permissions on /dev.
Previously, when REGISTER-CLOSURES? was false, we'd set all the files
under /dev to #o644, including /dev/null, /dev/zero, etc.

* gnu/build/vm.scm (root-partition-initializer): Call 'reset-timestamps'
separately for /dev, with #:preserve-permissions? #t.
2020-04-11 20:48:12 +02:00
Ludovic Courtès
4d1ff68d73
vm: 'qemu-image' can pass options to the 'mkfs' command.
* gnu/build/vm.scm (<partition>)[file-system-options]: New field.
(create-ext-file-system, create-fat-file-system)
(format-partition): Add #:options and honor it.
(initialize-partition): Pass #:options to 'format-partition'.
* gnu/system/vm.scm (qemu-image): Add #:file-system-options and use it
for the root partition.
2020-04-11 19:22:25 +02:00
Ludovic Courtès
82782d8cec
vm: 'qemu-image' accepts a list of extra populate directives.
* gnu/build/vm.scm (root-partition-initializer): Add #:extra-directives
parameter and pass it to 'populate-root-file-system'.
* gnu/system/vm.scm (qemu-image): Add #:extra-directives parameter and
pass it to 'root-partition-initializer'.
2020-04-11 19:22:25 +02:00
Tobias Geerinckx-Rice
26c1bd9dfa
vm: Transparently compress iso9660 images.
* gnu/build/vm.scm (make-iso9660-image): Use the ‘--zisofs’ xorriso
filter at the highest compression settings for supported directories.
2020-04-10 01:52:36 +02:00
Ludovic Courtès
be6520e6a5
vm: Distinguish between success and failure of the guest code.
Fixes <https://bugs.gnu.org/34276>.
Reported by Tobias Geerinckx-Rice <me@tobias.gr>.

* gnu/system/vm.scm (expression->derivation-in-linux-vm)[loader]:
Produce '/xchg/.exit-status' file upon success.
* gnu/build/vm.scm (load-in-linux-vm): Check for 'xchg/.exit-status'
once QEMU has completed and respond accordingly.
2020-03-26 23:45:41 +01:00
Marius Bakke
8e53fe2b91
gnu: Remove uses of deprecated Qemu network configuration.
* gnu/build/vm.scm (load-in-linux-vm): Move Qemu network configuration from
ARCH-SPECIFIC-FLAGS to the Qemu command line.  Use the "-nic" option of Qemu
instead of "-device" and "-net".
* gnu/system/vm.scm (common-qemu-options): Do not add a '-net' command.
(virtual-machine-compiler): Use "-nic user,..." instead of "-net".
* doc/guix.texi (Installing Guix in a VM, Invoking guix system, Running Guix
in a VM): Do the same for examples.
2019-12-18 22:36:37 +01:00
Mathieu Othacehe
c6d130630a
build: vm: Fix qemu-command procedure.
* gnu/build/vm.scm (qemu-command): When system is "armhf-linux", use "arm" as
qemu cpu prefix.
2019-12-01 16:52:30 +01:00
Mathieu Othacehe
1ee72bb55b
system: vm: Add arm64 support.
* gnu/build/vm.scm (load-in-linux-vm): Add target-arm64? argument and use it
to pass correct arguments to qemu.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass the new
target-arm64? argument added above. Do not add ESP partition on all ARM
targets. Do not pass grub-efi package to initialize-hard-disk on ARM targets.
2019-11-22 16:33:43 +01:00
Mathieu Othacehe
2608417ab8
build: vm: Fix arm32 support.
* gnu/build/vm.scm (load-in-linux-vm): Disable qemu highmem support on ARM32
systems.
2019-11-22 16:33:43 +01:00
Danny Milosavljevic
1d86b05618
vm: Create installation media with MBR and HFS only, no GPT.
* gnu/build/vm.scm (make-iso9660-image): Accept XORRISO,
GRUB-MKRESCUE-ENVIRONMENT.
* gnu/system/vm.scm (iso9660-image): Pass XORRISO; accept
GRUB-MKRESCUE-ENVIRONMENT.
(system-disk-image): Pass GRUB-MKRESCUE-ENVIRONMENT.
* gnu/packages/patches/xorriso-no-mbr-in-inner-efi.patch: New file.
* gnu/packages/patches/xorriso-no-partition-table-in-inner-efi.patch: New
file.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/cdrom.scm (xorriso)[source]: Add patches.
[arguments]<#:phases>[install-frontends]:
Add phase.
2019-05-18 18:35:37 +02:00
Christopher Baines
0534427551
vm: Pass -smp to QEMU to allow use of multiple cores.
* gnu/build/vm.scm (load-in-linux-vm): Pass (parallel-job-count) to QEMU with
-smp to allow using multiple cores.
2019-04-29 21:11:38 +01:00
Ludovic Courtès
ecb33b87aa
vm: Adjust FAT serial number code to 32-bit Guile.
On 32-bit systems, 'string-hash' would raise an out-of-range exception
when the second argument was 2^32.

* gnu/build/vm.scm (make-iso9660-image): Pass 2^32 - 1 to 'string-hash'.
2019-04-25 00:45:35 +02:00
Ludovic Courtès
605815023c
vm: Use a fixed FAT serial number for 'efi.img' in ISO images.
Partly fixes <https://bugs.gnu.org/35283>.

* gnu/build/vm.scm (make-iso9660-image): Set the
'GRUB_FAT_SERIAL_NUMBER' environment variable.
2019-04-21 00:51:18 +02:00
Ludovic Courtès
6901b9248e
vm: Reset file timestamps of the EFI image in ISO images.
Partly fixes <https://bugs.gnu.org/35283>.

* gnu/build/vm.scm (make-iso9660-image): Set the 'SOURCE_DATE_EPOCH'
environment variable.
2019-04-21 00:51:18 +02:00
Ludovic Courtès
833480cc1f
vm: Reset file timestamps in ISO images.
Partly fixes <https://bugs.gnu.org/35283>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

* gnu/build/vm.scm (make-iso9660-image): Pass "-volume_date
all_file_dates =1".
2019-04-21 00:51:18 +02:00
Ludovic Courtès
f6e3f0f9b1
vm: Remove Xorriso "-padding" option.
This is a followup to 66ec389580.
This reverts 178be030c0, which is no
longer needed.

* gnu/build/vm.scm (make-iso9660-image): Remove "-padding" option.
2019-04-14 23:40:53 +02:00
Ludovic Courtès
59e8044588
Remove traces of "GuixSD".
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove
mentions of "GuixSD".
* gnu/bootloader/grub.scm (install-grub-efi): Likewise.
* gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to
"Guix_image".
(initialize-hard-disk): Search for the "Guix_image" label.
* gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD".
* gnu/installer/newt/welcome.scm (run-welcome-page): Likewise.
* gnu/packages/audio.scm (supercollider)[description]: Likewise.
* gnu/packages/curl.scm (curl): Likewise.
* gnu/packages/emacs.scm (emacs): Likewise.
* gnu/packages/gnome.scm (network-manager): Likewise.
* gnu/packages/julia.scm (julia): Likewise.
* gnu/packages/linux.scm (alsa-plugins): Likewise.
(powertop, wireless-regdb): Likewise.
* gnu/packages/package-management.scm (guix): Likewise.
* gnu/packages/polkit.scm (polkit): Likewise.
* gnu/packages/tex.scm (texlive-bin): Likewise.
* gnu/services/base.scm (file-systems->fstab): Likewise.
* gnu/services/cups.scm (%cups-activation): Likewise.
* gnu/services/mail.scm (%dovecot-activation): Likewise.
* gnu/services/messaging.scm (prosody-configuration)[log]: Likewise.
* gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise.
* gnu/system/install.scm (installation-os)[file-systems]: Change root
file system label to "Guix_image".
* gnu/system/mapped-devices.scm (check-device-initrd-modules):
Remove "GuixSD".
* gnu/system/vm.scm (system-docker-image): Likewise.
(system-disk-image)[root-label]: Change to "Guix_image".
* gnu/tests/install.scm (run-install): Remove "GuixSD".
* guix/modules.scm (guix-module-name?): Likewise.
* nix/libstore/optimise-store.cc: Likewise.
2019-03-13 23:12:43 +01:00
Ludovic Courtès
a934e9fc1c
vm: Re-enable KVM on i386.
The workaround is apparently no longer needed with Linux-libre 4.19.2
in the host.

* gnu/build/vm.scm (load-in-linux-vm): Remove special case for
"qemu-system-i386", thereby re-enabling KVM.
2018-12-19 00:14:00 +01:00
Ludovic Courtès
178be030c0
vm: Add padding in the ISO image.
Fixes <https://bugs.gnu.org/33639>.
Thanks to Ricardo Wurmus and Thomas Schmitt for their suggestions!

* gnu/build/vm.scm (make-iso9660-image): Pass "-padding 10m" to
xorriso.
2018-12-06 17:22:24 +01:00
Ludovic Courtès
b27ef1d46c
pack: Import (guix store database) only when '--localstatedir' is passed.
This is another way to address <https://bugs.gnu.org/32184>, which was
previously addressed in commit 19c924af4f.

* gnu/build/install.scm (register-closure): Move to...
* gnu/build/vm.scm (register-closure): ... here.  New procedure.
* guix/scripts/pack.scm (self-contained-tarball)[build]: Remove
now unneeded 'with-extensions' form and custom (guix config) module.
* tests/guix-pack.sh: Revert the strategy from
commit 19c924af4f.
* tests/pack.scm ("self-contained-tarball"): Likewise.
2018-11-06 23:21:23 +01:00
Ludovic Courtès
42226063f6
vm: Disable KVM on i386.
* gnu/build/vm.scm (load-in-linux-vm): Disable KVM on i386.
2018-07-04 15:26:21 +02:00
Ludovic Courtès
88d4a9c2be
vm: 'make-iso9660-image' makes 'grub.cfg' a GC root.
* gnu/build/vm.scm (make-iso9660-image): Add call to
'register-bootcfg-root'.
2018-06-26 14:29:18 +02:00
Ludovic Courtès
718d44cc9f
vm: 'make-iso9660-image' no longer includes unreferenced store items.
Fixes <https://bugs.gnu.org/31757>.

* gnu/build/vm.scm (make-iso9660-image): Invoke 'grub-mkrescue' in
'open-pipe*'.  Use '-path-list -' instead of passing "gnu/store=…".
2018-06-26 14:27:57 +02:00
Ludovic Courtès
a7751eeb57
vm: Don't try to modify the bind-mounted store.
Previously 'guix system disk-image --file-system-type=iso9660' would
fail because 'register-closure' would try to reset timestamps/ownership
on the bind-mounted store, which fails with EPERM.

* gnu/build/vm.scm (make-iso9660-image): Pass #:reset-timestamps? to
'register-closure'.
2018-06-26 14:27:57 +02:00
Ludovic Courtès
ea0a06cee2
Remove 'guix-register' and its traces.
* Makefile.am (SH_TESTS): Remove tests/guix-register.sh.
* build-aux/pre-inst-env.in (GUIX_REGISTER): Remove.
* gnu/build/install.scm (directives): Remove outdated comment.
* gnu/build/vm.scm (root-partition-initializer): Update comment.
* gnu/packages/package-management.scm (guix-register): Remove.
* guix/config.scm.in (%sbindir, %guix-register-program): Remove.
* guix/scripts/system.scm (install): Adjust docstring.
* guix/self.scm (make-config.scm): Remove #:guix.  Do not generate
%sbindir and %guix-register-program.
(specification->package): Remove "guix".
* nix/guix-register/guix-register.cc: Remove.
* nix/libstore/store-api.cc (decodeValidPathInfo): Remove.
* nix/libstore/store-api.hh (decodeValidPathInfo): Remove declaration.
* nix/local.mk (sbin_PROGRAMS, guix_register_SOURCES)
(guix_register_CPPFLAGS, guix_register_LDFLAGS): Remove.
* tests/guix-register.sh: Remove.
2018-06-14 11:17:00 +02:00
Ludovic Courtès
078c2329c0
install: Use 'reset-timestamps' from (guix store database).
* gnu/build/install.scm (reset-timestamps): Remove.
* gnu/build/vm.scm: Use 'reset-timestamps' from (guix store database).
2018-06-14 11:17:00 +02:00
Ludovic Courtès
c45477d2a1
install: Use (guix store database) instead of 'guix-register'.
* gnu/build/install.scm (register-closure): Add #:reset-timestamps? and
and #:schema; honor them.  Rewrite in terms of 'register-path'.
(populate-single-profile-directory): Add #:schema and honor it.  Make
/var/guix/profiles and /var/guix/gcroots.
* gnu/build/vm.scm (root-partition-initializer): Pass
 #:reset-timestamps? to 'register-closure'.
* gnu/system/vm.scm (not-config?): New procedure.
(guile-sqlite3&co): New variable.
(expression->derivation-in-linux-vm)[config]: New variable.
[builder]: Use 'with-extensions'.
(iso9660-image)[schema, config]: New variables.
Wrap build expression in 'with-extensions'; add 'sql-schema' call.
Remove GUIX from INPUTS.
(qemu-image)[schema, config]: New variables.
Wrap body in 'with-extensions'.
(system-docker-image)[not-config?]: Remove.
[config]: Use 'make-config.scm'.
[schema]: New variable.
[build]: Use 'with-extensions'.  Add call to 'sql-schema'.  Remove GUIX
from INPUTS.
* gnu/system/file-systems.scm (%store-prefix): Check whether
'%store-prefix' is defined.
* guix/scripts/pack.scm (self-contained-tarball)[not-config?]
[libgcrypt, schema]: New variables.
[build]: Wrap in 'with-extensions'.  Adjust imported module list to use
'make-config.scm' for (guix config).
2018-06-14 11:16:59 +02:00
Ludovic Courtès
98e0b1288f
vm: Pass "panic=1" to Linux.
* gnu/build/vm.scm (load-in-linux-vm): Always pass "panic=1" after '-append'.
2018-05-25 13:43:03 +02:00
Ludovic Courtès
353df40102
vm: Print the label and UUID of partitions.
* gnu/build/vm.scm (create-ext-file-system): Print the label and UUID.
2018-05-23 10:21:02 +02:00
Chris Marusich
8c9bf2946a
gnu: When building in a VM, share a temporary directory.
* gnu/build/vm.scm (load-in-linux-vm): Make a shared temporary directory
  available in the VM.
* gnu/system/vm.scm (%linux-vm-file-systems): Add a corresponding entry.
2018-03-24 03:04:10 +01:00
Chris Marusich
af81311b8c
vm: Allow control of deduplication in root-partition-initializer.
* gnu/build/vm.scm (root-partition-initializer): Add #:deduplicate?
  keyword argument.
2018-03-24 03:04:10 +01:00
Danny Milosavljevic
363be0c6db
vm: Pass "-append ..." only once.
* gnu/build/vm.scm (load-in-linux-vm): Pass "-append ..." only once.
2018-03-16 22:59:28 +01:00
Ludovic Courtès
e1d0f2aa87
vm: Use 'invoke' instead of 'system*'.
* gnu/build/vm.scm (load-in-linux-vm, initialize-partition-table)
(create-ext-file-system, create-fat-file-system)
(install-efi, make-iso9660-image): Use 'invoke' instead
of (unless (zero? (system* ...)) (error ...)).
2018-03-15 23:46:15 +01:00
Tobias Geerinckx-Rice
162a137400
gnu: Consistently Write ‘file system(s)’.
It is the GNU way.

* doc/guix.texi (Build Systems, DNS Services): Write ‘file system(s)’.
* gnu/build/vm.scm (create-ext-file-system, create-fat-file-system):
Likewise.
* gnu/packages/backup.scm (dirvish, rsnapshot)[description]: Likewise.
* gnu/packages/check.scm (python-testpath)[description]: Likewise.
* gnu/packages/disk.scm (pydf)[description]: Likewise.
* gnu/packages/file-systems.scm (disorderfs)[synopsis, description]: Likewise.
(glusterfs)[description]: Likewise.
* gnu/packages/haskell.scm (ghc-directory, ghc-system-fileio-bootstrap)
(ghc-system-fileio)[synopsis]: Likewise.
(ghc-fsnotify)[description]: Likewise.
* gnu/packages/linux.scm (proot)[description]: Likewise.
(jmtpfs)[synopsis, description]: Likewise.
* gnu/packages/mate.scm (caja, caja-extensions)[description]: Likewise.
* gnu/packages/storage.scm (ceph)[description]: Likewise.
* gnu/packages/sync.scm (lsyncd)[description]: Likewise.
* gnu/packages/syncthing.scm (syncthing)[synopsis]: Likewise.
(go-github-com-zillode-notify)[description]: Likewise.
* gnu/services/nfs.scm (pipefs-service-type): Likewise.
* guix/scripts/system.scm (perform-action): Likewise.
2018-01-19 17:28:31 +01:00
Leo Famulari
2ca712bdba
vm: Pass the host's /dev/urandom to the guest at /dev/hwrng.
* gnu/build/vm.scm (load-in-linux-vm): Use QEMU's virtio-rng-pci.
* gnu/system/vm.scm (common-qemu-options): Likewise.
2017-12-18 00:39:40 -05:00
Mathieu Othacehe
acf54bca22
vm: Adapt qemu command to ARM.
* gnu/build/vm.scm (load-in-linux-vm): New argument #:target-arm32.
Use it to adapt command for qemu-system-arm.  This implies to choose a
machine ("virt"), use the correct console port "ttyAMA0", disable KVM use
that is buggy on some ARM boards (Odroid XU4 for example) and use user mode
network stack instead of NIC. Gather all those options in a new variable
"arch-specific-flags".
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Pass
to load-in-linux-vm "#:target-arm32?" argument.
2017-12-15 11:44:29 +01:00
Mathieu Othacehe
7b307a21dd
vm: Use qemu drive device parameter.
* gnu/build/vm.scm (load-in-linux-vm): Use device parameter to define drive
  device.
2017-12-13 11:30:04 +01:00