Skip to contentSkip to conversation

OE builds LKMs not matching kernel version (MACHINE="dm6446-evm")

DISCUSSION Bjørn Forsman 1 participant 2 messages Dec 9, 2009 – Dec 10, 2009

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm using MACHINE="dm6446-evm" and DISTRO="angstrom-2008.1" and OE builds different/incompatible versions of the kernel modules (LKM) and the kernel. How do I go about debugging this?

The built images seem correct on the host (same version number):

uImage-2.6.31+2.6.32-rc2-r28+gitr7b2683fd0168df1576fcea947ef9f63e905de807-r28-dm6446-evm.bin modules-2.6.31+2.6.32-rc2-r28+gitr7b2683fd0168df1576fcea947ef9f63e905de807-r28-dm6446-evm.tgz

But when booting the target, the kernel complains because the LKMs doesn't match the kernel version:
----
WARNING: Couldn't open directory /lib/modules/2.6.32-rc2-09211-g17d857b: No such file or directory
FATAL: Could not open /lib/modules/2.6.32-rc2-09211-g17d857b/modules.dep.temp for writing:
No such file or directory
WARNING: Couldn't open directory /lib/modules/2.6.32-rc2-09211-g17d857b: No such file or directory
FATAL: Could not open /lib/modules/2.6.32-rc2-09211-g17d857b/modules.dep.temp for writing:
No such file or directory
...snip...

# ls -l /lib/modules
drwxr-xr-x    3 root     root         4096 Dec  9 00:10 2.6.32-rc2-davinci1
# insmod /lib/modules/2.6.32-rc2-davinci1/kernel/fs/smbfs/smbfs.ko
[  264.580000] smbfs: disagrees about version of symbol module_layout
insmod: cannot insert
'/lib/modules/2.6.32-rc2-davinci1/kernel/fs/smbfs/smbfs.ko': invalid
module format
# uname -r
2.6.32-rc2-09211-g17d857b
----

I really wish I knew OE well enough to debug this myself, but I don't (yet). What is the bitbake target for kernel modules? Where is is the decision on what kernel version to build the LKMs against? How is it possible for LKMs to end up being built for wrong kernels?

(I have tried to generate a dependency graph with 'bitbake -g base-image', hoping that it would give me some clues. But my machine just hangs for a long time and then segfaults when trying to view depends.dot.)

Best regards,
Bjørn Forsman

#1 lore raw

2009/12/9 Bjørn Forsman <[email protected]>:

Quoted 41 lines

Hi all,

I'm using MACHINE="dm6446-evm" and DISTRO="angstrom-2008.1" and OE builds different/incompatible versions of the kernel modules (LKM) and the kernel. How do I go about debugging this?

The built images seem correct on the host (same version number):

uImage-2.6.31+2.6.32-rc2-r28+gitr7b2683fd0168df1576fcea947ef9f63e905de807-r28-dm6446-evm.bin modules-2.6.31+2.6.32-rc2-r28+gitr7b2683fd0168df1576fcea947ef9f63e905de807-r28-dm6446-evm.tgz

But when booting the target, the kernel complains because the LKMs doesn't match the kernel version:
----
WARNING: Couldn't open directory /lib/modules/2.6.32-rc2-09211-g17d857b: No such file or directory
FATAL: Could not open /lib/modules/2.6.32-rc2-09211-g17d857b/modules.dep.temp for writing:
No such file or directory
WARNING: Couldn't open directory /lib/modules/2.6.32-rc2-09211-g17d857b: No such file or directory
FATAL: Could not open /lib/modules/2.6.32-rc2-09211-g17d857b/modules.dep.temp for writing:
No such file or directory
...snip...

# ls -l /lib/modules
drwxr-xr-x    3 root     root         4096 Dec  9 00:10 2.6.32-rc2-davinci1
# insmod /lib/modules/2.6.32-rc2-davinci1/kernel/fs/smbfs/smbfs.ko
[  264.580000] smbfs: disagrees about version of symbol module_layout
insmod: cannot insert
'/lib/modules/2.6.32-rc2-davinci1/kernel/fs/smbfs/smbfs.ko': invalid
module format
# uname -r
2.6.32-rc2-09211-g17d857b
----

I really wish I knew OE well enough to debug this myself, but I don't (yet). What is the bitbake target for kernel modules? Where is is the decision on what kernel version to build the LKMs against? How is it possible for LKMs to end up being built for wrong kernels?

Quoted 8 lines

(I have tried to generate a dependency graph with 'bitbake -g base-image', hoping that it would give me some clues. But my machine just hangs for a long time and then segfaults when trying to view depends.dot.)

Best regards,
Bjørn Forsman

This is embarrassing: there is no problem with OE, it was just that I had not copied the correct uImage to /tftpboot. Sorry for the noise.

Best regards,
Bjørn Forsman