I've a router that runs Linux kernel version of 2.6.33, it came without tun/tap support. The cpu is MIPSlittle endien. I setup a buildroot and successed compile "Hello world" program for the router.
I'm trying to compile tun.c from linux-kernel-2.6.33/drivers/net/tun.c as a standalone kernel object. But I have not successed yet! I use buildroot to get the header files for the kernel (by make menuconfig) and setup a Makefile for tun.c:
obj-m := tun.o
KDIR=/opt/buildroot/output/build/linux-kernel-2.6.33
PWD=$(shell pwd)
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
clean:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
I run the make file with
make ARCH=mips CROSS_COMPILE=/opt/buildroot/output/bin/buildroot-compiler-
I got warnings and erros:
Warning: Symbol version dump /opt/buildroot/output/build/linux-kernel-2.6.33/Module.symvers is missing; modules will have no dependencies and modversions.
include/linux/mmzone.h:18:30: fatel error: generated/bounds.h. No such or directory .#include
Which one of my steps are wrong?