Compiling single module

Ezequiel García elezegarcia at
Tue Apr 26 08:41:12 EDT 2011

I browse through the whole net looking how to build a single module from drivers/staging. 

Tried this on /usr/src/linux:

make M=drivers/staging/xgifb/ modules

And it worked...
root at zeta-pc:/usr/src/linux# make M=drivers/staging/xgifb/ modules 
  CC [M]  drivers/staging/xgifb/XGI_main_26.o
  CC [M]  drivers/staging/xgifb/vb_init.o
  CC [M]  drivers/staging/xgifb/vb_setmode.o
  CC [M]  drivers/staging/xgifb/vb_util.o
  CC [M]  drivers/staging/xgifb/vb_ext.o
  LD [M]  drivers/staging/xgifb/xgifb.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      drivers/staging/xgifb/xgifb.mod.o
  LD [M]  drivers/staging/xgifb/xgifb.ko

Now when I try another one it does not work:

root at zeta-pc:/usr/src/linux# make M=drivers/staging/sm7xx modules
  Building modules, stage 2.
  MODPOST 0 modules
root at zeta-pc:/usr/src/linux# make drivers/staging/sm7xx/
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/

I think maybe this is because I need to enable the module by on config.
Am I right?


-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Kernelnewbies mailing list