Poudriere armv6 RPI2

greg bauer bauergreg786 at yahoo.com
Fri Feb 3 00:06:41 UTC 2017


This is likely a novice question with an easy answer. I have used poudriere for i386 and amd64 builds successfully many times. I thought I would try building some packages for raspberry Pi. 

I think I have qemu-arm-static setup correctly with binmiscctl 
I have done 

binmiscctl add armv6 \
--interpreter "/usr/local/bin/qemu-arm-static" \
--magic "\x7f\x45\x4c\x46\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00" \
--mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff" \
--size 20 --set-enabled

And copied /usr/local/bin/qemu-arm-static into /poudriere/jail/(jail name)/usr/local/bin

I have tried creating a jail with various combinations of the following and deleting unsuccessful attempts with the -d option and trying again 

With and without 
-x

With both 
-a arm.armv6
-a armv6

With the following sources 
-m svn+https release/11.0.1
-m svn+https release/11.0.0
-m none -M /builds/releng/11.0/armv6  (files created with the below shell script)
-m tar=/tmp/fbsd110R_arm6.tar (created following these instructions http://phaq.phunsites.net/2015/08/31/freebsd-on-the-raspi-pt-2-crosscompiling-arm6v-packages-for-freebsd/)
++++++++++++++
Shell script for -M option (I have an updated svn version in /svn/base/releng/11.0 )
#!/bin/sh
CORES=6
TYPE=releng
VERSION=11.0
TARGET=arm
TARGET_ARCH=armv6
UBLDR_LOADADDR=0x2000000
KERNCONF=RPI2
EMULATOR=qemu-arm-static
DESTDIR=/builds/${TYPE}/${VERSION}/${TARGET_ARCH}
mkdir -p ${DESTDIR}
cd ${DESTDIR}
mkdir -p ${DESTDIR}/usr/obj
export MAKEOBJDIRPREFIX=${DESTDIR}/usr/obj
mkdir -p ${DESTDIR}/usr/local/bin
cp /usr/local/bin/${EMULATOR} ${DESTDIR}/usr/local/bin
cp /usr/local/bin/qemu-system-${TARGET} ${DESTDIR}/usr/local/bin
mkdir -p ${DESTDIR}/usr/
ln -s /svn/base/${TYPE}/${VERSION}/ ${DESTDIR}/usr/src
cd ${DESTDIR}/usr/src
make -j ${CORES} -DNO_CLEAN UBLDR_LOADADDR=${UBLDR_LOADADDR} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} buildworld
make -j ${CORES} -DNO_CLEAN KERNCONF=${KERNCONF} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} buildkernel
make DESTDIR=${DESTDIR} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} installkernel
make DESTDIR=${DESTDIR} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} installworld
make DESTDIR=${DESTDIR} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} distribution

++++++++++++
The error is always as follows. 

# poudriere bulk -j fbsd110Rarmv6_RPI2 -p HEAD shells/bash
[00:00:00] ====>> Cross-building ports for arm.armv6 on amd64 requires QEMU
[00:00:00] ====>> Creating the reference jail... done
[00:00:12] ====>> Mounting system devices for fbsd110Rarmv6_RPI2-HEAD
[00:00:12] ====>> Mounting ports/packages/distfiles
[00:00:12] ====>> Using packages from previously failed build
[00:00:12] ====>> Mounting packages from: /poudriere/data/packages/fbsd110Rarmv6_RPI2-HEAD
[00:00:12] ====>> Raising MAX_EXECUTION_TIME and NOHANG_TIME for QEMU
[00:00:12] ====>> Copying latest version of the emulator from: /usr/local/bin/qemu-arm-static
/etc/resolv.conf -> /poudriere/data/.m/fbsd110Rarmv6_RPI2-HEAD/ref/etc/resolv.conf
[00:00:12] ====>> Starting jail fbsd110Rarmv6_RPI2-HEAD
[00:00:12] ====>> Error: Unable to execute id(1) in jail. Emulation or ABI wrong.
[00:00:12] ====>> Cleaning up
[00:00:12] ====>> Umounting file systems

A few questions 
Is my issue with qemu and binmiscctl or poudriere?
Is the -x option necessary when creating the jail?
Is -a arm.armv6 or -a armv6 correct?
Is there a way to test qemu functionality?

Thanks. 





More information about the freebsd-arm mailing list