From owner-freebsd-ports@freebsd.org Sun May 22 23:26:56 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 948C0B3BD74 for ; Sun, 22 May 2016 23:26:56 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 7CF9B1E5A for ; Sun, 22 May 2016 23:26:56 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: by mailman.ysv.freebsd.org (Postfix) id 78794B3BD73; Sun, 22 May 2016 23:26:56 +0000 (UTC) Delivered-To: ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78250B3BD72 for ; Sun, 22 May 2016 23:26:56 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: from vfemail.net (onethreetwo.vfemail.net [199.16.11.132]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BF581E55 for ; Sun, 22 May 2016 23:26:55 +0000 (UTC) (envelope-from jbeich@vfemail.net) Received: (qmail 29289 invoked by uid 89); 22 May 2016 23:26:54 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 22 May 2016 23:26:54 -0000 Received: (qmail 29274 invoked by uid 89); 22 May 2016 23:26:36 -0000 Received: by simscan 1.3.1 ppid: 29268, pid: 29271, t: 0.0028s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 22 May 2016 23:26:36 -0000 Received: (qmail 25178 invoked by uid 89); 22 May 2016 23:26:36 -0000 Received: by simscan 1.4.0 ppid: 25150, pid: 25175, t: 0.7677s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by mail.vfemail.net with ESMTPA; 22 May 2016 23:26:36 -0000 From: Jan Beich To: Kurt Jaeger Cc: ports@freebsd.org, Sean Bruno (maintainer) Subject: Re: how to create a powerpc64 poudriere jail ? References: <20160522093001.GB41922@home.opsec.eu> <20160522093156.GC41922@home.opsec.eu> <20160522211938.GI41922@home.opsec.eu> Date: Mon, 23 May 2016 01:26:25 +0200 In-Reply-To: <20160522211938.GI41922@home.opsec.eu> (Kurt Jaeger's message of "Sun, 22 May 2016 23:19:38 +0200") Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2016 23:26:56 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Kurt Jaeger writes: > [00:00:08] =3D=3D=3D=3D>> Starting jail p64-default > [00:00:08] =3D=3D=3D=3D>> Error: Unable to execute id(1) in jail. Emulati= on 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 wron= g. $ /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] =3D=3D=3D=3D>> Starting jail head-powerpc64-default Invalid data memory access: 0x000007ec00000000 qemu: uncaught target signal 11 (Segmentation fault) - core dumped Segmentation fault [00:00:01] =3D=3D=3D=3D>> Error: Unable to execute id(1) in jail. Emulati= on or ABI wrong. > magic: 0x7f 0x45 0x4c 0x46 0x01 0x02 0x01 0x00 0x00 0x00 0x00 0x00=20 ^^ This byte looks wrong. After applying the attached patch run $ service qemu_user_static onerestart > 0x00 0x00 0x00 0x00 0x00 0x02 0x00 0x15=20 > mask: 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x00 0xff 0xff 0xff 0xff=20 > 0xff 0xff 0xff 0xff 0xff 0xfe 0xff 0xff=20 $ 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- 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=3D"${BINMISCCTL} list" interpreter=3D${QEMU_DIR}/${QEMU_PREFIX}ppc64${QEMU_SUFFIX} if [ -x "${interpreter}" ]; then ${BINMISCCTL} add powerpc64 --interpreter "${interpreter}" \ =2D --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\x= 00\x00\x02\x00\x15" \ --mask "\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xf= f\xff\xfe\xff\xff" \ --size 20 --set-enabled else --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJXQkAiXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bExsIAK5Bo0reFOMt5Oml8yC92/gF Ny5tt4lab+XZkjsVNxxSd/4uEEAx8ZdHhTcpF4+45hgGpruo0+B8zhJepPE22NI7 LsxXnJxh9pP/yMmhZI6qJ4wR1HwXBdtHz0uvctl7wmq1rBZuLa3fDqy0bGyGYAvK gadpcC8e6th0SdOUoVV3sG3NxqAKXOsNRTSd7odHKjkMbyvHiSFkCU2i0gz7IxPL fPd4cxdjb/NumYYV0dRXgj760IAPpwmOAaLOuscFAVT0/ttzlGO4J9oAdAkfeoKK bv7WLT8c6EKiCtMHcxXihjp1icqCS1s5YJgemJKPNOYZUciSw/2q1dQMQA+EYLI= =c1UF -----END PGP SIGNATURE----- --=-=-=--