OpenWrt Forum Archive

Topic: Adding new kernel module to the OpenWRT build.

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi Guys,

I am new to OpenWRT

I am trying to add a kernel spi module to my Atheros AR9331 custom hardware running OpenWRT (Barrier Breaker).

I have added a new stanza  in package/kernel/modules/spi.mk and I see the item for my driver in menuconfig.

While I try to build with

make ./package/kernel/compile V=s however I get 

...
"WARNING: kmod-spi-si3217x is not available in the kernel config"
...

What am I missing?
What is the proper (OpenWRT) way to recompile only my custom kernel module?   

Thank you!
Dimitar

You need to issue make target/linux/compile before to update kernel .config and build the actual .ko files, the package/kernel target is solely for packaging the .ko files.

May I ask which command actually builds the .ko files? I'm trying to build a module but fails with the following:

make[7]: *** [silentoldconfig] Error 1
make[6]: *** [silentoldconfig] Error 2

The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.

make[5]: *** [modules] Error 1

although I have in kernel_menuconfig enabled:

--->                                                                               │ │
  │ │                               [*] Enable loadable module support  --->                                                              │ │

here are my steps.

git clone git://git.openwrt.org/14.07/openwrt.git
scripts/feeds -a
don't run any install because I don't need any feeds, just want to compile kernel modules
take https://downloads.openwrt.org/barrier_b … xx_generic and copy it in buildroot as .config
make menuconfig
make kernel_menuconfig
select modules
make

and fails.

(Last edited by nroberto13 on 25 Oct 2014, 09:09)

just realised this is in dev only. will repost in general discussion, as I'm not a dev sorry.

The discussion might have continued from here.