Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Aug 2016 00:13:20 +0200
From:      Bernd Walter <ticso@cicely7.cicely.de>
To:        Adrian Chadd <adrian.chadd@gmail.com>
Cc:        ticso@cicely.de, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, Bernd Walter <ticso@cicely7.cicely.de>
Subject:   Re: out of tree kernel modules (was: compiling modules and FDT define)
Message-ID:  <20160807221319.GD34368@cicely7.cicely.de>
In-Reply-To: <CAJ-VmonNG1XycPWUH%2BrrpcKBUKH8R6u_aD=odmbPB17r8UyM0A@mail.gmail.com>
References:  <20160805005433.GL18406@cicely7.cicely.de> <20160805134358.GN18406@cicely7.cicely.de> <CAJ-VmonNG1XycPWUH%2BrrpcKBUKH8R6u_aD=odmbPB17r8UyM0A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 05, 2016 at 08:20:11PM -0700, Adrian Chadd wrote:
> Hi,
> 
> Try adding opt_platform.h to SRCS in the module makefile?
> 
> You don't need to add it to the tree. You just have to setup your path
> to point things /at/ a kernel build tree withall the opt_xxx.h in
> them.
> 
> here's what I do:
> 
> #!/bin/sh
> 
> X_SRCDIR=${X_SRCDIR:="/home/adrian/work/freebsd/head/src/"}
> X_KERNDIR=${X_KERNDIR:="/home/adrian/work/freebsd/head/obj/usr/home/adrian/work/freebsd/head/src/sys/GERTRUDE/"}
> X_KMODOWN=${X_KMODOWN:="adrian"}
> X_KMODGRP=${X_KMODGRP:="adrian"}
> 
> # This allows for -HEAD includes for net80211 ..
> env CFLAGS="-I../../../sys/" \
> make \
>     MODULES_OVERRIDE="" \
>     DEBUG_FLAGS="-g" \
>     DEBUG_FLAGS="-g" \
>     KMODDIR="/home/adrian/git/github/erikarn/athp/otus/freebsd/modules/" \
>     KMODOWN="${X_KMODOWN}" \
>     KMODGRP="${X_KMODGRP}" \
>     MAKESYSPATH="${X_SRCDIR}/share/mk" \
>     SYSDIR="${X_SRCDIR}/sys/" \
>     KERNBUILDDIR="${X_KERNDIR}" \
>     KERN_DEBUGDIR="" \
>     $@
> 
> That gets me all the bits I need to be able to run make in module
> directories and get the correct includes/links setup.

Oh damn - it used to be much easier than that.
I'm still used to "make all install" for out of tree kernel modules.
How is it handled for the few kmods in ports?

-- 
B.Walter <bernd@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160807221319.GD34368>