how to create a powerpc64 poudriere jail ?
Jan Beich
jbeich at vfemail.net
Sun May 22 23:26:56 UTC 2016
Kurt Jaeger <lists at opsec.eu> writes:
> [00:00:08] ====>> Starting jail p64-default
> [00:00:08] ====>> Error: Unable to execute id(1) in jail. Emulation or ABI wrong.
Check foreign ABI support by running a static binary. If you see something
like the following then --magic or --mask argument (for ELF header) is wrong.
$ /poudriere/jails/head-powerpc64/rescue/ls
sh: /poudriere/jails/head-powerpc64/rescue/ls: Exec format error
but it may not help if dynamically linked binaries still fail
[00:00:01] ====>> Starting jail head-powerpc64-default
Invalid data memory access: 0x000007ec00000000
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
[00:00:01] ====>> Error: Unable to execute id(1) in jail. Emulation or ABI wrong.
> magic: 0x7f 0x45 0x4c 0x46 0x01 0x02 0x01 0x00 0x00 0x00 0x00 0x00
^^
This byte looks wrong. After applying the attached patch run
$ service qemu_user_static onerestart
> 0x00 0x00 0x00 0x00 0x00 0x02 0x00 0x15
> mask: 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x00 0xff 0xff 0xff 0xff
> 0xff 0xff 0xff 0xff 0xff 0xfe 0xff 0xff
$ hd -n20 /poudriere/jails/head-powerpc64/rescue/ls
00000000 7f 45 4c 46 02 02 01 09 00 00 00 00 00 00 00 00 |.ELF............|
00000010 00 02 00 15 |....|
00000014
Index: emulators/qemu-sbruno/files/qemu_user_static.in
===================================================================
--- emulators/qemu-sbruno/files/qemu_user_static.in (revision 415647)
+++ emulators/qemu-sbruno/files/qemu_user_static.in (working copy)
@@ -98,7 +98,7 @@ list_cmd="${BINMISCCTL} list"
interpreter=${QEMU_DIR}/${QEMU_PREFIX}ppc64${QEMU_SUFFIX}
if [ -x "${interpreter}" ]; then
${BINMISCCTL} add powerpc64 --interpreter "${interpreter}" \
- --magic "\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15" \
+ --magic "\x7f\x45\x4c\x46\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15" \
--mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff" \
--size 20 --set-enabled
else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 602 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20160523/6a8dac4d/attachment.sig>
More information about the freebsd-ports
mailing list