Creating boot.img for compiled kernel from git.kernel.org for dragonboard410c

Hi,
I compiled my own kernel doing:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git cd linux-stable/ git checkout v4.9.1 make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4 Image dtbs modules

then I followed this instructions:
http://builds.96boards.org/releases/dragonboard410c/linaro/debian/latest/

to make a boot.img from my kernel , So I downloaded initrd.img-4.4.38-linaro-lt-qcom and run mkbootimg as instructed. Then boot it:

sudo fastboot boot boot.img

but then I found out there is no internet connection on the dragonboard and running:

root@linaro-developer:~# modprobe iwlwifi modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.9.1/modules.dep.bin'

So it seems that modprobe search in /lib/modules/4.9.1/ but I have /lib/modules/4.4.23-linaro-lt-qcom/
So there seems to be inconsistency. How do I fix this? Is it possible to create a boot.img for kernel compiled from git.kernel.org ?

Also I see that working/qualcomm/kernel.git - Qualcomm Landing Team kernel has tags of type:
vX.X-rcX , does this correspond to tag vX.X.X in git.kernel.org ?

1 Like

I built the kernel and the boot.img again as instructed in
http://builds.96boards.org/releases/dragonboard410c/linaro/debian/latest/

this time with the kernel source from working/qualcomm/kernel.git - Qualcomm Landing Team kernel exactly as instructed. After booting with

sudo fastboot boot boot-db410c.img

again I have no internet from the board , ifconfig shows:

root@linaro-developer:~# ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

also lsmod shows nothing but /proc/modules exist

some drivers are built in, and some drivers are built as modules. the kernel will fail to load modules which aren’t built from the same tree / version.

the first experiment you’ve done is expected. if you built a different kernel, you need to build the modules as well, and deploy them in the rootfs in /lib/modules. Unfortunately the modules can’t go into the boot image, so it makes the installation a bit more cumbersome.

after compiling the kernel , compile the modules as well:

make modules

then to copy the modules from host PC to the board, one option is to use a USB stick, on the PC

make modules_install INSTALL_MOD_PATH=<path to USB drive>

then boot the board and mount the USB driver, and copy the modules from USB into /lib/modules… then reboot

You can use SD card as well…

For the second experiment, it should have worked. I am tempted to believe that you did not set “KERNELRELEASE=4.4.23-linaro-lt-qcom” when compiling the kernel, could that be it?

1 Like

hi, thanks for the explanations , I did the whole process again and it works.