I'm using Buildroot for compiling embedded linux. It works well because I have target Makefile configurations, but now I need driver for my usb devices. I manage to compile Qt appilactions(c++) on my host linux to target linux by using buildroots /output/host/usr/bin/arm-none-linux-gnueabi-c++ . Works well.

Now I'm trying to compile c-files for this driver.

I'm calling it like:

/output/host/usr/bin/arm-none-linux-gnueabi-gcc -Wall -D__KERNEL__ -DMODULE -I/home/buildroot-2012.08/output/build/linux- -DMODVERSIONS -include /home/buildroot-2012.08/output/build/linux- -I /home/buildroot-2012.08/output/build/linux- -O   -c -o ftdi_sio.o ftdi_sio.c

I'm getting error:

output/build/linux- fatal error: asm/linkage.h: No such file or directory

  1. How I should configurate the driver compiling?
  2. Is there some other way to do it for target linux. Mayby I'm not doing it the right way.
  • Buildroot is an integrated build environment, so you better take a look how to create a recipe for kernel module to integrate it to kernel build process. There is no point in using Buildroot if you still compile applications, kernel modules manually.
    – KBart
    Oct 23, 2013 at 10:10

1 Answer 1


asm/ is a symbolic link to your target architecture, if it doesn't exist probably you're missing some target in your kernel build directory, configure (if not, maybe just module_headers can make it)

It is not clear from your question if you're using the command line, a custom Makefile, or a Buildroot package (which version of Buildroot are you using).

Your command line is building a C object .o not a kernel module (.o was the extension for kernel modules till the version 2.4, from 2.6 it is .ko)

If you are not sure about the flags increase the verbosity for the build of the kernel modules, build and log, then use the same.

The kernel have its way to build modules and the Buildroot have its way for packages, the best is probably to create a new package to build your module (take a look if there's already some other package that build a module).

This example is a bit old but maybe help.


The ftdi_sio.ko module is generated into the directory /lib/modules/$(uname -r)/kernel/drivers/usb/serial/

But it could be configured as builtin also, so that no .ko is generated, check the symbol USB_SERIAL_FTDI_SIO in your configuration (should be y for builtin m for module).

If it is builtin or inserted there should be a /proc interface at runtime on the target called ftdi_sio, find it.

  • It looks like that driver should be FTDI USB UART built in to kernel. How I can check that on buildroot?
    – user257980
    Oct 23, 2013 at 6:00
  • Looks like its on output also, /buildroot-2012.08/output/build/linux- But how it's not on the target distor?
    – user257980
    Oct 23, 2013 at 6:09
  • I mange to install it and added it by # modprobe ftdi_sio vendor=0x0403 product=0x6001, but I can't get any infromation from ttyUSB0
    – user257980
    Oct 23, 2013 at 13:45
  • That's another question :) see here and here hope it help. sertest.c.
    – Alex
    Oct 23, 2013 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.