Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: "Henk Geraads" <linux@hf-electronics.com>
To: <openembedded-devel@lists.openembedded.org>
Subject: Problems building a kernelmodule for OE
Date: Mon, 27 Oct 2008 09:13:04 +0100	[thread overview]
Message-ID: <NGBBLNEOGLJIIJKLFLPFOEAEDKAA.linux@hf-electronics.com> (raw)

Hi,

I am not sure if i posted it in the correct mailing list!
But I am trying to make a kernel module for the OE distro angstrom 2007-12 for machine CM-X270.

when I try to make the module, following error message is produced!

	In file included from include/linux/jiffies.h:4,
     	      	     from include/linux/sched.h:54,
      	           from include/asm/uaccess.h:14,
                 	     from /home/henk/cm270/fifodrv/cfi-ktst/cfi-mod.c:10:
	include/linux/calc64.h: In function 'do_div_llr':
	include/linux/calc64.h:25: error: '__LINUX_ARM_ARCH__' undeclared (first use in this function)
	include/linux/calc64.h:25: error: (Each undeclared identifier is reported only once
	include/linux/calc64.h:25: error: for each function it appears in.)
	/home/henk/cm270/fifodrv../cfi-ktst/cfi-mod.c: In function 'cfi_ioctl':
	/home/henk/cm270/fifodrv/cfi-ktst/cfi-mod.c:67: warning: implicit declaration of function 'GPLR'
	/home/henk/cm270/fifodrv/cfi-ktst/cfi-mod.c:67: warning: implicit declaration of function 'GPIO_bit'
	/home/henk/cm270/fifodrv/cfi-ktst/cfi-mod.c: In function 'cfi_init':
	/home/henk/cm270/fifodrv/cfi-ktst/cfi-mod.c:204: error: 'GPIO_IN' undeclared (first use in this function)
	/home/henk/cm270/fifodrv/cfi-ktst/cfi-mod.c:208: error: 'MSC1' undeclared (first use in this function)
	/home/henk/cm270/fifodrv/cfi-ktst/cfi-mod.c:209: error: 'GPIO79_nCS_3_MD' undeclared (first use in this function)
	make[2]: *** [/home/henk/cm270/fifodrv/cfi-ktst/cfi-mod.o] Error 1
	make[1]: *** [_module_/home/henk/cm270/fifodrv/cfi-ktst] Error 2
	make: *** [default] Error 2

My source for the module cfi-kernel is located in the
path: /home/henk/cm270/fifodrv

I create with "bitbake linux -c defshell -f" an enviroment with the
"correct" path's and env.var's.

Makefile:
	# Makefile for external CFI kernel module
	CFLAGS = -march=armv5t -Wall -D_GNU_SOURCE 

	ifneq ($(KERNELRELEASE),)
	# we are inside the kernel tree and called from kernel build system

	obj-m   := cfi-mod.o
	else
	# we are a separate module and start the kernel make and give it our directory
	KERNELDIR = /home/henk/oe/build/tmp/angstrom/work/cm-x270-angstrom-linux-gnueabi/linux-2.6.23-r8/linux-2.6.23

	#KERNELDIR = ../linux-26
	PWD       := $(shell pwd)

	default:
		$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
	endif

	clean::
		$(RM) -rf *.o .depend .*.cmd *.ko *.mod.c .tmp_versions *~

	.PHONY: clean

	depend .depend dep:
		$(CC) $(CFLAGS) -M *.c > .depend

	ifeq (.depend,$(wildcard .depend))
	include .depend
	endif


start op the module sourcecode:

	#include <linux/module.h>
	#include <linux/kernel.h>
	#include <linux/ioport.h>
	#include <linux/fs.h>
	#include <asm/uaccess.h>
	#include <asm/io.h>

	MODULE_AUTHOR("Henk");  
	......


What is my mistake??

Thanks in advance for any reaction!

Henk





             reply	other threads:[~2008-10-27  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27  8:13 Henk Geraads [this message]
2008-10-27 15:56 ` Problems building a kernelmodule for OE Stanislav Brabec
2008-10-28  9:15   ` Henk Geraads
2008-10-28 11:51     ` Henk Geraads
2008-10-28 23:10       ` Stanislav Brabec
2008-10-29 13:46         ` Henk Geraads

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=NGBBLNEOGLJIIJKLFLPFOEAEDKAA.linux@hf-electronics.com \
    --to=linux@hf-electronics.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox