Skip to content
Snippets Groups Projects
Unverified Commit 89339a35 authored by Danny Milosavljevic's avatar Danny Milosavljevic
Browse files

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: default avatarRicardo Wurmus <rekado@elephly.net>
parent 959eaa1e
No related branches found
No related tags found
No related merge requests found
...@@ -817,6 +817,33 @@ name of the new or modified package, and fix any errors it reports ...@@ -817,6 +817,33 @@ name of the new or modified package, and fix any errors it reports
Make sure the package builds on your platform, using @code{guix build Make sure the package builds on your platform, using @code{guix build
@var{package}}. @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 @item
@cindex bundling @cindex bundling
Make sure the package does not use bundled copies of software already Make sure the package does not use bundled copies of software already
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment