What I’m doing is editing the code in KERNEL/sound/soc/codecs/tlv320aic3x.c, running tools/rebuild.sh and then copying KERNEL/sound/soc/codecs/snd-soc-tlv320aic3x.ko to my BBB in /lib/modules/4.4.9-bone-rt-r10/kernel/sound/soc/codecs. This works and the module loads and runs fine. However, running tools/rebuild.sh sometimes takes a really long time. Is there a quicker way to compile and load a module, can anyone suggest a better workflow?
I've always felt like it should be possible to just rebuild the module. Is it possible to cd to some subdir and hit "make"? Something to avoid all the work the script repeats?
Sure you can, just run the "make -jx LOCALVERSION=xxx ARCH=xxx CROSS_COMPILE=xxx modules" command that is displayed in the script.
That target implies all the modules. I'd like to avoid all the dependency checking for all the other modules. Nevertheless, I'll try that, see if it saves time.
I modified the file you are building and the build takes all of about 2 seconds. How much more time do you want to save?
When I edit the file and then run scripts/rebuild.sh, it opens Menuconfig, I close it and then it starts issuing many CC commands that take about 2 minutes to complete.
If I run the following instead, it takes a little longer than a minute
make -j4 ARCH=arm LOCALVERSION=-bone-rt-r10 CROSS_COMPILE="ccache /home/rvg/Desktop/bb-kernel/dl/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-" modules
My machine is not (so) slow, it’s a dual core i7 (4 cores seen by the kernel), about 5 years old, with 8GB ram.