Received: from [84.21.108.25] (helo=ns.penguin.cz) by linuxtogo.org with esmtp (Exim 4.69) (envelope-from ) id 1Kuxj1-0008Bb-M8 for openembedded-devel@lists.openembedded.org; Wed, 29 Oct 2008 00:11:49 +0100 Received: from localhost (localhost [127.0.0.1]) by ns.penguin.cz (Postfix) with ESMTP id 899E8141718D for ; Wed, 29 Oct 2008 00:10:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at ns.penguin.cz Received: from ns.penguin.cz ([127.0.0.1]) by localhost (ns.penguin.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x3l85ZUw4d5n for ; Wed, 29 Oct 2008 00:10:26 +0100 (CET) Received: from [192.168.1.2] (7-165-207-85.strcechy.adsl-llu.static.bluetone.cz [85.207.165.7]) by ns.penguin.cz (Postfix) with ESMTP id 4DA311416BA6 for ; Wed, 29 Oct 2008 00:10:26 +0100 (CET) From: Stanislav Brabec To: openembedded-devel@lists.openembedded.org In-Reply-To: References: Date: Wed, 29 Oct 2008 00:10:12 +0100 Message-Id: <1225235412.9331.13.camel@utx.utx.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1.1 Subject: Re: Problems building a kernelmodule for OE X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: openembedded-devel@lists.openembedded.org List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 23:11:50 -0000 Content-Type: text/plain Content-Transfer-Encoding: 7bit Henk Geraads wrote: > Found the problem with __LINUX_ARM_ARCH__! > the "-march=armv5t" in the makefie compiler line did mess up things!! It is very probably still not correct. When cross compiling the kernel, you need to pass "ARCH=arm" to make (and set CPU type in .config. Otherwise compile options may be invalid (and you can even corrupt your .config file) and then correct -march should be generated by make. > the include of the "pxa-regs.h" and "gpio.h" solved the other problem. > > Now I've got strange error's from the linker; > make[2]: *** [/home/henk/SystemDev/module/cfi-ktst/cfi-mod.ko] Error 1 > make[1]: *** [modules] Error 2 > make: *** [default] Error 2 > arm-angstrom-linux-gnueabi-ld: unrecognized option '-Wl,-rpath-link,/home/armcore/oe/build/tmp/angstrom/staging/arm-angstrom-linux-gnueabi/lib' > arm-angstrom-linux-gnueabi-ld: use the --help option for usage information > make[2]: *** [/home/henk/SystemDev/module/cfi-ktst/cfi-mod.ko] Error 1 > make[1]: *** [modules] Error 2 > make: *** [default] Error 2 > > I thought linker option's are very common? -Wl is not an option for linker, but cor compiler. Linker should get only parameters of -Wl. Additionally -rpath-link is not useful for kernel (dynamic linking is an user space issue). Something went wrong and make passed bad arguments to the linker. Here is a make syntax I am using for kernel cross compilation: make ARCH=arm CC=arm-angstrom-linux-gnueabi-gcc LD=arm-angstrom-linux-gnueabi-ld INSTALL_PATH=$PWD/INSTALL/boot INSTALL_MOD_PATH=$PWD/INSTALL You may need to add target (e. g. zImage, install, zinstall, modules_install). ________________________________________________________________________ Stanislav Brabec http://www.penguin.cz/~utx/zaurus