Add QEMU report.

Submitted by:	sbruno
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Glen Barber 2014-07-13 17:46:29 +00:00
parent 743b2ea592
commit 7962b1dcd2
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=45267

View file

@ -43,7 +43,7 @@
?>
<p>Thanks to all the reporters for the excellent work! This
report contains 4 entries and we hope you enjoy reading it.</p>
report contains 5 entries and we hope you enjoy reading it.</p>
<p>The deadline for submissions covering between July and
September 2014 is October 7th, 2014.</p>
@ -330,4 +330,113 @@
charsets/key-codes in the <tt>vt(4)</tt>.</task>
</help>
</project>
<project cat='proj'>
<title>QEMU bsd-user enabled ports building</title>
<contact>
<person>
<name>
<given>Stacey</given>
<common>Son</common>
</name>
<email>sson@freebsd.org</email>
</person>
<person>
<name>
<given>Juergen</given>
<common>Lock</common>
</name>
<email>nox@freebsd.org</email>
</person>
<person>
<name>
<given>Sean</given>
<common>Bruno</common>
</name>
<email>sbruno@freebsd.org</email>
</person>
</contact>
<links>
<url href="https://wiki.freebsd.org/QemuUserModeHowTo">Overview of technology</url>
<url href="http://dirty.ysv.freebsd.org/">Status of ports building</url>
<url href="https://github.com/seanbruno/qemu-bsd-user">Master respository for collaboration</url>
</links>
<body>
<p>The ports-mgmt/poudriere-devel port is aware of how to build
ports via an emulator. Configuration of the miscellaneous
binary image activator is required prior to a poudriere-devel
run.</p>
<p>ARMV6, MIPS32 and MIPS64 packages can be produced via full
emulation. There are several packages that block a full run of
builds. They can be viewed on the Status of ports building
link.</p>
<p>On current or latest stable/10:</p>
<p>Clone the <url href="https://github.com/seanbruno/qemu-bsd-user">github</url>
repository of qemu, and switch to
the bsd-user branch. Then run:</p>
<p><tt>./configure --static \<br/>
--target-list="arm-bsd-user i386-bsd-user \<br/>
mips-bsd-user mips64-bsd-user mips64el-bsd-user \<br/>
mipsel-bsd-user ppc-bsd-user ppc64-bsd-user sparc-bsd-user \<br/>
sparc64-bsd-user x86_64-bsd-user"</tt></p>
<p><tt>gmake; gmake install</tt></p>
<p>Then setup the binmiscctl tools to do some evil hackery to
redirect execution of armv6 binaries to qemu:</p>
<p><tt>binmiscctl add armv6 --interpreter \
"/usr/local/bin/qemu-arm" --magic \
"\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02 \<br/>
\x00\x28\x00" --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff \<br/>
\xff\xff\xff\xff\xfe\xff\xff\xff" --size 20 --set-enabled</tt></p>
<p>Install poudriere-devel from ports. It knows how to setup
things.</p>
<p>Build poudriere jail to do all the magic:</p>
<p><tt>poudriere jail -c -j 11armv632 -m svn -a armv6 \<br/>
-v head</tt></p>
<p>You can now run poudriere against that jail to build all the
ports:</p>
<p><tt>poudriere bulk -j 11armv632 -a</tt></p>
<p>Nullfs mount your ports tree into the jail:</p>
<p><tt>mkdir /usr/local/poudriere/jails/11armv632/usr/ports<br/>
mount -t nullfs /usr/ports /usr/local/poudriere/jails/11armv632/usr/ports</tt></p>
<p>To chroot into the jail:</p>
<p><tt>mount -t devfs devfs /usr/local/poudriere/jails/11armv632/dev<br/>
chroot /usr/local/poudriere/jails/11armv632/</tt></p>
</body>
<help>
<task>
PPC on AMD64 emulation. WIP as there appears to be some serious issues running the bsd-user binary on big endian hardware. Justin Hibbits working on this.
</task>
<task>
SPARC64 on AMD64 emulation is non-functional and instantly segfaults. Looking for someone to poke at the bits here.
</task>
<task>
External Tool Chain, XDEV support. Partial support for using an AMD64 tool chain that can output other architecture (use AMD64 toolchain to build MIPS64 packages). Currently tracking a linking issue with ports-mgmt/pkg. Thanks to Warner Losh, Baptiste Daroussin, Dimitry Andric for poking at bits in here to make the XDEV target useful.
</task>
<task>
Signal Handling, MIPS/ARMV6 target still displays a failure that manifests itself when building devel/p5-Sys-SigAction
</task>
<task>
Massive documentation update needed. These modifications actually allow you to chroot into a MIPS or ARMv6 environment and use native tool chains and libraries to prototype your software for a target platform.
</task>
</help>
</project>
</report>