Bipod setup
08 Jul 2014 18:03 #48529
by robotic89
Replied by robotic89 on topic Re:Bipod setup x and y wrong
BigJohnT wrote:
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 documenta
tion. 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.
08 Jul 2014 18:03 - 08 Jul 2014 18:04 #48530
by robotic89
Replied by robotic89 on topic Re:Bipod setup x and y wrong
BigJohnT wrote:
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 documenta
tion. 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.
Last edit: 08 Jul 2014 18:04 by robotic89.
Please Log in or Create an account to join the conversation.
Time to create page: 0.116 seconds