Building arm pkgs on amd64

Is it possible to build arm pkgs on an amd64 release and if so would I need to do this in a jail corresponding to the target release?
 
As acheron adviced, best would be to build those armv5 packages, or any other platform, inside a jail, with ports-mgmt/poudriere.

4.6. Building Packages with Poudriere
Poudriere is a BSD-licensed utility for creating and testing FreeBSD packages. It uses FreeBSD jails to set up isolated compilation environments. These jails can be used to build packages for versions of FreeBSD that are different from the system on which it is installed, and also to build packages for i386 if the host is an amd64 system. Once the packages are built, they are in a layout identical to the official mirrors. These packages are usable by pkg(8) and other package management tools.

For the armv5 platform: Poudriere option -a armv5 , if build error occures -a arm.armv5.
 
Building ARMV6 Ports on FreeBSD with Poudriere

It’s an older how to, Poudriere on a FreeBSD 10.1 installation, but it might come handy.
I have very little exposure to arm and don't know the difference between armv5 and armv6... is it like the difference between i386 and amd64? I don't suppose armv6 pkgs could run on armv5...

Another query I have after reading https://wiki.freebsd.org/FreeBSDMarvell is that there are Big Endian and Little Endian arm modes. How do I tell what I need. From the above link I would guess it was possible to install pkgs, but no repository seems to exist anymore.

I'll crack on with poudriere, but it looks fairly daunting.... initially I only want to build pkg() and maybe mc() for armv5 rather than 25000 FreeBSD pkgs

My first few attempts at running poudriere just end up with errors.
poudriere jail -c -j 101arm -m svn -a arm.arm -v release/11.0.0
tells me that I need to install
pkg install qemu-user-static
which I have previously installed and I'm told the most recent version of the package is already installed.
 
... initially I only want to build pkg() and maybe mc() for armv5 rather than 25000 FreeBSD pkgs
You don’t need to. You can select which packages to build. See EXAMPLES section of poudriere(0)
Code:
[Specify a    list of    ports you want to build]

     Create a flat text    file in    which you put the ports    you want to see    built
     by    poudriere.

       echo    'sysutils/screen' > ~/pkglist
       echo    'editors/vim' >> ~/pkglist
or simpler
Code:
test    a single port
     This second example show how to use poudriere for a single    port.

     Let's take    the example of building    a single port;

       poudriere testport -o category/port -j myjail

tells me that I need to install
pkg install qemu-user-static
which I have previously installed and I'm told the most recent version of the package is already installed.
This posting might be helpfull.
 
This posting might be helpfull.

This bit was:-
[LIST=1] [*]Enable qemu-user-static in rc.conf: qemu_user_static_enable="YES" [*]Run the startup script to configure your system for building different architectures: /usr/local/etc/rc.d/qemu_user_static start [/LIST]
 
My first attempt at running poudriere using:-
poudriere jail -c -j 110arm -m svn -a arm.arm -v release/11.0.0
resulted in
Failed to 'make buildworld'
This was because lint was not found. It has been removed from 12.0.

I did previously manage to build 11.0 for ARM, but that was in an 11.0 jail. Not sure how poudriere is supposed to handle this sort of situation.
 
Never use any of the /release/* tags. Use /releng/11.0 for 11.0-RELEASE.
 
Have you any particular reasons to try using releng/11.0 (EoL since November 30, 2017) instead of releng/11.2 ?
 
Have you any particular reasons to try using releng/11.0 (EoL since November 30, 2017) instead of releng/11.2 ?
Yes, I can't get 11.2 or 12.0 working on my GoFlexHome unit. I can build both, but get kernel panics as soon as I login, or interrupt storms which make the system unusable, and have no way of diagnosing the problems. Those problems do not appear on 11.0.
 
I see. Here is the commit that allows releng/11.2 to compile without lint :

It seems to me that those modifications could be applied to releng/11.0 so it could compile using 12-RELEASE.
 
I managed to compile releng/11.0 using 12-STABLE by modifying the share/mk/src.opts.mk and usr.bin/Makefile files as shown in the commit of my previous post. You could edit them by hand (there are just two lines to change), but for convenience here is the patch:
So basically, to obtain the modified source:
% svn checkout https://svn.FreeBSD.org/base/releng/11.0 /some/path/freebsd-src
% cd /some/path/freebsd-src


Then download the patch, place it in /some/path/freebsd-src and apply it:
% patch -p0 -i lint.patch
% rm lint.patch


Then, using poudriere(8):
# poudriere jail -x -m src=/some/path/freebsd-src -b -c -j 110arm -a arm.arm
-- snip --
[00:17:50] Recording filesystem state for clean... done
[00:17:50] Jail 110arm 11.0-RELEASE-p16 1100122 arm is ready to be used


Do not forget the -b option to force building from source.

-- Edit --
-x flag added (see this post)
 
Last edited by a moderator:
Back
Top