diff options
author | Danny Milosavljevic <dannym@scratchpost.org> | 2019-02-03 16:29:00 +0100 |
---|---|---|
committer | Danny Milosavljevic <dannym@scratchpost.org> | 2019-02-04 17:56:28 +0100 |
commit | 89339a35bd8610ec585da36f3da6ddf116c3fe89 (patch) | |
tree | d5a1eaab6fedeab0dac4dabfb81c1ccb9a35bf12 /doc | |
parent | 959eaa1eb834fd47ceab3c5bbbe4967e808d530b (diff) | |
download | patches-89339a35bd8610ec585da36f3da6ddf116c3fe89.tar patches-89339a35bd8610ec585da36f3da6ddf116c3fe89.tar.gz |
doc: Document how to enable qemu binfmt service and how to use it.
* doc/contributing.texi (Submitting Patches): Document how to enable qemu
binfmt service and how to use it.
Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/contributing.texi | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/contributing.texi b/doc/contributing.texi index d579a39c5d..9459c481a7 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -818,6 +818,33 @@ Make sure the package builds on your platform, using @code{guix build @var{package}}. @item +We recommend you also try building the package on other supported +platforms. As you may not have access to actual hardware platforms, we +recommend using the @code{qemu-binfmt-service-type} to emulate them. In +order to enable it, add the following service to the list of services in +your @code{operating-system} configuration: + +@example +(service qemu-binfmt-service-type + (qemu-binfmt-configuration + (platforms (lookup-qemu-platforms "arm" "aarch64" "ppc" "mips64el")) + (guix-support? #t))) +@end example + +Then reconfigure your system. + +You can then build packages for different platforms by specifying the +@code{--system} option. For example, to build the "hello" package for +the armhf, aarch64, powerpc, or mips64 architectures, you would run the +following commands, respectively: +@example +guix build --system=armhf-linux --rounds=2 hello +guix build --system=aarch64-linux --rounds=2 hello +guix build --system=powerpc-linux --rounds=2 hello +guix build --system=mips64el-linux --rounds=2 hello +@end example + +@item @cindex bundling Make sure the package does not use bundled copies of software already available as separate packages. |