Date: Sat, 9 Nov 2019 01:25:35 -0500 From: Daniel Benjamin Miller <dbmiller@dbmiller.org> To: freebsd-ppc@freebsd.org Subject: Building powerpc (32-bit) packages on amd64 Message-ID: <a53b5540-5cff-a0d0-7a2f-fa143f6c6f4f@dbmiller.org>
next in thread | raw e-mail | index | archive | help
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 <myfile> -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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a53b5540-5cff-a0d0-7a2f-fa143f6c6f4f>