Bipod setup
09 Oct 2010 17:09 #4590
by Schnitti
Replied by Schnitti on topic Re:Bipod setup x and y wrong
BigJohnT wrote:
Hi John,
exactly that is the point. comp can create kinematics modules and components.
I took a look at kbuild system documentation. There is a part in there, which in my opinion belongs to this discussion.
We have this situation
rtai modules in /usr/realtime-2.6.32-122-rtai/modules
emc modules in /usr/realtime-2.6.32-122-rtai/modules/emc2
Modules.symvers only in rtai path
Should do the job.
+++++
copy from
www.mjmwired.net/kernel/Documentation/kbuild/modules.txt
+++++
7.2 Symbols and external modules
When building an external module, the build system needs access to
the symbols from the kernel to check if all external symbols are
defined. This is done in the MODPOST step and to obtain all
symbols, modpost reads Module.symvers from the kernel.
If a Module.symvers file is present in the directory where
the external module is being built, this file will be read too.
During the MODPOST step, a new Module.symvers file will be written
containing all exported symbols that were not defined in the kernel.
--- 7.3 Symbols from another external module
Sometimes, an external module uses exported symbols from another
external module. Kbuild needs to have full knowledge on all symbols
to avoid spitting out warnings about undefined symbols.
Three solutions exist to let kbuild know all symbols of more than
one external module.
The method with a top-level kbuild file is recommended but may be
impractical in certain situations.
Use a top-level Kbuild file
If you have two modules: 'foo' and 'bar', and 'foo' needs
symbols from 'bar', then one can use a common top-level kbuild
file so both modules are compiled in same build.
Consider following directory layout:
./foo/ <= contains the foo module
./bar/ <= contains the bar module
The top-level Kbuild file would then look like:
#./Kbuild: (this file may also be named Makefile)
obj-y := foo/ bar/
Executing:
make -C $KDIR M=`pwd`
will then do the expected and compile both modules with full
knowledge on symbols from both modules.
Use an extra Module.symvers file
When an external module is built, a Module.symvers file is
generated containing all exported symbols which are not
defined in the kernel.
To get access to symbols from module 'bar', one can copy the
Module.symvers file from the compilation of the 'bar' module
to the directory where the 'foo' module is built.
During the module build, kbuild will read the Module.symvers
file in the directory of the external module and when the
build is finished, a new Module.symvers file is created
containing the sum of all symbols defined and not part of the
kernel.
Use make variable KBUILD_EXTRA_SYMBOLS in the Makefile
If it is impractical to copy Module.symvers from another
module, you can assign a space separated list of files to
KBUILD_EXTRA_SYMBOLS in your Makfile. These files will be
loaded by modpost during the initialisation of its symbol
tables.
I had no idea that comp created kinematics modules as well as components.
John
Hi John,
exactly that is the point. comp can create kinematics modules and components.
I took a look at kbuild system documentation. There is a part in there, which in my opinion belongs to this discussion.
We have this situation
rtai modules in /usr/realtime-2.6.32-122-rtai/modules
emc modules in /usr/realtime-2.6.32-122-rtai/modules/emc2
Modules.symvers only in rtai path
Should do the job.
+++++
copy from
www.mjmwired.net/kernel/Documentation/kbuild/modules.txt
+++++
7.2 Symbols and external modules
When building an external module, the build system needs access to
the symbols from the kernel to check if all external symbols are
defined. This is done in the MODPOST step and to obtain all
symbols, modpost reads Module.symvers from the kernel.
If a Module.symvers file is present in the directory where
the external module is being built, this file will be read too.
During the MODPOST step, a new Module.symvers file will be written
containing all exported symbols that were not defined in the kernel.
--- 7.3 Symbols from another external module
Sometimes, an external module uses exported symbols from another
external module. Kbuild needs to have full knowledge on all symbols
to avoid spitting out warnings about undefined symbols.
Three solutions exist to let kbuild know all symbols of more than
one external module.
The method with a top-level kbuild file is recommended but may be
impractical in certain situations.
Use a top-level Kbuild file
If you have two modules: 'foo' and 'bar', and 'foo' needs
symbols from 'bar', then one can use a common top-level kbuild
file so both modules are compiled in same build.
Consider following directory layout:
./foo/ <= contains the foo module
./bar/ <= contains the bar module
The top-level Kbuild file would then look like:
#./Kbuild: (this file may also be named Makefile)
obj-y := foo/ bar/
Executing:
make -C $KDIR M=`pwd`
will then do the expected and compile both modules with full
knowledge on symbols from both modules.
Use an extra Module.symvers file
When an external module is built, a Module.symvers file is
generated containing all exported symbols which are not
defined in the kernel.
To get access to symbols from module 'bar', one can copy the
Module.symvers file from the compilation of the 'bar' module
to the directory where the 'foo' module is built.
During the module build, kbuild will read the Module.symvers
file in the directory of the external module and when the
build is finished, a new Module.symvers file is created
containing the sum of all symbols defined and not part of the
kernel.
Use make variable KBUILD_EXTRA_SYMBOLS in the Makefile
If it is impractical to copy Module.symvers from another
module, you can assign a space separated list of files to
KBUILD_EXTRA_SYMBOLS in your Makfile. These files will be
loaded by modpost during the initialisation of its symbol
tables.
Please Log in or Create an account to join the conversation.
09 Oct 2010 17:18 #4591
by Schnitti
Replied by Schnitti on topic dualbipod.ko file available from emc2hotwinch
Hi there,
I put my dualbipod.ko module file in Gerd's googlecode page:
code.google.com/p/emc2hotwinch/source/br...#svn/trunk/kinematic
dualbipod-2.6.32-rtai.ko
Please rename to dualbipod.ko before you copy and use it.
Otherwise I had to overwrite the old Module.
Wolfgang
I put my dualbipod.ko module file in Gerd's googlecode page:
code.google.com/p/emc2hotwinch/source/br...#svn/trunk/kinematic
dualbipod-2.6.32-rtai.ko
Please rename to dualbipod.ko before you copy and use it.
Otherwise I had to overwrite the old Module.
Wolfgang
Please Log in or Create an account to join the conversation.
11 Oct 2010 20:01 #4624
by andypugh
Replied by andypugh on topic Re:Bipod setup x and y wrong
BigJohnT wrote:
Yes, it can compile and install a .c file as happily as a .comp file. The advantage is that it creates the .ko file and puts it in the right place, without any requirement to do a full compile of EMC2 (I think you might not even need the source tree)I had no idea that comp created kinematics modules as well as components.
Please Log in or Create an account to join the conversation.
17 Oct 2010 16:39 #4724
by Schnitti
Replied by Schnitti on topic compilation under emc 2.4.5
Hi there,
usage of fresh compiled dualbipod.ko under 2.4.5 fails, vermagic of module and running kernel does not match error.
To get this off:
Edit kernel Makefile under /usr/src/linux-headers-2.6.32-122-rtai/Makefile
remove EXTRAVERSION from debian maintainer
Add EXTRAVERSION = -122-rtai
Run make as root with no arguments in /usr/src/linux-headers-2.6.32-122-rtai
run sudo comp --install dualbipod.c
Works!
Submitted in Bugtracker too.
usage of fresh compiled dualbipod.ko under 2.4.5 fails, vermagic of module and running kernel does not match error.
To get this off:
Edit kernel Makefile under /usr/src/linux-headers-2.6.32-122-rtai/Makefile
remove EXTRAVERSION from debian maintainer
Add EXTRAVERSION = -122-rtai
Run make as root with no arguments in /usr/src/linux-headers-2.6.32-122-rtai
run sudo comp --install dualbipod.c
Works!
Submitted in Bugtracker too.
Please Log in or Create an account to join the conversation.
17 Oct 2010 17:36 #4725
by Schnitti
Replied by Schnitti on topic Re:compilation under emc 2.4.5
Hi,
just tested it on my production/real machine. Seems, that is dedicated to a weak installation.
Will observe it.
just tested it on my production/real machine. Seems, that is dedicated to a weak installation.
Will observe it.
Please Log in or Create an account to join the conversation.
19 Oct 2010 16:41 #4747
by Schnitti
Replied by Schnitti on topic Re:compilation under emc 2.4.5
Hi,
I can confirm, that compilation on a fresh installed system will work with the mentioned warnings.
And as a personal experience, it is in fact faster to save your settings and set up a new system and copy settings back.
Wolfgang
I can confirm, that compilation on a fresh installed system will work with the mentioned warnings.
And as a personal experience, it is in fact faster to save your settings and set up a new system and copy settings back.
Wolfgang
Please Log in or Create an account to join the conversation.
Time to create page: 0.292 seconds