I am writing my own driver for switches for IMX6ulEVK. I followed the below steps while writing the driver
my driver module.
obj-y += my_drvr/
or
obj-$(CONFIG_MY_DRIVER) += my_drvr/
source "drivers/my_drvr/Kconfig"
CONFIG_MY_DRIVER=y
After compiling the kernel using bitbake linux-imx i am able to see my driver gopt compiled and .ko file is generated. But it is not included in the sdcard package. Is there anything I need to do additionally other than the above steps. I am using bitbake core-image-base for 3.14.38 bsp version
I'd like to share my rebuild script here
#!/bin/sh
rm tmp/stamps/imx6sxsabresd-poky-linux-gnueabi/linux-imx/3.14.28-r0.do_compile.*
bitbake linux-imx -c compile
if [ $? -ne 0 ];then
exit
fi
rm sstate-cache/ab/sstate:linux-imx:imx6sxsabresd-poky-linux-gnueabi:3.14.28:r0:imx6sxsabresd:3:abcaddfad744af88c57ba3e6769b28dc_deploy.tgz
rm tmp/stamps/imx6sxsabresd-poky-linux-gnueabi/linux-imx/3.14.28-r0.do_deploy.abcaddfad744af88c57ba3e6769b28dc
rm tmp/stamps/imx6sxsabresd-poky-linux-gnueabi/linux-imx/3.14.28-r0.do_deploy_setscene.abcaddfad744af88c57ba3e6769b28dc
bitbake linux-imx -c deploy
if [ $? -ne 0 ];then
exit
fi
rm tmp/stamps/imx6sxsabresd-poky-linux-gnueabi/core-image-minimal/1.0-r0.do_rootfs.*
bitbake core-image-minimal
and I don't like "bitbake xxxxx -f"
thank you very much for the script.
will the above script will make sure that my custom driver and added with final image
Hello Chandra, did you try the script from Qinghua?
yes tried and it is working with minor changes