From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Fri, 5 Apr 2013 14:07:52 +0200 Subject: [Buildroot] Cross-Compiling out-of-tree driver In-Reply-To: References: Message-ID: <20130405140752.195f40c9@skate> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hello Andreas, (Would be nice if your e-mail had been wrapped to ~80 characters). On Fri, 5 Apr 2013 13:40:59 +0200 (CEST), universeII at gmx.de wrote: > I'm trying to use buildroot to create a Linux system for our custom > VME PowerPC board. > > I succeeded in modifying the kernel to run on our special hardware > but I'm stuck in compiling a driver out-of-tree. > > In-kernel compilation is no problem but for development and > debugging of drivers it is much simpler to be able to compile drivers > quickly out-of-tree and insert/remove them manually. > > I started to compile a dummy driver out-of-tree on my linux PC > which works fine. Now I'm trying to use the linux kernel inside > buildroot tree (setting KDIR appropriately) and use the cross-compile > tool from buildroot. I searched the buildroot documentation but only > found instructions how to compile own applications/libraries. Also > TODOs from the internet on cross-compiling drivers did not help. > > Maybe I just oversee some simple things > > Can anybody give me a hint, how to cross-compile a linux driver > out-of-tree using buildroot? Yes. See the mail I posted a long time ago, which provided an example of a kernel module and the associated .mk file: http://lists.busybox.net/pipermail/buildroot/2011-August/044807.html Note however that the .mk file will need a few modifications, especially the last line should just be: $(eval $(generic-package)) I hope this helps. If not, don't hesitate to come back with any question you may have. Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com