I want to load kernel modules, ip_gre.ko
and gre.ko
, on a embedded-device running embedded-linux to make that device to support GRE protocol. Since I do not want to change Embedded-linux device's kernel, I try to load kernel modules instead of re-installing device kernel.
Fortunately, I have that device's kernel source code, thus I could compile ip_gre.ko
and gre.ko
modules. However, loading modules using insmod
on the device failed with following messsages:
$ insmod gre.ko
insmod: can't insert 'gre.ko': Resource temporarily unavailable
$ insmod ip_gre.ko
ip_gre: Unknown symbol gre_del_protocol
ip_gre: Unknown symbol gre_add_protocol
insmod: can't insert 'ip_gre.ko': unknown symbol in module, or unknown parameter
$ dmesg
GRE over IPv4 demultiplexor drvier
gre: can't add protocol
ip_gre: Unknown symbol gre_del_protocol
ip_gre: Unknown symbol gre_add_protocol
My device has enough memeory to load modules (free
showed 190700/239760 are free).
Could you please let me know why this happens and its possible solutions?
UPDATE:
These are differences between .config
of running kernel (on device) and that of kernel compiled for above two modules.
$ diff config_for_running_kernel config_for_kernel_compiled_for_modules
299c299, 301
< # CONFIG_NET_IPGRE_DEMUX is not set
---
> CONFIG_NET_IPGRE_DEMUX=m
> CONFIG_NET_IPGRE=m
> CONFIG_NET_IPGRE_BROADCAST=y
963c965
< CONFIG_PPTP=y
---
> CONFIG_PPTP=m
Since CONFIG_PPTP
depends on CONFIG_NET_IPGRE_DEMUX
, I had to make it as a module to compile the kernel without error message.
Do the differences cause above error messages? If it is, could you let me know how can I solve it...? (and if you have additional references that can teach me about these problems & solutions, I would be very thankful)
.config
file? The errors you're getting are consistent with having used incompatible options. Finding the right options isn't always easy if you don't have the running kernel's.config
somewhere (check/proc/config.gz
, but it's an optional feature so you may not have it).