Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I wrote a simple character device driver & wanted to cross-compile it for craneboard (ARM architecture). My file name is gDev.c. I copied the file to kernel/drivers/char directory in craneboard source. I modified the Kconfig file in that same directory & added the following lines to it.

config TEST_GCHARD
    tristate "My Character driver"
    default m

I added the following line to the Makefile in the same directory.

obj-$(CONFIG_TEST_GCHARD)   += gDev.o

I added the following line in the am3517_crane_defconfig in arch/arm/configs directory.

CONFIG_TEST_GCHARD=m

My problem is, when I set it as m in am3517_crane_defconfig, the file is not getting included for compilation. But, if I change it as y, it is getting compiled. But, I need it to be a module which I must insmod after board boots up. Please guide me whether I'm missing any steps.

share|improve this question
    
Does that kernel have modules enabled? –  CL. Sep 13 '13 at 12:10
    
@CL. Thanks. How to check that? –  Gomu Sep 13 '13 at 12:12
    
@CL. I checked using lsmod and it listed the loaded modules. Then, I suppose, the kernel has modules enabled. –  Gomu Sep 13 '13 at 12:48
    
Where in the Kconfig file did you add it? –  CL. Sep 13 '13 at 12:50
    
@CL. I added it as last but one entry. I'm able to see it in menuconfig also. –  Gomu Sep 13 '13 at 12:57
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.