This is an old revision of the document!


A tutorial on how to build images for arm devices using FreeBSD's release building infrastructure.

svnlite checkout https://svn.freebsd.org/base/head /usr/src

Note: it's preferred that you keep /usr/src and the version you're trying to build in sync. To checkout a specific revision use -rXXX where XXX is the revision

Create a directory which will contain make.conf and src.conf

mkdir /etc/release-confs

Populate /etc/release-confs/make.conf

WITHOUT_DEBUG=YES
MK_PROFILE=no
MALLOC_PRODUCTION=yes

See man 5 make.conf and /usr/src/UPDATING for more information

Populate /etc/release-confs/src.conf

WITHOUT_DEBUG_FILES=1
WITHOUT_KERNEL_SYMBOLS=yes
WITHOUT_TESTS=yes
WITHOUT_PROFILE=yes

By removing symbols and debugging information you're limiting the ability to debug crashes severely.

See man 5 src.conf for more information

This example is for Orange Pi PC as this board has support but doesn't have a configuration. In many cases you can use another board's configuration as template as long as it uses the same SoC.

Copy BANANAPI.conf to a new location

cd /usr/src/release
cp -Rp arm/BANANAPI.conf arm/ORANGEPI-PC.conf

Change EMBEDDEDPORTS path to corresponding u-boot port

EMBEDDEDPORTS="sysutils/u-boot-bananapi" --> EMBEDDEDPORTS="sysutils/u-boot-orangepi-pc"

Change kernel to GENERIC-NODEBUG if you want to disable kernel debugging

KERNEL="GENERIC" --> KERNEL="GENERIC-NODEBUG"

BOARDNAME variable sets filename of generated image file.

export BOARDNAME="BANANAPI" --> export BOARDNAME="ORANGEPI-PC"

Add SRCBRANCH="base/head@rXXX" where XXX is the revision number (optional)

SRCBRANCH="base/head@r349025"

Change UBOOT_DIR to corresponding u-boot install path (u-boot-orangepi-pc)

UBOOT_DIR="/usr/local/share/u-boot/u-boot-bananapi" --> UBOOT_DIR="/usr/local/share/u-boot/u-boot-orangepi-pc"
sh release.sh -c arm/ORANGEPI-PC.conf

The release script will automatically set amount of jobs see man 7 release for more information and the compiled image will be in /scratch/R

  • arm/build_image_using_release_building_infrastructure.1563361604.txt.gz
  • Last modified: 2019/07/17 11:06
  • by DanielEngberg