All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Feuerer <peter.feuerer@domain.hid>
To: Wolfgang Denk <wd@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] ppc crosscompilation, missing headers
Date: Wed, 23 May 2007 10:05:35 +0200	[thread overview]
Message-ID: <1179907535.6119.14.camel@domain.hid> (raw)
In-Reply-To: <20070522145243.94232353428@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 700 bytes --]

Hi,

History:
https://mail.gna.org/public/xenomai-help/2007-05/msg00260.html

> Please see FAQ 14.1.4. ELDK Include Files Missing
> http://www.denx.de/wiki/view/DULG/ELDKIncludeFilesMissing

After doing this workaround, I'm able to compile the userspace part of
Xenomai, but now I can't compile any little kernelmodule using the
xenomai api. I attached the Makefile and the sourcecode of my little
example.

When trying to compile it cannot find headers like asm/param.h or
asm/types.h (because they are not in krnsrc/include/asm-ppc/ and the
workaround just added the userspace/libc headers). I guess there must be
something wrong with the Makefile, but I cannot find the problem.

regards,
--peter

[-- Attachment #2: Makefile --]
[-- Type: text/x-makefile, Size: 510 bytes --]

### List of modules to be build
MODULES = krn

### Default to sources of currently running kernel
KSRC:=../../usr/src/linux

OBJS     := ${patsubst %, %.o, $(MODULES)}
CLEANMOD := ${patsubst %, .%*, $(MODULES)}
PWD      := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)

obj-m        := $(OBJS)
EXTRA_CFLAGS := -I$(KSRC)/include/xenomai -I$(KSRC)/include/xenomai/posix

all::
	$(MAKE) -C $(KSRC) SUBDIRS=$(PWD) modules

clean::
	$(RM) $(CLEANMOD) *.o *.ko *.mod.c Module*.symvers
	$(RM) -R .tmp*

[-- Attachment #3: krn.c --]
[-- Type: text/x-csrc, Size: 512 bytes --]

#include <linux/module.h>
#include <native/task.h>

MODULE_LICENSE("GPL");
RT_TASK task;

void foo_task(void *cookie) {
   int i=0;
	rt_task_set_periodic(NULL, TM_NOW, 50000000);
   while(1)
   {
      rt_task_wait_period(NULL);
      printk("foo %d\n",i++);
   }
}

int init_module(void)
{
	rt_task_create(&task, "foo_task", 0, 99, 0);
	rt_task_start(&task, &foo_task,NULL);
	
	printk("krn module loaded\n");
	return 0;
}

void cleanup_module(void)
{
	rt_task_delete(&task);
	printk("krn module unloaded\n");
}

  parent reply	other threads:[~2007-05-23  8:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 12:48 [Xenomai-help] ppc crosscompilation, missing headers Peter Feuerer
2007-05-22 13:52 ` Wolfgang Grandegger
2007-05-22 14:41   ` Peter Feuerer
2007-05-22 14:52     ` Wolfgang Denk
2007-05-22 15:04       ` Peter Feuerer
2007-05-23  8:05       ` Peter Feuerer [this message]
2007-05-23  8:27         ` Wolfgang Grandegger
2007-05-23  8:27           ` Peter Feuerer
2007-05-23  9:09             ` Wolfgang Grandegger
2007-05-23  9:28               ` Peter Feuerer
2007-05-23  9:54                 ` Wolfgang Grandegger
2007-05-22 15:03     ` Wolfgang Grandegger

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=1179907535.6119.14.camel@domain.hid \
    --to=peter.feuerer@domain.hid \
    --cc=wd@domain.hid \
    --cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.