Skip to contentSkip to conversation

Cross-compiling RTDM driver errors

Xenomai Stefan Videv 2 participants 6 messages Nov 5, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

I am trying to cross compile a driver that I wrote which is very similar to the one provided in the examples (tut02-skeleton-drv). I've basically changed the write function to do what I am interested in doing, everything else is the same (however I am not providing a read function).

During compilation I get the following error:

FATAL: modpost: GPL-incompatible module vlcTxDriver.ko uses GPL-only symbol 'rtdm_dev_unregister'

What's that supposed to mean, and how do you get around it?

I am using the Makefile provided with the examples and compiling like so:

make XENO=/media/rootfs/usr/xenomai/ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KSRC=~/beagle/linux/ DESTDIR=/media/rootfs ADD_CFLAGS=-I/usr/arm-linux-gnueabi/include

Thanks!

-- Stefan

#1 lore raw
Quoted 9 lines · Stefan Videv

Hi,

I am trying to cross compile a driver that I wrote which is very similar to the one provided in the examples (tut02-skeleton-drv). I've basically changed the write function to do what I am interested in doing, everything else is the same (however I am not providing a read function).

During compilation I get the following error:

FATAL: modpost: GPL-incompatible module vlcTxDriver.ko uses GPL-only symbol 'rtdm_dev_unregister'

What's that supposed to mean, and how do you get around it?

I answered my own question just now -- I've forgotten to define the module licence correctly. Having done that I end up with some undefined symbols, just like when trying to compile the POSIX examples.

Here's what I get:

WARNING: "pse51_shm_close" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "munmap" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "mmap" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "open" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!

Any help is appreciated! Thanks!

Quoted 9 lines

I am using the Makefile provided with the examples and compiling like so:

make XENO=/media/rootfs/usr/xenomai/ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KSRC=~/beagle/linux/ DESTDIR=/media/rootfs ADD_CFLAGS=-I/usr/arm-linux-gnueabi/include

Thanks!

-- Stefan

#2 lore raw
Quoted 12 lines · Stefan Videv
Quoted 9 lines · Stefan Videv

Hi,

I am trying to cross compile a driver that I wrote which is very similar to the one provided in the examples (tut02-skeleton-drv). I've basically changed the write function to do what I am interested in doing, everything else is the same (however I am not providing a read function).

During compilation I get the following error:

FATAL: modpost: GPL-incompatible module vlcTxDriver.ko uses GPL-only symbol 'rtdm_dev_unregister'

What's that supposed to mean, and how do you get around it?

I answered my own question just now -- I've forgotten to define the module licence correctly. Having done that I end up with some undefined symbols, just like when trying to compile the POSIX examples.

Quoted 8 lines

Here's what I get:

WARNING: "pse51_shm_close" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "munmap" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "mmap" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "open" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!

Any help is appreciated! Thanks!

I've somewhat answered my questions again:

http://www.xenomai.org/pipermail/xenomai-help/2011-12/msg00014.html

However, I still do not understand how do you go about enabling these features (i.e. what to enable when configuring my kernel). Also, I have a user space program that I then converted to the kernel module that I am now trying to compile. That runs perfectly fine on my kernel. Is that possible? Is the kernel missing support for these operations, but you can do that fine from user space?

Thanks, again!

-- Stefan

Quoted 11 lines
Quoted 10 lines

I am using the Makefile provided with the examples and compiling like so:

make XENO=/media/rootfs/usr/xenomai/ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KSRC=~/beagle/linux/ DESTDIR=/media/rootfs ADD_CFLAGS=-I/usr/arm-linux-gnueabi/include

Thanks!

-- Stefan

#3 lore raw
Quoted 20 lines · Stefan Videv
Quoted 19 lines · Stefan Videv
Quoted 9 lines · Stefan Videv

Hi,

I am trying to cross compile a driver that I wrote which is very similar to the one provided in the examples (tut02-skeleton-drv). I've basically changed the write function to do what I am interested in doing, everything else is the same (however I am not providing a read function).

During compilation I get the following error:

FATAL: modpost: GPL-incompatible module vlcTxDriver.ko uses GPL-only symbol 'rtdm_dev_unregister'

What's that supposed to mean, and how do you get around it?

I answered my own question just now -- I've forgotten to define the module licence correctly. Having done that I end up with some undefined symbols, just like when trying to compile the POSIX examples.

Here's what I get:

WARNING: "pse51_shm_close" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "munmap" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "mmap" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "open" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!

Quoted 6 lines
Quoted 1 line

Any help is appreciated! Thanks!

I've somewhat answered my questions again:

http://www.xenomai.org/pipermail/xenomai-help/2011-12/msg00014.html

However, I still do not understand how do you go about enabling these features (i.e. what to enable when configuring my kernel).

I've enabled shared memory support from the POSIX options for Xenomai. That takes care of the first 3 warnings.

However, I am still having the last one. I am trying to use this particular open() function:

http://pubs.opengroup.org/onlinepubs/000095399/functions/open.html

to be able to write to /dev/mem

-- Stefan

Quoted 17 lines

Also, I have a user space program that I then converted to the kernel module that I am now trying to compile. That runs perfectly fine on my kernel. Is that possible? Is the kernel missing support for these operations, but you can do that fine from user space?

Thanks, again!

-- Stefan

Quoted 11 lines
Quoted 10 lines

I am using the Makefile provided with the examples and compiling like so:

make XENO=/media/rootfs/usr/xenomai/ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- KSRC=~/beagle/linux/ DESTDIR=/media/rootfs ADD_CFLAGS=-I/usr/arm-linux-gnueabi/include

Thanks!

-- Stefan

#4 lore raw
Quoted 39 lines · Stefan Videv
Quoted 28 lines · Stefan Videv
Quoted 27 lines · Stefan Videv
Quoted 8 lines · Stefan Videv

Hi,

I am trying to cross compile a driver that I wrote which is very similar to the one provided in the examples (tut02-skeleton-drv). I've basically changed the write function to do what I am interested in doing, everything else is the same (however I am not providing a read function).

Quoted 6 lines

During compilation I get the following error:

FATAL: modpost: GPL-incompatible module vlcTxDriver.ko uses GPL-only symbol 'rtdm_dev_unregister'

What's that supposed to mean, and how do you get around it?

I answered my own question just now -- I've forgotten to define the module licence correctly. Having done that I end up with some undefined symbols, just like when trying to compile the POSIX examples.

Here's what I get:

WARNING: "pse51_shm_close" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "munmap" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "mmap" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "open" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!

Quoted 7 lines
Quoted 1 line

Any help is appreciated! Thanks!

I've somewhat answered my questions again:

http://www.xenomai.org/pipermail/xenomai-help/2011-12/msg00014.html

However, I still do not understand how do you go about enabling these features (i.e. what to enable when configuring my kernel).

I've enabled shared memory support from the POSIX options for Xenomai. That takes care of the first 3 warnings.

Quoted 6 lines

However, I am still having the last one. I am trying to use this particular open() function:

http://pubs.opengroup.org/onlinepubs/000095399/functions/open.html

to be able to write to /dev/mem

You do not write to /dev/mem in a kernel module. You use ioremap.

Signature · 1 line
                                                                Gilles.
#5 lore raw
Quoted 41 lines · Gilles Chanteperdrix
Quoted 39 lines · Stefan Videv
Quoted 28 lines · Stefan Videv
Quoted 27 lines · Stefan Videv
Quoted 8 lines · Stefan Videv

Hi,

I am trying to cross compile a driver that I wrote which is very similar to the one provided in the examples (tut02-skeleton-drv). I've basically changed the write function to do what I am interested in doing, everything else is the same (however I am not providing a read function).

Quoted 6 lines

During compilation I get the following error:

FATAL: modpost: GPL-incompatible module vlcTxDriver.ko uses GPL-only symbol 'rtdm_dev_unregister'

What's that supposed to mean, and how do you get around it?

I answered my own question just now -- I've forgotten to define the module licence correctly. Having done that I end up with some undefined symbols, just like when trying to compile the POSIX examples.

Here's what I get:

WARNING: "pse51_shm_close" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "munmap" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "mmap" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!
WARNING: "open" [/home/stefan/VLCTxDriver/vlcTxDriver.ko] undefined!

Quoted 7 lines
Quoted 1 line

Any help is appreciated! Thanks!

I've somewhat answered my questions again:

http://www.xenomai.org/pipermail/xenomai-help/2011-12/msg00014.html

However, I still do not understand how do you go about enabling these features (i.e. what to enable when configuring my kernel).

I've enabled shared memory support from the POSIX options for Xenomai. That takes care of the first 3 warnings.

Quoted 9 lines
Quoted 6 lines

However, I am still having the last one. I am trying to use this particular open() function:

http://pubs.opengroup.org/onlinepubs/000095399/functions/open.html

to be able to write to /dev/mem

You do not write to /dev/mem in a kernel module. You use ioremap.

Great point :) Everything works now (well apart from the fact that I am not sure I am writing to the correct registers when using ioremap and iowrite, but that's outside the scope of this mailing list :) ).

Thanks!

-- Stefan