<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Thanks to Thomas and Thomas!<br>
    <br>
    now I see that I was very close to solution. Only thing I missed
    was:<br>
    <pre wrap="">_DEPENDENCIES = linux

</pre>
    I also replaced my ugly:
    "$(BASE_DIR)/build/linux-$(BR2_LINUX_KERNEL_VERSION)" with nice: <br>
    <pre wrap="">$(LINUX_DIR)

</pre>
    I also vote for adding kernel modules build environment to Buildroot
    (as template or in any other form...)<br>
    <br>
    Regards,<br>
    Aleksandar<br>
    <br>
    <br>
    <br>
    <br>
    On 04/08/2011 09:45, Thomas Petazzoni wrote:
    <blockquote cite="mid:20110804094557.4464b69b@skate" type="cite">
      <pre wrap="">Hello,

Le Thu, 04 Aug 2011 08:30:21 +0200,
Aleksandar Zivkovic <a class="moz-txt-link-rfc2396E" href="mailto:Aleksandar.Zivkovic@rt-rk.com"><Aleksandar.Zivkovic@rt-rk.com></a> a écrit :

</pre>
      <blockquote type="cite">
        <pre wrap="">I would like to add additional package to Buildroot that will build 
Linux kernel driver.
For that I need:
- dependency: build of this package mustn't be started before kernel 
source is available
- kernel source directory: currently, the best I know is: 
$(BASE_DIR)/build/linux-$(BR2_LINUX_KERNEL_VERSION)

I started with package approach but bumped to stated dependency
problem. Next what I tried is to edit linux/linux.mk to include my
driver source download, extract. build and install but not so
familiar with Buildroot scripting...

Did somebody already done something similar? What is best approach? 
Examples are welcomed...
</pre>
      </blockquote>
      <pre wrap="">
Attached, you will find :

 * mykmod-1.0.tar.bz2, the source code of an hello world like kernel
   module ;

 * kmod-example.patch, which adds support for compiling this kernel
   module into the Buildroot package infrastructure

Do not hesitate to get back to the mailing list if you have any issues
getting this to work or need additional details.

Best regards,

Thomas
</pre>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
buildroot mailing list
<a class="moz-txt-link-abbreviated" href="mailto:buildroot@busybox.net">buildroot@busybox.net</a>
<a class="moz-txt-link-freetext" href="http://lists.busybox.net/mailman/listinfo/buildroot">http://lists.busybox.net/mailman/listinfo/buildroot</a></pre>
    </blockquote>
  </body>
</html>