[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] Compile loadable kernel modules



Hi,
I'm trying to compile a loadable module for a char device. Here is my Makefile:
TARGET := char_dev_ex

WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes


INCLUDE := -isystem /home/oscar/uClinux_src/uClinux_tmp/uClinux/uClinux-dist/linux-2.4.x/include


CFLAGS := -O2 -DMODULE -D__KERNEL__ ${WARN} ${INCLUDE}

CC := mb-gcc

${TARGET}.o: ${TARGET}.c


.PHONY: clean


clean:

rm -rf ${TARGET}.o

With this Makefile I have successful build some simple modules that only include linux/kernel.h and linux/module.h. But when I need to include linux/fs.h and asm/uaccess.h the compilation process shows a lot of warnings and don't finish correctly.

What should I add to the Makefile??

Thanks...

Oscar.