Kernel module build

Started by Jules, May 22, 2013, 11:26:02 AM

Previous topic - Next topic

Jules

I'm trying to build a nonstandard kernel module to run on the debian image I downloaded from the links on the wiki page, but in order to do so I need a 'Modules.symvers' file from whoever built the kernel in that image.  Is this around somewhere?

vinifr

#1
Sorry, I did not understand what you want to do. Do you want create a driver/module and load it in kernel?

If it is that, I use this Makefile for driver/module outside of tree:
INCDIR = -I YourPath/linux-sunxi/include

ifneq ($(KERNELRELEASE),)
obj-m := module.o
else
KDIR := YourPath/linux-sunxi
PWD := $(shell pwd)

all:
$(MAKE) -g -C $(KDIR) $(INCDIR) M=$(PWD) modules
clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
endif


To compile
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- or
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-