Message ID | 20190203154601.32098-1-dannym@scratchpost.org |
---|---|
State | Accepted |
Headers | show |
Series | [bug#34304] doc: Document how to enable qemu binfmt service and how to use it. | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | success | Successfully applied |
Danny Milosavljevic <dannym@scratchpost.org> writes: > * doc/contributing.texi (Submitting Patches): Document how to enable qemu > binfmt service and how to use it. Sounds good to me! > +We recommend you also try to build the package on other platforms. We > +do not presume that you have all the platforms, therefore we recommend > +using the qemu binfmt service of GuixSD. In order to enable it, add > +the following service to your operating-system configuration's services: How about this: --8<---------------cut here---------------start------------->8--- 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: --8<---------------cut here---------------end--------------->8--- > +You can then build packages like the following, respectively: > +@example > +guix build --system=armhf-linux --rounds=2 my-package > +guix build --system=aarch64-linux --rounds=2 my-package > +guix build --system=powerpc-linux --rounds=2 my-package > +guix build --system=mips64el-linux --rounds=2 my-package > +@end example How about: --8<---------------cut here---------------start------------->8--- 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 --8<---------------cut here---------------end--------------->8---
Hi Ricardo,
On Mon, 04 Feb 2019 00:59:08 +0100
Ricardo Wurmus <rekado@elephly.net> wrote:
>[improved version]
Thanks! Pushed with improved text to guix master as 89339a35bd8610ec585da36f3da6ddf116c3fe89.
diff --git a/doc/contributing.texi b/doc/contributing.texi index ecc20dabc..c086e3c9a 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -813,6 +813,29 @@ 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 @var{package}}. +@item +We recommend you also try to build the package on other platforms. We +do not presume that you have all the platforms, therefore we recommend +using the qemu binfmt service of GuixSD. In order to enable it, add +the following service to your operating-system configuration's services: + +@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 like the following, respectively: +@example +guix build --system=armhf-linux --rounds=2 my-package +guix build --system=aarch64-linux --rounds=2 my-package +guix build --system=powerpc-linux --rounds=2 my-package +guix build --system=mips64el-linux --rounds=2 my-package +@end example + @item @cindex bundling Make sure the package does not use bundled copies of software already