FreeBSD Build Process


I am creating a thread here to discuss building freebsd Kernel, uboot and image for arm SOC.

I read the tutorial on link:

Step3 is missing on how to create flashable image.
now I have the kernel with GENERIC config and I installed it using installkernel.

Currently I am trying manual image building using a pre-partitioned sd card and installing kernel on its ufs partition while flashing uboot manually.

cd /usr/src
make -j4 TARGET=arm64 kernel-toolchain
make -j6 TARGET=arm64 KERNCONF=GENERIC buildkernel
make -j6 TARGET=arm64 KERNCONF=GENERIC installkernel DESTDIR=/mnt

Another missing information is about dtb, So maybe we can cover that up on this thread.
Here is a tutorial on how to build freebsd for arm devices.

This was written by the FreeBSD commiter Emmanuel Vadot

Porting FreeBSD to a new ARM Board Рart1 , Part2 , Part3.

DTB connection to kernel is still missing in this tutorial.

It is convenient to use a set of shell scripts called crochet tools to build downloadable FreeBSD images.
An example can be taken from me on github

git clone

To build a image for Khadas-EDGE-V need to execute.

cd crochet
sh -c conf/edge-v.conf

After completion, image will be located in the work directory.

@SleepWalker is this really computer intensive, or is it like fenix image building ?
btw how do I create the .conf file for VIM3 etc. ?

This have nothing to do with fenix image building.
Freebsd can be build either on native aarch64 freebsd or Amd64 Freebsd. As it uses a different Filesystem which is not supported on linux kernels until build manually.

Build must be done in amd64 on FreeBSD13.0-CURRENT.
The native assembly will work but is unrealistic for a long time.

Have you tried it on Edge-V with all 6 cores? For me AMD64 is not practical as it takes 10 hours or so to build base, kernel and tools for freebsd as I don’t have a very powerful machine to build.

How can I get the time taken for build process? We use time makepkg for linux I assume it should be the same for freebsd, I will try time make -j6 and try.


crochet automatically detects the number of cores and runs at maximum power.
sh crochet -c file.conf >& build.log &
The file will indicate the time of passage of each stage


OMG. I just saw crochet it already have all the build script need for most of the ARM Board, I didn’t know this.
I can reuse it for opnsense.

Adding you on Telegram :wink:

@SleepWalker, @Spikerguy I understand for building I need an AMD64 machine to do it, I got that handled,
but I need help with the .conf file

if willing please join here for Discord for discussions :

Hi All!
I published patches for u-boot-2020.07 release which I use.

To build a FreeBSD image, I use Crochet tools.
My option is here.


@SleepWalker could you please update the supported devices, Thank you !

1 Like

I include in Crochet those SBCs that I have, or those that someone can test.
What needs to be added, what do you think?

The Edge sbc of course…

Use EDGE-V it will work for EDGE too :wink:

1 Like

Yes I understand, I am just suggesting to update the Supported device menu,

I will try to make it soon :nerd_face:

1 Like