ngbit / netmap

Automatically exported from code.google.com/p/netmap
0 stars 0 forks source link

Problems installing Netmap on ARM (Nvidia Jetson TK1) #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to install Netmap on my Nvidia Jetson TK1 Development kit. It uses 
an Nvidia Tegra k1 SoC (4 core cortex A15 arm) and are running Ubuntu 12.04. 
The problem is that I can't run make in netmap/LINUX without errors...

What steps will reproduce the problem?
1.Buy NVIDIA jetson TK1
2.Download kernel source
3.cd netmap_dir/LINUX
4../configure
make

What is the expected output? What do you see instead?
Expectation is that the build should succeed.

First error i get is this:
make -C /lib/modules/3.10.40netmap/build M=/home/ubuntu/netmap/LINUX 
EXTRA_CFLAGS='-I/home/ubuntu/netmap/LINUX -I/home/ubuntu/netmap/LINUX 
-I/home/ubuntu/netmap/LINUX/../sys -I/home/ubuntu/netmap/LINUX/../sys/dev 
-DCONFIG_NETMAP -Wno-unused-but-set-variable -DCONFIG_NETMAP_GENERIC 
-DCONFIG_NETMAP_MONITOR -DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE'  modules 
CONFIG_NETMAP=m
make[1]: Entering directory `/usr/src/kernel'
  CC [M]  /home/ubuntu/netmap/LINUX/netmap_mem2.o
/home/ubuntu/netmap/LINUX/../sys/dev/netmap/netmap_mem2.c: In function 
‘netmap_reset_obj_allocator’:
/home/ubuntu/netmap/LINUX/../sys/dev/netmap/netmap_mem2.c:750:3: error: 
implicit declaration of function ‘vfree’ 
[-Werror=implicit-function-declaration]
...

This can be fixed by simply adding #include <linux/vmalloc.h> in 
/sys/dev/netmap/netmap_mem2.c
But then i get this error instead:

make
make -C /lib/modules/3.10.40netmap/build M=/home/ubuntu/netmap/LINUX 
EXTRA_CFLAGS='-I/home/ubuntu/netmap/LINUX -I/home/ubuntu/netmap/LINUX 
-I/home/ubuntu/netmap/LINUX/../sys -I/home/ubuntu/netmap/LINUX/../sys/dev 
-DCONFIG_NETMAP -Wno-unused-but-set-variable -DCONFIG_NETMAP_GENERIC 
-DCONFIG_NETMAP_MONITOR -DCONFIG_NETMAP_PIPE -DCONFIG_NETMAP_VALE'  modules 
CONFIG_NETMAP=m
make[1]: Entering directory `/usr/src/kernel'
  CC [M]  /home/ubuntu/netmap/LINUX/netmap_mem2.o
  CC [M]  /home/ubuntu/netmap/LINUX/netmap_mbq.o
  CC [M]  /home/ubuntu/netmap/LINUX/netmap_vale.o
/home/ubuntu/netmap/LINUX/../sys/dev/netmap/netmap_vale.c: In function 
‘nm_find_bridge’:
/home/ubuntu/netmap/LINUX/../sys/dev/netmap/netmap_vale.c:350:3: error: 
implicit declaration of function ‘NM_BNS_GET’ 
[-Werror=implicit-function-declaration]
   NM_BNS_GET(b);
...

This seems to be an macro in netmap/LINUX/bsd_glue.h that isn't defined unless 
there is an "#define CONFIG_NET_NS" somewhere. I tried to put that row in 
netmap_vale.c but it seems to brake other things and probably isn't a good 
solution anyway...

What version of the product are you using? On what operating system?
Whatever verion you get when doing a git clone 17 February 2015 
Ubuntu 12.04 (Linux for Tegra release 21.2)
Linux kernel 3.10.40

Please provide any additional information below.

Original issue reported on code.google.com by hampus....@gmail.com on 20 Feb 2015 at 1:18

GoogleCodeExporter commented 9 years ago
Update! 
I did a typo but can't find a way to edit the issue... 
I'm using Ubuntu 14.04 and NOT 12.04 as i wrote previously.

Original comment by hampus....@gmail.com on 20 Feb 2015 at 1:27

GoogleCodeExporter commented 9 years ago
I'm having this problem as well trying to compile on a raspberry pi kernel 
version 3.18.11. Did you find a solution?

Original comment by vwad...@gmail.com on 26 Apr 2015 at 9:11

GoogleCodeExporter commented 9 years ago
No I didn't..

Original comment by hampus....@gmail.com on 26 Apr 2015 at 9:25

GoogleCodeExporter commented 9 years ago
Looks like adding #include <linux/vmalloc.h> to /sys/dev/netmap/netmap_mem2.c 
worked for me! Thanks I never would have figured that out. I didn't get that 
resulting error that you did, maybe its a bit different for the raspberry pi.

Original comment by vwad...@gmail.com on 26 Apr 2015 at 9:49