All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helder Daniel <hdaniel@ualg.pt>
To: Ruika You <crazylinuxcnc@gmail.com>
Cc: "Xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] Error: could not insert module kernel-task.ko: Unknown symbol in module
Date: Sat, 18 Apr 2015 10:35:36 +0100	[thread overview]
Message-ID: <CAKk99t2rt5Sk6O_zeW0OFcxYWC++CZ1UjWka2uZA-36LnmwnbA@mail.gmail.com> (raw)
In-Reply-To: <CABqyFP9Trq2CVWVQPqvJrwNza1-mTm5NS1T16-Pno5xEY-eOKg@mail.gmail.com>

Hi,

Are you using Xenomai version 3.x or 2.6.x?

In version 3.x the native API is no longer exported to kernel, only the
RTDM API.

//NOT EXPORTED in 3.x: #include <native/task.h>

Helder



On 18 April 2015 at 03:52, Ruika You <crazylinuxcnc@gmail.com> wrote:

> Dear all,
>
> I just start to explore xenomai with compile a kernel module as simple as
> "hello world". After compile successful, sudo insmod kernel-task.ko,
> failed, error message as follow:
> Error: could not insert module kernel-task.ko: Unknown symbol in module
>
> Dmesg result as belllow:
> [52170.262642] kernel_task: Unknown symbol rt_task_create (err 0)
> [52170.262688] kernel_task: Unknown symbol rt_task_start (err 0)
> [52170.262722] kernel_task: Unknown symbol rt_task_delete (err 0)
>
> Source code:
> #include <native/task.h>
> #define TASK_PRIO 99 /* Highest RT priority */
> #define TASK_MODE T_FPU|T_CPU(0) /* Uses FPU, bound to CPU #0 */
> #define TASK_STKSZ 4096 /* Stack size (in bytes) */
> RT_TASK task_desc;
> void task_body (void *cookie)
> {
> for (;;) {
> /* ... "cookie" should be NULL ... */
> }
> }
> int init_module (void)
> {
> int err;
> /* ... */
> err =
> rt_task_create(&task_desc,"MyTaskName",TASK_STKSZ,TASK_PRIO,TASK_MODE);
> if (!err)
> rt_task_start(&task_desc,&task_body,NULL);
> return 1;
> /* ... */
> }
> void cleanup_module (void)
> {
> rt_task_delete(&task_desc);
> }
>
> As I analyzed the reason might be :
>
> 1. kernel build configure problem ?
> 2. xenomai userland  configure problem?
> 3. any xenomai module not loaded? native?
> 4. have to export all these unknow symbol to kernel?
>
> Please advise!
> Thank you very much!
> -chengxi
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
>



-- 
Helder Daniel
UALG - FCT
DEEI

http://w3.ualg.pt/~hdaniel

  reply	other threads:[~2015-04-18  9:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-18  2:52 [Xenomai] Error: could not insert module kernel-task.ko: Unknown symbol in module Ruika You
2015-04-18  9:35 ` Helder Daniel [this message]
2015-04-18 10:32 crazylinuxcnc
2015-04-20  8:28 ` Helder Daniel
2015-04-20 11:23   ` Ruika You
2015-04-20 12:20     ` Helder Daniel

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=CAKk99t2rt5Sk6O_zeW0OFcxYWC++CZ1UjWka2uZA-36LnmwnbA@mail.gmail.com \
    --to=hdaniel@ualg.pt \
    --cc=crazylinuxcnc@gmail.com \
    --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.