After I clean up my own two *very* stupid errors of not capitalizing the
name of the Makefile and installing the *r12* headers (I had r11), it
compiles and inserts.
During my experiments, though, I came across something odd. As the missing
piece appeared to be this symlink:
root@arm:~/mymodules# ls -al /lib/modules/4.1.6-ti-r12/build
lrwxrwxrwx 1 root root 35 Aug 26 21:17 /lib/modules/4.1.6-ti-r12/build ->
/usr/src/linux-headers-4.1.6-ti-r12
To make r12 compile, I tried creating this symlink:
root@arm:/# ln -s /root/bb-kernel/KERNEL /lib/modules/4.1.6-ti-r12/build
Which does compile, but unfortunately doesn't seem to get the module info
correct, so I can't insmod:
root@arm:~/mymodules# insmod hello.ko
insmod: ERROR: could not insert module hello.ko: Invalid module format
root@arm:~/mymodules# modinfo hello.ko
filename: /root/mymodules/hello.ko
description: A Simple Hello World module
depends:
vermagic: 4.1.6-bone15 mod_unload modversions ARMv7 thumb2 p2v8
root@arm:~/mymodules# uname -r
4.1.6-ti-r12
The conflict appears to be that vermagic gets set to 4.1.6-bone15 instead
of r12.
Anyway, thanks for the advice.
For the record, here is my new Makefile (careful copying as make is nuts
about tabs vs spaces):
root@arm:~/mymodules# cat Makefile
obj-m += hello.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.