Linux: Compiling a kernel device driver in standalone fashion -


i'm compiling linux arm board. need make customized changes existing driver code present in kernel repository , reload driver.

i expecting find ".ko" file in driver directory after doing make, no such file exists. apparently uimage/device tree image compilation doesn't work way.

do need write own makefile standalone device driver compilation?

it may silly question, sorry i'm pretty new kernel/device drivers.

edit: followed process outlined here: http://odroid.com/dokuwiki/doku.php?id=en:c1_building_kernel after git checkout , installing cross-compiler(arm-linux-gnueabihf-gcc 4.9.2), issue basic make comands

$ make odroidc_defconfig $ make -j4 $ make -j4 modules $ make uimage 

all steps successful. last few lines of log like

ksym    .tmp_kallsyms1.o ksym    .tmp_kallsyms2.o ld      vmlinux sortex  vmlinux sysmap  system.map objcopy arch/arm/boot/ccimage kernel: arch/arm/boot/ccimage ready image arch/arm/boot/ccimage.lzo ready uimage  arch/arm/boot/uimage image name:   linux-3.10.72 created:      sat mar 28 22:44:45 2015 image type:   arm linux kernel image (lzo compressed) data size:    5459649 bytes = 5331.69 kb = 5.21 mb load address: 00208000 entry point:  00208000 image arch/arm/boot/uimage ready 

edit 2: path driver code https://github.com/hardkernel/linux/tree/odroidc-3.10.y/drivers/amlogic/efuse

examining makefile

#                              # makefile efuse.          #                               obj-$(config_efuse) += efuse_bch_8.o efuse_version.o efuse_hw.o efuse.o  

we learn code can built either loadable module, or permanently linked kernel itself.

examining odroidc_defconfig branch odroidc-3.10.y-android mentioned in instructions find

# # efuse support # config_efuse=y 

with "y" indicating code linked driver. had instead said "m" built module.

it's possible change in kernel config, might cause problems if there's nothing setup load module before needed.

likely installing newly built kernel code linked inside (ie, forgetting module idea) work.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -