From owner-freebsd-ppc@freebsd.org Tue Nov 19 18:49:17 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8BFC61BAE11 for ; Tue, 19 Nov 2019 18:49:17 +0000 (UTC) (envelope-from gromero@linux.vnet.ibm.com) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47HZcD26hfz3K4Q for ; Tue, 19 Nov 2019 18:49:15 +0000 (UTC) (envelope-from gromero@linux.vnet.ibm.com) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xAJIm4Uv143700; Tue, 19 Nov 2019 13:49:13 -0500 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wcence6rv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Nov 2019 13:49:12 -0500 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id xAJIjGt5008496; Tue, 19 Nov 2019 18:49:16 GMT Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com [9.57.198.24]) by ppma01wdc.us.ibm.com with ESMTP id 2wa8r65qtr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Nov 2019 18:49:16 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xAJInBIv55312792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Nov 2019 18:49:11 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 41D87AC05E; Tue, 19 Nov 2019 18:49:11 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C89B2AC05F; Tue, 19 Nov 2019 18:49:10 +0000 (GMT) Received: from oc6336877782.ibm.com (unknown [9.18.139.30]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Tue, 19 Nov 2019 18:49:10 +0000 (GMT) Subject: Re: Building powerpc (32-bit) packages on amd64 To: Daniel Benjamin Miller References: Cc: freebsd-ppc@freebsd.org From: Gustavo Romero Message-ID: Date: Tue, 19 Nov 2019 15:49:10 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-11-19_06:2019-11-15,2019-11-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 phishscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 impostorscore=0 mlxlogscore=999 priorityscore=1501 bulkscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1911190157 X-Rspamd-Queue-Id: 47HZcD26hfz3K4Q X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=ibm.com (policy=none); spf=none (mx1.freebsd.org: domain of gromero@linux.vnet.ibm.com has no SPF policy when checking 148.163.156.1) smtp.mailfrom=gromero@linux.vnet.ibm.com X-Spamd-Result: default: False [-3.41 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; DMARC_POLICY_SOFTFAIL(0.10)[ibm.com : No valid SPF, No valid DKIM,none]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; IP_SCORE(-1.31)[ip: (-4.70), ipnet: 148.163.156.0/23(-0.01), asn: 26211(-1.79), country: US(-0.05)]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[1.156.163.148.list.dnswl.org : 127.0.3.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:26211, ipnet:148.163.156.0/23, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_SEVEN(0.00)[9]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Nov 2019 18:49:17 -0000 Hi Daniel, Thanks for sharing your recipe and results. In fact I realized last week that indeed ppc32 binaries don't exist in the mirrors and I could not find any replacement for them. I've tried to kick a build of gcc9 on ppc32 G4 and hit a couple of issues which I was able to work around. I have not tried other packages yet. On of the issues looks related specific with that kind of build environment, i.e real G4 HW, so cross-compiling looks a nice alternative. So yeah, please keep us posted on your progress building the ppc32 binaries on amd64 :) Cheers, Gustavo On 11/09/2019 03:25 AM, Daniel Benjamin Miller wrote: > While it's not normally supported, I have managed to build powerpc packages on amd64, for a 32-bit target. I recently obtained a PowerBook G4 and was interested in running FreeBSD on it. So I installed the base system, but found that there were no binaries out there. Somebody had an unofficial server in ~2015 but it looks like there's nothing on the web now. Compiling ports on a G4 is torturous, so I decided to give it a whirl on my amd64 computer. The issue was that I couldn't run powerpc (32-bit) FreeBSD in QEMU, and it seemed that cross-compiling using poudriere was not supported with a powerpc target from an amd64 host. I've been able to generate some packages using the following method: > > 1. Run a FreeBSD-CURRENT (powerpc64) virtual machine under Linux, using the command sudo qemu-system-ppc64 -M pseries-2.12-sxxm -smp 2 -mem-path /dev/hugepages -drive file=bsd.img -m 12G -boot c as my boot command. (Before this, you'll need to have a CD attached, of course, in order to install it.) > > 2. Compile pkg, then pkg install poudriere. > > 3. Add a simple poudriere.conf (I just went with the example). > > 4. Create poudriere's data folder. > > 5. poudriere ports -c > > 6. poudriere jail -c -j ppc32 -v 12.1-RELEASE -a powerpc > > 7. Create a file and then run poudriere bulk -f -j ppc32 > > And it all seems to work. Once my job is done, I will post my unofficial binaries in a publicly accessible repository. I don't know if the project maintainers would be potentially interested in using this method to compile powerpc (32-bit) binaries on modern hardware (being that the userbase for this architecture is, in all likelihood, fairly small). Nevertheless, these packages should make my PowerBook G4 somewhat more useful as a FreeBSD system. > > _______________________________________________ > freebsd-ppc@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ppc > To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org"