From owner-freebsd-mips@FreeBSD.ORG Tue Nov 22 09:29:05 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C2D7106564A; Tue, 22 Nov 2011 09:29:05 +0000 (UTC) (envelope-from monthadar@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4DB718FC19; Tue, 22 Nov 2011 09:29:05 +0000 (UTC) Received: by iakl21 with SMTP id l21so12355312iak.13 for ; Tue, 22 Nov 2011 01:29:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=w+Fg1Xp7FaAGQz//VVaJWpzYk89ZeGk9yBeeI59JSDk=; b=Am9+mnrIm5fN1QxQLTiTGViYNNtc8ka7n7pABf8MR/Kv9KROKVpZIJ3EsAP+dEeCnx xLASeLR67160knRNxSf/YpUbzjMWTCUsHuAPEVR5a509k3cuDfcbxaxYalzgplp8Zfnu vOOsgxa81hnTOmTOZuEMXBTmv4asg1sZWLo/8= MIME-Version: 1.0 Received: by 10.231.82.131 with SMTP id b3mr4273518ibl.74.1321954144929; Tue, 22 Nov 2011 01:29:04 -0800 (PST) Received: by 10.50.100.132 with HTTP; Tue, 22 Nov 2011 01:29:04 -0800 (PST) In-Reply-To: <20111121123029.2f844bb7.stas@FreeBSD.org> References: <20111121123029.2f844bb7.stas@FreeBSD.org> Date: Tue, 22 Nov 2011 10:29:04 +0100 Message-ID: From: Monthadar Al Jaberi To: Stanislav Sedov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: Cross compiling module X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2011 09:29:05 -0000 On Mon, Nov 21, 2011 at 9:30 PM, Stanislav Sedov wrote: > On Mon, 21 Nov 2011 14:28:56 +0100 > Monthadar Al Jaberi 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 >> >> 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