guix-patches
[Top][All Lists]
Advanced

[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’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]