Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A13 => Topic started by: Jules on May 22, 2013, 11:26:02 AM

Title: Kernel module build
Post by: Jules on May 22, 2013, 11:26:02 AM
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?
Title: Re: Kernel module build
Post by: vinifr on May 25, 2013, 05:35:13 PM
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-