Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load mymodule_lin.ko #3

Open
Linerd opened this issue Feb 1, 2018 · 6 comments
Open

Cannot load mymodule_lin.ko #3

Linerd opened this issue Feb 1, 2018 · 6 comments

Comments

@Linerd
Copy link

Linerd commented Feb 1, 2018

mymodule_lin: Unknown symbol netmap_bdg_ctl (err 0)
mymodule_lin: Unknown symbol netmap_bdg_learning (err 0)

These are the errors printed by "dmesg | tail"

I downloaded this repo, and in "mymodule/LINUX" I typed:
make KSRC=/usr/src/linux-headers-XXX NSRC=/home/XXX/netmap
or
make KSRC=/usr/src/linux-sources-XXX NSRC=/home/XXX/netmap

neither worked

@vmaffione
Copy link
Collaborator

I'm not the author of the VALE tutorial part, but here it seems you haven't loaded the netmap module.

@Linerd
Copy link
Author

Linerd commented Feb 2, 2018 via email

@vmaffione
Copy link
Collaborator

You could grep the symbol to check it's there

 $ grep netmap_bdg_ /proc/kallsyms

@Linerd
Copy link
Author

Linerd commented Feb 2, 2018

it's there, please see the make output:

make NSRC=/home/yikai/netmap KSRC=/usr/src/linux-headers-4.4.0-103-generic/
make -C /usr/src/linux-headers-4.4.0-103-generic/ M=/home/yikai/netmap-tutorial/mymodule/LINUX
CONFIG_NETMAP=m CONFIG_NETMAP_VALE=y CONFIG_MYMODULE=m
EXTRA_CFLAGS='-I/home/yikai/netmap/ -I/home/yikai/netmap/LINUX -I/home/yikai/netmap/sys -I/home/yikai/netmap-tutorial/mymodule/LINUX/../sys -DCONFIG_NETMAP' KBUILD_EXTRA_SYMBOLS=/home/yikai/netmap/Module.symvers
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-103-generic'
LD /home/yikai/netmap-tutorial/mymodule/LINUX/built-in.o
CC [M] /home/yikai/netmap-tutorial/mymodule/LINUX/mymodule.o
LD [M] /home/yikai/netmap-tutorial/mymodule/LINUX/mymodule_lin.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: could not find /home/yikai/netmap-tutorial/mymodule/LINUX/.mymodule.o.cmd for /home/yikai/netmap-tutorial/mymodule/LINUX/mymodule.o
WARNING: "netmap_bdg_learning" [/home/yikai/netmap-tutorial/mymodule/LINUX/mymodule_lin.ko] undefined!
WARNING: "netmap_bdg_ctl" [/home/yikai/netmap-tutorial/mymodule/LINUX/mymodule_lin.ko] undefined!

CC /home/yikai/netmap-tutorial/mymodule/LINUX/mymodule_lin.mod.o
LD [M] /home/yikai/netmap-tutorial/mymodule/LINUX/mymodule_lin.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-103-generic'
ls -l find . -name \*.ko
-rw-rw-r-- 1 yikai yikai 6296 Feb 2 13:35 ./mymodule_lin.ko

@Linerd
Copy link
Author

Linerd commented Feb 2, 2018

and this is when I use linux-source instead of headers:

make NSRC=/home/yikai/netmap KSRC=/usr/src/linux-source-4.4.0
make -C /usr/src/linux-source-4.4.0 M=/home/yikai/netmap-tutorial/mymodule/LINUX
CONFIG_NETMAP=m CONFIG_NETMAP_VALE=y CONFIG_MYMODULE=m
EXTRA_CFLAGS='-I/home/yikai/netmap/ -I/home/yikai/netmap/LINUX -I/home/yikai/netmap/sys -I/home/yikai/netmap-tutorial/mymodule/LINUX/../sys -DCONFIG_NETMAP' KBUILD_EXTRA_SYMBOLS=/home/yikai/netmap/Module.symvers
make[1]: Entering directory '/usr/src/linux-source-4.4.0'

WARNING: Symbol version dump ./Module.symvers
is missing; modules will have no dependencies and modversions.

Building modules, stage 2.
MODPOST 1 modules
WARNING: could not find /home/yikai/netmap-tutorial/mymodule/LINUX/.mymodule.o.cmd for /home/yikai/netmap-tutorial/mymodule/LINUX/mymodule.o
make[1]: Leaving directory '/usr/src/linux-source-4.4.0'
ls -l find . -name \*.ko
-rw-rw-r-- 1 yikai yikai 65640 Feb 2 13:37 ./mymodule_lin.ko

@vmaffione
Copy link
Collaborator

Yeah, I'm not even able to compile, actually. Can you ask the author https://github.com/micchie/mymodule ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants