[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#36477] [PATCH v3 46/48] system: vm: Support cross-compilation.
From: |
Ludovic Courtès |
Subject: |
[bug#36477] [PATCH v3 46/48] system: vm: Support cross-compilation. |
Date: |
Wed, 04 Sep 2019 14:46:35 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Mathieu Othacehe <address@hidden> skribis:
> * gnu/system.scm (system-linux-image-file-name): Add support for cross-built
> systems. Remove system argument that was ignored,
> (operating-system-kernel-file): adapt by removing ignored os argument.
> * gnu/system/vm.scm (expression->derivation-in-linux-vm): Add target argument,
> move qemu from inputs list to a new native-inputs list and adapt
> set-path-environment-variable call accordingly. Pass target to qemu-command
> and gexp->derivation calls.
> (iso9660-image): Move qemu from inputs to a new native-inputs list and adapt
> set-path-environment-variable accordingly.
> (qemu-image): Add target argument, move qemu from inputs list to a new
> native-inputs list and adapt set-path-environment-variable call
> accordingly. Pass target argument to expression->derivation-in-linux-vm call.
[...]
> (define (operating-system-kernel-file os)
> "Return an object representing the absolute file name of the kernel image
> of
> OS."
> (file-append (operating-system-kernel os)
> - "/" (system-linux-image-file-name os)))
> + "/" (system-linux-image-file-name)))
Uh, passing ‘os’ to ‘system-linux-image-file-name’ never worked, right?
[...]
> - (let* ((inputs '#$(list qemu (canonical-package coreutils)))
> + (let* ((inputs '#$(list (canonical-package coreutils)))
> + (native-inputs '#+(list qemu))
All these inputs are added to $PATH just after, which shows that we run
them natively. Thus, they must all be native.
IOW, all we have to do is replace #$ by #+.
(Also, make sure to test all this without a qemu-binfmt service set up.)
> (let ((inputs
> - '#$(append (list qemu parted e2fsprogs dosfstools xorriso)
> + '#$(append (list parted e2fsprogs dosfstools xorriso)
> (map canonical-package
> (list sed grep coreutils findutils gawk))))
> + (native-inputs '#+(list qemu))
Same here: this is added to $PATH so it must be native.
> (let ((inputs
> - '#$(append (list qemu parted e2fsprogs dosfstools)
> + '#$(append (list util-linux parted e2fsprogs dosfstools)
> (map canonical-package
> (list sed grep coreutils findutils gawk))))
> + (native-inputs '#+(list qemu))
Likewise.
Thanks,
Ludo’.
- [bug#36477] [PATCH v3 34/48] gnu: guile-wm: Fix cross-compilation., (continued)
- [bug#36477] [PATCH v3 34/48] gnu: guile-wm: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 36/48] gnu: console-setup: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 26/48] gnu: guile-sqlite3: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 37/48] gnu: mdadm: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 38/48] gnu: grub: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 44/48] build: vm: Fix arm32 support., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 46/48] system: vm: Support cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 46/48] system: vm: Support cross-compilation.,
Ludovic Courtès <=
- [bug#36477] [PATCH v3 42/48] gexp: Pass target to compiled-modules in lower-gexp., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 43/48] utils: Use target-arm64? and target-arm? helpers., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 40/48] gnu: linux-libre: Enable built-in ext4 support., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 27/48] gnu: guile-gcrypt: Fix cross-compilation., Mathieu Othacehe, 2019/09/02
- [bug#36477] [PATCH v3 39/48] linux-initrd: Use native gzip., Mathieu Othacehe, 2019/09/02