Date: Tue, 22 Nov 2011 10:29:04 +0100 From: Monthadar Al Jaberi <monthadar@gmail.com> To: Stanislav Sedov <stas@freebsd.org> Cc: freebsd-mips@freebsd.org Subject: Re: Cross compiling module Message-ID: <CA%2BsBSoJ53UYfsAeS-jfDLC9Lag9CZ9O87_OoQWK-1K30SaWYoQ@mail.gmail.com> In-Reply-To: <20111121123029.2f844bb7.stas@FreeBSD.org> References: <CA%2BsBSoK0jYhZj=4kjdNp40yyWR7_dQHuv3DsXe6ihb%2Bd81WOWw@mail.gmail.com> <20111121123029.2f844bb7.stas@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 21, 2011 at 9:30 PM, Stanislav Sedov <stas@freebsd.org> wrote: > On Mon, 21 Nov 2011 14:28:56 +0100 > Monthadar Al Jaberi <monthadar@gmail.com> mentioned: > >> Hi! >> >> Not sure if this is the right place :) >> >> I have written a kernel module with the following Makefile: >> .PATH: =A0 =A0 =A0 =A0${.CURDIR}/src >> >> # Declare Name of kernel module >> KMOD =A0 =A0=3D moduletest >> >> # Enumerate Source files for kernel module >> SRCS =A0 =A0=3D =A0module.c >> >> # Include kernel module makefile >> .include <bsd.kmod.mk> >> >> then >> cd =A0/usr/src >> make TARGET=3Dmips TARGET_ARCH=3Dmipseb buildenv >> cd /root/mymodule >> make >> >> but I get the following error: >> Warning: Object directory not changed from original /root/mymodule >> cc -O -pipe -G0 -Werror -D_KERNEL -DKLD_MODULE -nostdinc =A0 -I. -I@ >> -I@/contrib/altq -finline-limit=3D8000 >> =A0--param inline-unit-growth=3D100 --param large-function-growth=3D1000 >> -fno-common =A0-G0 -fno-pic -mno-abicalls >> =A0-mlong-calls =A0-msoft-float -ffreestanding -std=3Diso9899:1999 -Wall >> -Wredundant-decls -Wnested-externs -Wstrict-prototypes >> =A0 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual =A0-Wundef >> -Wno-pointer-sign -fformat-extensions =A0-Wmissing-include-dirs >> -fdiagnostics-show-option -c /root/src/mymodule/src/module.c >> In file included from ./machine/bus.h:76, >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0from /root/mymodule/module.c:57: >> ./machine/_bus.h:37:26: error: opt_cputype.h: No such file or directory >> *** Error code 1 >> >> Stop in /root/mymodule. > > Hi! > > I think you might need to pass the KERNCONF variable so it will find > the right kernel. It didnt help, same error msg. btw I think I found a bug that has todo with buildenv, http://www.freebsd.org/cgi/query-pr.cgi?pr=3D162724 > > -- > Stanislav Sedov > ST4096-RIPE > > () =A0ascii ribbon campaign - against html e-mail > /\ =A0www.asciiribbon.org =A0 - against proprietary attachments > --=20 Monthadar Al Jaberi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BsBSoJ53UYfsAeS-jfDLC9Lag9CZ9O87_OoQWK-1K30SaWYoQ>