cant compile rtdm module
Hi,
I can successfully compile and run code with Xenomai api in user space but if i try to compile rtdm code there is many error
I try to use own code and your example from /kernel/drivers/gpio - outputs below
please guide me how to compile and run simple rtdm module
yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 make: *** No targets. Stop. yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5 M=$PWD modules make: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions ; rm -f /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio (cat /dev/null; ) > /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/modules.order make -f ./scripts/Makefile.modpost find /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -a -i ./Module.symvers -I /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -o /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -S -w -s -T - make: Leaving directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$
Are you trying to build a custom RTDM module or a built in one? The built in ones can be enabled in the menuconfig stage of the kernel build. What board are you using? UDOO-x86?
-Greg
Quoted 30 lines · Шевченко Тарас Григорьевич
Hi,
I can successfully compile and run code with Xenomai api in user space but if i try to compile rtdm code there is many error
I try to use own code and your example from /kernel/drivers/gpio - outputs belowplease guide me how to compile and run simple rtdm module
yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 make: *** No targets. Stop. yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5 M=$PWD modules make: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions ; rm -f /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio (cat /dev/null; ) > /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/modules.order make -f ./scripts/Makefile.modpost find /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -a -i ./Module.symvers -I /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -o /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -S -w -s -T - make: Leaving directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ _______________________________________________ Xenomai mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai
Yes I use UDOO-x86 with pentium n3720
I try to build custom.
And i try to build some from kernel - just to be shure thats all correct.(Maybe it s not right way) but I get the same errors Unfortunately, there is not many examples for x86_64
----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Wednesday, March 7, 2018 7:11:24 PM
Subject: Re: [Xenomai] cant compile rtdm module
Are you trying to build a custom RTDM module or a built in one? The built in ones can be enabled in the menuconfig stage of the kernel build. What board are you using? UDOO-x86?
-Greg
Quoted 30 lines · Шевченко Тарас Григорьевич
Hi,
I can successfully compile and run code with Xenomai api in user space but if i try to compile rtdm code there is many error
I try to use own code and your example from /kernel/drivers/gpio - outputs belowplease guide me how to compile and run simple rtdm module
yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 make: *** No targets. Stop. yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5 M=$PWD modules make: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions ; rm -f /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio (cat /dev/null; ) > /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/modules.order make -f ./scripts/Makefile.modpost find /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -a -i ./Module.symvers -I /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -o /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -S -w -s -T - make: Leaving directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ _______________________________________________ Xenomai mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai
Here is a sample makefile for an out of kernel module that you can use to create a custom rtdm module.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#this should be the path to your patched kernel source that has the ipipe patches and Xenomai links applied
#if you are using the O option when building the kernel (build takes place out of tree) use that directoryXENO_KDIR := <path to patched kernel source>
#This is only needed if you are cross compiling, if you are not cross compiling then leave these blank CROSS_COMPILE=arm-linux-gnueabihf-
ARCH=arm
PWD := $(shell pwd)
#name of your module that you are compiling
obj-m+=rtdm_hello.o
all:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
clean:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For your purposes you don't need the CROSS_COMPILE and ARCH options you can omit those so your make lines should look like this,
make M=$(PWD) -C $(XENO_BUILD) modules
I'll be creating a simple sample driver, maybe similar to how it's done in LDD3 and post it. This is all depending on when I get time to do so , no time line lol
-Greg
Quoted 50 lines · Шевченко Тарас Григорьевич
Yes I use UDOO-x86 with pentium n3720
I try to build custom.
And i try to build some from kernel - just to be shure thats all correct.(Maybe it s not right way) but I get the same errors Unfortunately, there is not many examples forx86_64----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Wednesday, March 7, 2018 7:11:24 PM
Subject: Re: [Xenomai] cant compile rtdm moduleAre you trying to build a custom RTDM module or a built in one? The built in ones can be enabled in the menuconfig stage of the kernel build. What board are you using? UDOO-x86?
-Greg
Quoted 30 lines · Шевченко Тарас Григорьевич
Hi,
I can successfully compile and run code with Xenomai api in user space but if i try to compile rtdm code there is many error
I try to use own code and your example from /kernel/drivers/gpio - outputs belowplease guide me how to compile and run simple rtdm module
yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 make: *** No targets. Stop. yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5 M=$PWD modules make: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions ; rm -f /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio (cat /dev/null; ) > /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/modules.order make -f ./scripts/Makefile.modpost find /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -a -i ./Module.symvers -I /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -o /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -S -w -s -T - make: Leaving directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ _______________________________________________ Xenomai mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai
I create such makefile based on your letter
-------------------------------------------
obj-m := rtdm_hello.o
all:
make -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5/ M=$(PWD) modules clean: $(RM) $(CLEANMOD) *.o *.ko *.mod.c Module*.symvers Module.markers modules.order $(RM) -R .tmp*
------------------------------------------
now I can compile and run simple Linux kernel Module
but if i add #include <rtdm/rtdm.h> to my *.c file
its crashed and looks like some path are missed
yeti@yeti-UDOO-x86:~/xenoInstall/rtdm_hello$ make
make -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5/ M=/home/yeti/xenoInstall/rtdm_hello modules
make[1]: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5'
CC [M] /home/yeti/xenoInstall/rtdm_hello/rtdm_hello.o
In file included from include/xenomai/rtdm/fd.h:27:0,
from include/xenomai/rtdm/rtdm.h:28,
from /home/yeti/xenoInstall/rtdm_hello/rtdm_hello.c:3:
./include/asm-generic/xenomai/syscall.h:24:34: fatal error: asm/xenomai/features.h: No such file or directory
compilation terminated.please help
----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Thursday, March 8, 2018 6:35:32 PM
Subject: Re: [Xenomai] cant compile rtdm module
Here is a sample makefile for an out of kernel module that you can use to create a custom rtdm module.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#this should be the path to your patched kernel source that has the ipipe patches and Xenomai links applied
#if you are using the O option when building the kernel (build takes place out of tree) use that directoryXENO_KDIR := <path to patched kernel source>
#This is only needed if you are cross compiling, if you are not cross compiling then leave these blank CROSS_COMPILE=arm-linux-gnueabihf-
ARCH=arm
PWD := $(shell pwd)
#name of your module that you are compiling
obj-m+=rtdm_hello.o
all:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
clean:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For your purposes you don't need the CROSS_COMPILE and ARCH options you can omit those so your make lines should look like this,
make M=$(PWD) -C $(XENO_BUILD) modules
I'll be creating a simple sample driver, maybe similar to how it's done in LDD3 and post it. This is all depending on when I get time to do so , no time line lol
-Greg
Quoted 50 lines · Шевченко Тарас Григорьевич
Yes I use UDOO-x86 with pentium n3720
I try to build custom.
And i try to build some from kernel - just to be shure thats all correct.(Maybe it s not right way) but I get the same errors Unfortunately, there is not many examples forx86_64----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Wednesday, March 7, 2018 7:11:24 PM
Subject: Re: [Xenomai] cant compile rtdm moduleAre you trying to build a custom RTDM module or a built in one? The built in ones can be enabled in the menuconfig stage of the kernel build. What board are you using? UDOO-x86?
-Greg
Quoted 30 lines · Шевченко Тарас Григорьевич
Hi,
I can successfully compile and run code with Xenomai api in user space but if i try to compile rtdm code there is many error
I try to use own code and your example from /kernel/drivers/gpio - outputs belowplease guide me how to compile and run simple rtdm module
yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 make: *** No targets. Stop. yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5 M=$PWD modules make: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions ; rm -f /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio (cat /dev/null; ) > /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/modules.order make -f ./scripts/Makefile.modpost find /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -a -i ./Module.symvers -I /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -o /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -S -w -s -T - make: Leaving directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ _______________________________________________ Xenomai mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai
Are the Xenomai headers loacted in your kernel source? Where did you build the patched kernel from?
Original Message
From: [email protected]
Sent: March 9, 2018 6:28 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [Xenomai] cant compile rtdm module
I create such makefile based on your letter
-------------------------------------------
obj-m := rtdm_hello.o
all:
make -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5/ M=$(PWD) modules clean:
$(RM) $(CLEANMOD) *.o *.ko *.mod.c Module*.symvers Module.markers modules.order $(RM) -R .tmp*
------------------------------------------
now I can compile and run simple Linux kernel Module
but if i add #include <rtdm/rtdm.h> to my *.c file
its crashed and looks like some path are missed
yeti@yeti-UDOO-x86:~/xenoInstall/rtdm_hello$ make make -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5/ M=/home/yeti/xenoInstall/rtdm_hello modules make[1]: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' CC [M] /home/yeti/xenoInstall/rtdm_hello/rtdm_hello.o In file included from include/xenomai/rtdm/fd.h:27:0, from include/xenomai/rtdm/rtdm.h:28, from /home/yeti/xenoInstall/rtdm_hello/rtdm_hello.c:3: ./include/asm-generic/xenomai/syscall.h:24:34: fatal error: asm/xenomai/features.h: No such file or directory compilation terminated.
please help
----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Thursday, March 8, 2018 6:35:32 PM
Subject: Re: [Xenomai] cant compile rtdm module
Here is a sample makefile for an out of kernel module that you can use to create a custom rtdm module.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#this should be the path to your patched kernel source that has the ipipe patches and Xenomai links applied
#if you are using the O option when building the kernel (build takes place out of tree) use that directoryXENO_KDIR := <path to patched kernel source>
#This is only needed if you are cross compiling, if you are not cross compiling then leave these blank CROSS_COMPILE=arm-linux-gnueabihf-
ARCH=arm
PWD := $(shell pwd)
#name of your module that you are compiling
obj-m+=rtdm_hello.o
all:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
clean:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For your purposes you don't need the CROSS_COMPILE and ARCH options you can omit those so your make lines should look like this, make M=$(PWD) -C $(XENO_BUILD) modules
I'll be creating a simple sample driver, maybe similar to how it's done in LDD3 and post it. This is all depending on when I get time to do so , no time line lol
-Greg
Quoted 50 lines · Шевченко Тарас Григорьевич
Yes I use UDOO-x86 with pentium n3720
I try to build custom.
And i try to build some from kernel - just to be shure thats all correct.(Maybe it s not right way) but I get the same errors Unfortunately, there is not many examples forx86_64----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Wednesday, March 7, 2018 7:11:24 PM
Subject: Re: [Xenomai] cant compile rtdm moduleAre you trying to build a custom RTDM module or a built in one? The built in ones can be enabled in the menuconfig stage of the kernel build. What board are you using? UDOO-x86?
-Greg
Quoted 30 lines · Шевченко Тарас Григорьевич
Hi,
I can successfully compile and run code with Xenomai api in user space but if i try to compile rtdm code there is many error
I try to use own code and your example from /kernel/drivers/gpio - outputs belowplease guide me how to compile and run simple rtdm module
yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 make: *** No targets. Stop. yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5 M=$PWD modules make: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions ; rm -f /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio (cat /dev/null; ) > /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/modules.order make -f ./scripts/Makefile.modpost find /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -a -i ./Module.symvers -I /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -o /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -S -w -s -T - make: Leaving directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ _______________________________________________ Xenomai mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai
Im confused
I extract tar xf xenomai-3.0.5.tar.bz2 in my home folder /home/henoInstall/xenomai-3.0.5
but /usr/src/linux-headers-4.9.38-xenomai-3.0.5 I guess it is kernel source folders isn't it ? it consist/usr/src/linux-headers-4.9.38-xenomai-3.0.5/include/xenomai/rtdm
and after apply patch and build kernel folder /usr/xenomai is appeared but therein't features.h file
----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Friday, March 9, 2018 2:08:14 PM
Subject: Re: [Xenomai] cant compile rtdm module
Are the Xenomai headers loacted in your kernel source? Where did you build the patched kernel from?
Original Message
From: [email protected]
Sent: March 9, 2018 6:28 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [Xenomai] cant compile rtdm module
I create such makefile based on your letter
-------------------------------------------
obj-m := rtdm_hello.o all:/usr/src/linux-headers-4.9.38-xenomai-3.0.5
make -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5/ M=$(PWD) modules clean:
$(RM) $(CLEANMOD) *.o *.ko *.mod.c Module*.symvers Module.markers modules.order $(RM) -R .tmp*
------------------------------------------
now I can compile and run simple Linux kernel Module
but if i add #include <rtdm/rtdm.h> to my *.c file
its crashed and looks like some path are missed
yeti@yeti-UDOO-x86:~/xenoInstall/rtdm_hello$ make make -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5/ M=/home/yeti/xenoInstall/rtdm_hello modules make[1]: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' CC [M] /home/yeti/xenoInstall/rtdm_hello/rtdm_hello.o In file included from include/xenomai/rtdm/fd.h:27:0, from include/xenomai/rtdm/rtdm.h:28, from /home/yeti/xenoInstall/rtdm_hello/rtdm_hello.c:3: ./include/asm-generic/xenomai/syscall.h:24:34: fatal error: asm/xenomai/features.h: No such file or directory compilation terminated.
please help
----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Thursday, March 8, 2018 6:35:32 PM
Subject: Re: [Xenomai] cant compile rtdm module
Here is a sample makefile for an out of kernel module that you can use to create a custom rtdm module.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#this should be the path to your patched kernel source that has the ipipe patches and Xenomai links applied
#if you are using the O option when building the kernel (build takes place out of tree) use that directoryXENO_KDIR := <path to patched kernel source>
#This is only needed if you are cross compiling, if you are not cross compiling then leave these blank CROSS_COMPILE=arm-linux-gnueabihf-
ARCH=arm
PWD := $(shell pwd)
#name of your module that you are compiling
obj-m+=rtdm_hello.o
all:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
clean:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For your purposes you don't need the CROSS_COMPILE and ARCH options you can omit those so your make lines should look like this, make M=$(PWD) -C $(XENO_BUILD) modules
I'll be creating a simple sample driver, maybe similar to how it's done in LDD3 and post it. This is all depending on when I get time to do so , no time line lol
-Greg
Quoted 50 lines · Шевченко Тарас Григорьевич
Yes I use UDOO-x86 with pentium n3720
I try to build custom.
And i try to build some from kernel - just to be shure thats all correct.(Maybe it s not right way) but I get the same errors Unfortunately, there is not many examples forx86_64----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Wednesday, March 7, 2018 7:11:24 PM
Subject: Re: [Xenomai] cant compile rtdm moduleAre you trying to build a custom RTDM module or a built in one? The built in ones can be enabled in the menuconfig stage of the kernel build. What board are you using? UDOO-x86?
-Greg
Quoted 30 lines · Шевченко Тарас Григорьевич
Hi,
I can successfully compile and run code with Xenomai api in user space but if i try to compile rtdm code there is many error
I try to use own code and your example from /kernel/drivers/gpio - outputs belowplease guide me how to compile and run simple rtdm module
yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 make: *** No targets. Stop. yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5 M=$PWD modules make: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions ; rm -f /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio (cat /dev/null; ) > /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/modules.order make -f ./scripts/Makefile.modpost find /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -a -i ./Module.symvers -I /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -o /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -S -w -s -T - make: Leaving directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ _______________________________________________ Xenomai mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai
Is there a list of files and folders must I have ? or way to check installation ?
like xeno -config or something else
yeti@yeti-UDOO-x86:/usr/xenomai/bin$ ./xeno-config
xeno-config --verbose
--core=cobalt
--version="3.0.5"
--cc="gcc"
--ccld="/usr/xenomai/bin/wrap-link.sh gcc"
--arch="x86"
--prefix="/usr/xenomai"
--library-dir="/usr/xenomai/lib"
Usage xeno-config OPTIONS
Options :
--help
--v,--verbose
--version
--cc
--ccld
--arch
--prefix
--[skin=]posix|vxworks|psos|alchemy|rtdm|smokey|cobalt
--auto-init|auto-init-solib|no-auto-init
--mode-check|no-mode-check
--cflags
--ldflags
--lib*-dir|libdir|user-libdir
--core
--info
--compat----- Original Message -----
From: "Шевченко Тарас Григорьевич" <[email protected]>
To: "Greg Gallagher" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Friday, March 9, 2018 2:40:24 PM
Subject: Re: [Xenomai] cant compile rtdm module
Im confused
I extract tar xf xenomai-3.0.5.tar.bz2 in my home folder /home/henoInstall/xenomai-3.0.5
but /usr/src/linux-headers-4.9.38-xenomai-3.0.5 I guess it is kernel source folders isn't it ? it consist/usr/src/linux-headers-4.9.38-xenomai-3.0.5/include/xenomai/rtdm
and after apply patch and build kernel folder /usr/xenomai is appeared but therein't features.h file
----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Friday, March 9, 2018 2:08:14 PM
Subject: Re: [Xenomai] cant compile rtdm module
Are the Xenomai headers loacted in your kernel source? Where did you build the patched kernel from?
Original Message
From: [email protected]
Sent: March 9, 2018 6:28 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [Xenomai] cant compile rtdm module
I create such makefile based on your letter
-------------------------------------------
obj-m := rtdm_hello.o all:/usr/src/linux-headers-4.9.38-xenomai-3.0.5
make -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5/ M=$(PWD) modules clean:
$(RM) $(CLEANMOD) *.o *.ko *.mod.c Module*.symvers Module.markers modules.order $(RM) -R .tmp*
------------------------------------------
now I can compile and run simple Linux kernel Module
but if i add #include <rtdm/rtdm.h> to my *.c file
its crashed and looks like some path are missed
yeti@yeti-UDOO-x86:~/xenoInstall/rtdm_hello$ make make -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5/ M=/home/yeti/xenoInstall/rtdm_hello modules make[1]: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' CC [M] /home/yeti/xenoInstall/rtdm_hello/rtdm_hello.o In file included from include/xenomai/rtdm/fd.h:27:0, from include/xenomai/rtdm/rtdm.h:28, from /home/yeti/xenoInstall/rtdm_hello/rtdm_hello.c:3: ./include/asm-generic/xenomai/syscall.h:24:34: fatal error: asm/xenomai/features.h: No such file or directory compilation terminated.
please help
----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Thursday, March 8, 2018 6:35:32 PM
Subject: Re: [Xenomai] cant compile rtdm module
Here is a sample makefile for an out of kernel module that you can use to create a custom rtdm module.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#this should be the path to your patched kernel source that has the ipipe patches and Xenomai links applied
#if you are using the O option when building the kernel (build takes place out of tree) use that directoryXENO_KDIR := <path to patched kernel source>
#This is only needed if you are cross compiling, if you are not cross compiling then leave these blank CROSS_COMPILE=arm-linux-gnueabihf-
ARCH=arm
PWD := $(shell pwd)
#name of your module that you are compiling
obj-m+=rtdm_hello.o
all:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
clean:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
For your purposes you don't need the CROSS_COMPILE and ARCH options you can omit those so your make lines should look like this, make M=$(PWD) -C $(XENO_BUILD) modules
I'll be creating a simple sample driver, maybe similar to how it's done in LDD3 and post it. This is all depending on when I get time to do so , no time line lol
-Greg
Quoted 12 lines · Шевченко Тарас Григорьевич
Yes I use UDOO-x86 with pentium n3720
I try to build custom.
And i try to build some from kernel - just to be shure thats all correct.(Maybe it s not right way) but I get the same errors Unfortunately, there is not many examples forx86_64----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Wednesday, March 7, 2018 7:11:24 PM
Subject: Re: [Xenomai] cant compile rtdm module
Quoted 38 lines
Are you trying to build a custom RTDM module or a built in one? The built in ones can be enabled in the menuconfig stage of the kernel build. What board are you using? UDOO-x86?
-Greg
Quoted 30 lines · Шевченко Тарас Григорьевич
Hi,
I can successfully compile and run code with Xenomai api in user space but if i try to compile rtdm code there is many error
I try to use own code and your example from /kernel/drivers/gpio - outputs belowplease guide me how to compile and run simple rtdm module
yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 make: *** No targets. Stop. yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5 M=$PWD modules make: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions ; rm -f /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio (cat /dev/null; ) > /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/modules.order make -f ./scripts/Makefile.modpost find /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -a -i ./Module.symvers -I /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -o /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -S -w -s -T - make: Leaving directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ _______________________________________________ Xenomai mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai
_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai
Is it possible to try this from the git repos instead of the tar packages? If you clone git://git.xenomai.org/xenomai-3.git and then checkout the stable-3.0.x branch and try trying compiling the kernel again. Once you've done that you should be to point your module makefile to the build directory and all should be good. I testing this out on a generic x86 box so hopefully it works for your setup. If not we can continue to debug.
Quoted 204 lines · Шевченко Тарас Григорьевич
Is there a list of files and folders must I have ? or way to check installation ?
like xeno -config or something elseyeti@yeti-UDOO-x86:/usr/xenomai/bin$ ./xeno-config xeno-config --verbose --core=cobalt --version="3.0.5" --cc="gcc" --ccld="/usr/xenomai/bin/wrap-link.sh gcc" --arch="x86" --prefix="/usr/xenomai" --library-dir="/usr/xenomai/lib" Usage xeno-config OPTIONS Options : --help --v,--verbose --version --cc --ccld --arch --prefix --[skin=]posix|vxworks|psos|alchemy|rtdm|smokey|cobalt --auto-init|auto-init-solib|no-auto-init --mode-check|no-mode-check --cflags --ldflags --lib*-dir|libdir|user-libdir --core --info --compat----- Original Message -----
From: "Шевченко Тарас Григорьевич" <[email protected]>
To: "Greg Gallagher" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Friday, March 9, 2018 2:40:24 PM
Subject: Re: [Xenomai] cant compile rtdm moduleIm confused
I extract tar xf xenomai-3.0.5.tar.bz2 in my home folder/home/henoInstall/xenomai-3.0.5but
/usr/src/linux-headers-4.9.38-xenomai-3.0.5I guess it is kernel source folders isn't it ? it consist/usr/src/linux-headers-4.9.38-xenomai-3.0.5/include/xenomai/rtdmand after apply patch and build kernel folder
/usr/xenomaiis appeared but therein'tfeatures.hfile----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Friday, March 9, 2018 2:08:14 PM
Subject: Re: [Xenomai] cant compile rtdm moduleAre the Xenomai headers loacted in your kernel source? Where did you build the patched kernel from?
Original Message
From: [email protected]
Sent: March 9, 2018 6:28 AM
To: [email protected]
Cc: [email protected]
Subject: Re: [Xenomai] cant compile rtdm moduleI create such makefile based on your letter
-------------------------------------------
obj-m := rtdm_hello.o all:/usr/src/linux-headers-4.9.38-xenomai-3.0.5
make -C/usr/src/linux-headers-4.9.38-xenomai-3.0.5/M=$(PWD) modules clean:
$(RM) $(CLEANMOD) *.o *.ko *.mod.c Module*.symvers Module.markers modules.order $(RM) -R .tmp*
------------------------------------------
now I can compile and run simple Linux kernel Module
but if i add #include <rtdm/rtdm.h> to my *.c file
its crashed and looks like some path are missedyeti@yeti-UDOO-x86:~/xenoInstall/rtdm_hello$ make make -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5/ M=/home/yeti/xenoInstall/rtdm_hello modules make[1]: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' CC [M] /home/yeti/xenoInstall/rtdm_hello/rtdm_hello.o In file included from include/xenomai/rtdm/fd.h:27:0, from include/xenomai/rtdm/rtdm.h:28, from /home/yeti/xenoInstall/rtdm_hello/rtdm_hello.c:3: ./include/asm-generic/xenomai/syscall.h:24:34: fatal error: asm/xenomai/features.h: No such file or directory compilation terminated.please help
----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Thursday, March 8, 2018 6:35:32 PM
Subject: Re: [Xenomai] cant compile rtdm moduleHere is a sample makefile for an out of kernel module that you can use to create a custom rtdm module.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#this should be the path to your patched kernel source that has the ipipe patches and Xenomai links applied
#if you are using the O option when building the kernel (build takes place out of tree) use that directoryXENO_KDIR:= <path to patched kernel source>#This is only needed if you are cross compiling, if you are not cross compiling then leave these blank CROSS_COMPILE=arm-linux-gnueabihf-
ARCH=armPWD := $(shell pwd)
#name of your module that you are compiling
obj-m+=rtdm_hello.oall:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
clean:
make ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) M=$(PWD) -C $(XENO_BUILD) modules
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------For your purposes you don't need the
CROSS_COMPILEand ARCH options you can omit those so your make lines should look like this,make M=$(PWD) -C $(XENO_BUILD) modulesI'll be creating a simple sample driver, maybe similar to how it's done in LDD3 and post it. This is all depending on when I get time to do so , no time line lol
-Greg
Quoted 12 lines · Шевченко Тарас Григорьевич
Yes I use UDOO-x86 with pentium n3720
I try to build custom.
And i try to build some from kernel - just to be shure thats all correct.(Maybe it s not right way) but I get the same errors Unfortunately, there is not many examples forx86_64----- Original Message -----
From: "Greg Gallagher" <[email protected]>
To: "Шевченко Тарас Григорьевич" <[email protected]>
Cc: "xenomai" <[email protected]>
Sent: Wednesday, March 7, 2018 7:11:24 PM
Subject: Re: [Xenomai] cant compile rtdm moduleQuoted 38 lines
Are you trying to build a custom RTDM module or a built in one? The built in ones can be enabled in the menuconfig stage of the kernel build. What board are you using? UDOO-x86?
-Greg
Quoted 30 lines · Шевченко Тарас Григорьевич
Hi,
I can successfully compile and run code with Xenomai api in user space but if i try to compile rtdm code there is many error
I try to use own code and your example from /kernel/drivers/gpio - outputs belowplease guide me how to compile and run simple rtdm module
yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 make: *** No targets. Stop. yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ make V=1 -C /usr/src/linux-headers-4.9.38-xenomai-3.0.5 M=$PWD modules make: Entering directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false) mkdir -p /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions ; rm -f /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions/* make -f ./scripts/Makefile.build obj=/home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio (cat /dev/null; ) > /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/modules.order make -f ./scripts/Makefile.modpost find /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/.tmp_versions -name '*.mod' | xargs -r grep -h '\.ko$' | sort -u | sed 's/\.ko$/.o/' | scripts/mod/modpost -a -i ./Module.symvers -I /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -o /home/yeti/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio/Module.symvers -S -w -s -T - make: Leaving directory '/usr/src/linux-headers-4.9.38-xenomai-3.0.5' yeti@yeti-UDOO-x86:~/xenoInstall/xenomai-3.0.5/kernel/drivers/gpio$ _______________________________________________ Xenomai mailing list [email protected] https://xenomai.org/mailman/listinfo/xenomai_______________________________________________
Xenomai mailing list
[email protected]
https://xenomai.org/mailman/listinfo/xenomai