Re: Experiment : trying to compile the panfrost driver on FreeBSD 15.0

From: Warner Losh <imp_at_bsdimp.com>
Date: Mon, 15 Sep 2025 23:10:16 UTC
On Mon, Sep 15, 2025, 4:51 PM Mario Marietto <marietto2008@gmail.com> wrote:

> Hello to everyone.
>
> I'm trying to compile the panfrost driver on FreeBSD 15.0 for my radxa
> zero 3W board,because I'm curious to see where I can go.
>
> After the whole day passed exchanging and removing not supported files,it
> has been able to compile a large part of the code. My sensation is that the
> error reported is connected to the fact that the 15.0 is not finished
> work,but I'm not sure :
>
> # make TARGET_ARCH=aarch64 TARGET=arm64 KERNCONF=GENERIC-DRM-150
> -DNO_CLEAN buildkernel
>
> .....
>
> cc -target aarch64-unknown-freebsd14.2 --sysroot=/usr/obj/mnt/da7p2/usr-no/src/
> src-150/arm64.aarch64/tmp -B/usr/obj/mnt/da7p2/usr-no/src/src-150/
> arm64.aarch64/tmp/usr/bin -c -O2 -pipe  -fno-strict-aliasing  -g -nostdinc  -I. -I/mnt/
> da7p2/usr-no/src/src-150/sys -I/mnt/da7p2/usr-no/src/src-150/sys/contrib/ck/include
> -I /mnt/da7p2/usr-no/src/src-150/sys/contrib/libfdt -I/mnt/da7p2/usr-no/src/src-150/
> sys/contrib/device-tree/include -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -
> include opt_global.h -fno-common    -DLINUX_DTS_VERSION=\""6.12"\" -mstack-
> protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-
> guard-offset=0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD  -
> MF.depend.kern_exec.o -MTkern_exec.o -fdebug-prefix-map=./machine=/mnt/
> da7p2/usr-no/src/src-150/sys/arm64/include -mgeneral-regs-only -ffixed-x18 -mno-
> outline-atomics -ffreestanding -fwrapv -fstack-protector -Wall -Wstrict-prototypes -
> Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -
> D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option
> -Wno-unknown-pragmas -Wno-error=tautological-compare -Wno-error=empty-
> body -Wno-error=parentheses-equality -Wno-error=unused-function -Wno-
> error=pointer-sign -Wno-error=shift-negative-value -Wno-address-of-packed-
> member -Wno-format-zero-length     -std=gnu99 -Werror /mnt/da7p2/usr-no/src/
> src-150/sys/kern/kern_exec.c/mnt/da7p2/usr-no/src/src-150/sys/kern/
> kern_exec.c:32:10: fatal error: 'opt_hwt_hooks.h' file not found
>    32 | #include "opt_hwt_hooks.h"
>       |          ^~~~~~~~~~~~~~~~~
>
>
> I looked for the missing file everywhere,but I didn't find it.
>

Add an option to sys/conf/options that defines that file.

Warner


> Thanks.
>
> --
> Mario.
>