Date: Fri, 27 Aug 2021 11:02:59 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 258081] opt_platform.h always created empty on kmod build Message-ID: <bug-258081-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258081 Bug ID: 258081 Summary: opt_platform.h always created empty on kmod build Product: Base System Version: 13.0-STABLE Hardware: arm OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: mishin@mh.net.ru Running "make depend" in a kernel module sources folder outside of the kern= el sources tree makes an empty "./opt_platform.h". I expect it to contain the lines "#define FDT 1" and "#define EFI 1" which are contained in "/usr/obj/arm.armv7/sys/${KERNCONF}/opt_platform.h". My "Makefile": # $FreeBSD$ KMOD=3Drcrecv SRCS=3Drcrecv.c SRCS+=3D \ bus_if.h \ device_if.h \ gpio_if.h \ gpiobus_if.h \ ofw_bus_if.h \ opt_platform.h \ fdt_pinctrl_if.h \ CFLAGS+=3D -I. .include <bsd.kmod.mk> Maybe it is important: I always mount on my ARM host "/usr/src" for building kernel modules by nfs but I have not mounted "/usr/obj" there. I tried also run "make TARGET_ARCH=3Darmv7 KERNCONF=3DOPI_PC depend" on amd= 64 PC (I build world & kernel for my OrangePI PC, on amd64 and with that variables, = and "/usr/obj/arm.armv7/sys/${KERNCONF}/opt_platform.h" is exists and is not empty). But the "./opt_platform.h" created empty in this case too. This is an output of the command I run (I don't got what ":>" means): machine -> /usr/src/sys/amd64/include x86 -> /usr/src/sys/x86/include awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/gpio/gpio_if.m -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/gpio/gpiobus_if.m= -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/ofw/ofw_bus_if.m = -h :> opt_platform.h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/fdt/fdt_pinctrl_i= f.m -h touch opt_global.h Of course I can place a definition of FDT to the code, to the Makefile or e= ven to the "./opt_platform.h" file but I want to make it more platform dependen= t. Is it a bug or maybe I misunderstand this step of making kmods? --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-258081-227>