Get name of kernel module in Driver Code - KBUILD_MODNAME

Kernel build system defines KBUILD_MODNAME automatically from each Makefile.

Following is the sample code which prints the name of module when loaded and unloaded.


Ouptut:


Comments

Popular posts from this blog

bb.utils.contains yocto

Difference between RDEPENDS and DEPENDS in Yocto

make config vs oldconfig vs defconfig vs menuconfig vs savedefconfig