Created attachment 170961 [details] fix rc.d/qemu_user_static assumes powerpc and powerpc64 have the same ELF magic which is actually false, at least on 11.0-CURRENT. $ poudriere jail -cj head-powerpc64 -a powerpc.powerpc64 -m svn+https -v head [...] $ service qemu_user_static onestart $ chroot /poudriere/jails/head-powerpc64 /rescue/date chroot: /rescue/date: Exec format error $ binmiscctl list [...] name: powerpc64 interpreter: /usr/local/bin/qemu-ppc64-static flags: ENABLED USE_MASK magic size: 20 magic offset: 0 magic: 0x7f 0x45 0x4c 0x46 0x01 0x02 0x01 0x00 0x00 0x00 0x00 0x00 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/date 00000000 7f 45 4c 46 02 02 01 09 00 00 00 00 00 00 00 00 |.ELF............| 00000010 00 02 00 15 |....| 00000014 $ poudriere jail -l | fgrep powerpc64 head-powerpc64 11.0-CURRENT r300425 powerpc.powerpc64 svn+https 2016-05-22 18:46:03 /poudriere/jails/head-powerpc64
(In reply to Jan Beich from comment #0) Ok, does changing this allow the executable to run?
If you don't trust me follow the steps to reproduce. I did QA my patch but cannot rule out possible environment poisoning: kernel patches, configuration, hardware, etc.
(In reply to Jan Beich from comment #2) Oh ... no. I was curious if this patch allows you to execute static binaries that *do* anything. We've been trying to get ppc bsd-user working on and off for a while and haven't had much success. If this works to get ppc64 binaries working, GREAT! :-)
A commit references this bug: Author: sbruno Date: Mon Jun 13 19:12:50 UTC 2016 New revision: 416859 URL: https://svnweb.freebsd.org/changeset/ports/416859 Log: Use correct ELF magic to run powerpc64 binaries. PR: 209983 Submitted by: jbeich Changes: head/emulators/qemu-sbruno/Makefile head/emulators/qemu-sbruno/files/qemu_user_static.in