Raspberry Pi + Xenomai doesn't compile
Hello
I'm trying to put Xenomai 2.6.4 on top of a Raspberry Pi model B with kernel version 3.8.13. In theory, it should be straightforward, but I don't get it to compile, and I don't know if I'm missing something vital or something is broken.
This is what I executed:
$ git clone [email protected]:raspberrypi/linux.git $ mv linux rpi-xenomai $ git checkout rpi-3.8.y $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch $ ../xenomai-2.6.4/scripts/prepare-kernel.sh --arch=arm --linux=./ \ --adeos=../xenomai-2.6.4/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-4.patch $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
I get this output:
kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_read’:kernel/ipipe/core.c:1748:2: error: implicit declaration of function ‘get_fs’ [-Werror=implicit-function-declaration]
mm_segment_t old_fs = get_fs();
^kernel/ipipe/core.c:1750:2: error: implicit declaration of function ‘set_fs’ [-Werror=implicit-function-declaration]
set_fs(KERNEL_DS);
^kernel/ipipe/core.c:1750:9: error: ‘KERNEL_DS’ undeclared (first use in this function)
set_fs(KERNEL_DS);
^kernel/ipipe/core.c:1750:9: note: each undeclared identifier is reported only once for each function it appears in kernel/ipipe/core.c:1753:2: error: implicit declaration of function ‘__copy_from_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_from_user_inatomic(dst,
^kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_write’:kernel/ipipe/core.c:1767:9: error: ‘KERNEL_DS’ undeclared (first use in this function)
set_fs(KERNEL_DS);
^kernel/ipipe/core.c:1770:2: error: implicit declaration of function ‘__copy_to_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_to_user_inatomic((__force void __user *)dst, src, size); ^
cc1: some warnings being treated as errors scripts/Makefile.build:307: recipe for target 'kernel/ipipe/core.o' failed
make[2]: *** [kernel/ipipe/core.o] Error 1 scripts/Makefile.build:454: recipe for target 'kernel/ipipe' failed make[1]: *** [kernel/ipipe] Error 2
Makefile:791: recipe for target 'kernel' failed
make: *** [kernel] Error 2
I tried by including asm/uaccess.h, which solved the issue. But the kernel doesn't boot, and there is no message. It just hangs.
I tried the same kernel without Xenomai patch, and it compiles and boots without problem.
Thanks in advance
Marc
Quoted 61 lines · Marc Marí
Hello
I'm trying to put Xenomai 2.6.4 on top of a Raspberry Pi model B with kernel version 3.8.13. In theory, it should be straightforward, but I don't get it to compile, and I don't know if I'm missing something vital or something is broken.
This is what I executed:
$ git clone [email protected]:raspberrypi/linux.git $ mv linux rpi-xenomai $ git checkout rpi-3.8.y $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch $ ../xenomai-2.6.4/scripts/prepare-kernel.sh --arch=arm --linux=./ \ --adeos=../xenomai-2.6.4/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-4.patch $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-I get this output:
kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_read’:kernel/ipipe/core.c:1748:2: error: implicit declaration of function ‘get_fs’ [-Werror=implicit-function-declaration]
mm_segment_told_fs=get_fs();
^kernel/ipipe/core.c:1750:2: error: implicit declaration of function ‘set_fs’ [-Werror=implicit-function-declaration]
set_fs(KERNEL_DS);
^kernel/ipipe/core.c:1750:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1750:9: note: each undeclared identifier is reported only once for each function it appears inkernel/ipipe/core.c:1753:2: error: implicit declaration of function ‘__copy_from_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_from_user_inatomic(dst,
^kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_write’:kernel/ipipe/core.c:1767:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1770:2: error: implicit declaration of function ‘__copy_to_user_inatomic’ [-Werror=implicit-function-declaration]
ret =__copy_to_user_inatomic((__force void __user *)dst, src, size); ^
cc1: some warnings being treated as errorsscripts/Makefile.build:307: recipe for target 'kernel/ipipe/core.o' failed
make[2]: *** [kernel/ipipe/core.o] Error 1scripts/Makefile.build:454: recipe for target 'kernel/ipipe' failed make[1]: *** [kernel/ipipe] Error 2
Makefile:791: recipe for target 'kernel' failed
make: *** [kernel] Error 2
Quoted 5 lines
I tried by including
asm/uaccess.h, which solved the issue. But the kernel doesn't boot, and there is no message. It just hangs.I tried the same kernel without Xenomai patch, and it compiles and boots without problem.
Did you enable IPIPE in the config? After all bcmrpi_defconfig probably does NOT include IPIPE config, and most releases of ipipe don't compile if you disable IPIPE support. I have only ever seen recent versions actually be able to compile with CONFIG_IPIPE=n.
Signature · 1 line
Len Sorensen
Quoted 65 lines · El Thu, 21 May 2015 16:48:56 -0400 "Lennart Sorensen"…
Quoted 64 lines · Marc Marí
Hello
I'm trying to put Xenomai 2.6.4 on top of a Raspberry Pi model B with kernel version 3.8.13. In theory, it should be straightforward, but I don't get it to compile, and I don't know if I'm missing something vital or something is broken.
This is what I executed:
$ git clone [email protected]:raspberrypi/linux.git $ mv linux rpi-xenomai $ git checkout rpi-3.8.y $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch $ ../xenomai-2.6.4/scripts/prepare-kernel.sh --arch=arm --linux=./ \ --adeos=../xenomai-2.6.4/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-4.patch $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-I get this output:
kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_read’:kernel/ipipe/core.c:1748:2: error: implicit declaration of function ‘get_fs’ [-Werror=implicit-function-declaration]
mm_segment_told_fs=get_fs();
^kernel/ipipe/core.c:1750:2: error: implicit declaration of function ‘set_fs’ [-Werror=implicit-function-declaration]
set_fs(KERNEL_DS);
^kernel/ipipe/core.c:1750:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1750:9: note: each undeclared identifier is reported only once for each function it appears inkernel/ipipe/core.c:1753:2: error: implicit declaration of function ‘__copy_from_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_from_user_inatomic(dst,
^kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_write’:kernel/ipipe/core.c:1767:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1770:2: error: implicit declaration of function ‘__copy_to_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_to_user_inatomic((__force void__user*)dst, src,
size); ^
cc1: some warnings being treated as errorsscripts/Makefile.build:307: recipe for target 'kernel/ipipe/core.o' failed
make[2]: *** [kernel/ipipe/core.o] Error 1scripts/Makefile.build:454: recipe for target 'kernel/ipipe' failed make[1]: *** [kernel/ipipe] Error 2
Makefile:791: recipe for target 'kernel' failed
make: *** [kernel] Error 2I tried by including
asm/uaccess.h, which solved the issue. But the kernel doesn't boot, and there is no message. It just hangs.
Quoted 8 lines
Quoted 2 lines
I tried the same kernel without Xenomai patch, and it compiles and boots without problem.
Did you enable IPIPE in the config? After all
bcmrpi_defconfigprobably does NOT include IPIPE config, and most releases of ipipe don't compile if you disable IPIPE support. I have only ever seen recent versions actually be able to compile withCONFIG_IPIPE=n.
Enabled by default:
$ grep -r IPIPE .config CONFIG_IPIPE_WANT_ACTIVE_MM=y CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH=y CONFIG_IPIPE_ARM_KUSER_TSC=y CONFIG_IPIPE=y CONFIG_IPIPE_LEGACY=y CONFIG_IPIPE_CORE=y CONFIG_IPIPE_CORE_APIREV=2 CONFIG_IPIPE_WANT_APIREV_2=y CONFIG_IPIPE_TARGET_APIREV=2 CONFIG_IPIPE_HAVE_HOSTRT=y CONFIG_IPIPE_DELAYED_ATOMICSW=y # CONFIG_IPIPE_DEBUG is not set
$ grep -r XENOMAI .config CONFIG_XENOMAI=y
Quoted 16 lines · Marc Marí
Enabled by default:
$ grep -r IPIPE .config CONFIG_IPIPE_WANT_ACTIVE_MM=y CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH=y CONFIG_IPIPE_ARM_KUSER_TSC=y CONFIG_IPIPE=y CONFIG_IPIPE_LEGACY=y CONFIG_IPIPE_CORE=y CONFIG_IPIPE_CORE_APIREV=2 CONFIG_IPIPE_WANT_APIREV_2=y CONFIG_IPIPE_TARGET_APIREV=2 CONFIG_IPIPE_HAVE_HOSTRT=y CONFIG_IPIPE_DELAYED_ATOMICSW=y # CONFIG_IPIPE_DEBUG is not set
Quoted 2 lines
$ grep -r XENOMAI .config CONFIG_XENOMAI=y
Well that was the most obvious problem I have encountered with things not compiling. No idea then.
I stopped touching 3.8 a long time about because it was way too unstable on the cpu we are using (caused random segfaults frequently). Didn't seem to be a problem with 3.8 in general, just for this particular chip.
Signature · 1 line
Len Sorensen
Quoted 45 lines · Marc Marí
Hello
I'm trying to put Xenomai 2.6.4 on top of a Raspberry Pi model B with kernel version 3.8.13. In theory, it should be straightforward, but I don't get it to compile, and I don't know if I'm missing something vital or something is broken.
This is what I executed:
$ git clone [email protected]:raspberrypi/linux.git $ mv linux rpi-xenomai $ git checkout rpi-3.8.y $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch $ ../xenomai-2.6.4/scripts/prepare-kernel.sh --arch=arm --linux=./ \ --adeos=../xenomai-2.6.4/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-4.patch $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-I get this output:
kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_read’:kernel/ipipe/core.c:1748:2: error: implicit declaration of function ‘get_fs’ [-Werror=implicit-function-declaration]
mm_segment_told_fs=get_fs();
^kernel/ipipe/core.c:1750:2: error: implicit declaration of function ‘set_fs’ [-Werror=implicit-function-declaration]
set_fs(KERNEL_DS);
^kernel/ipipe/core.c:1750:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1750:9: note: each undeclared identifier is reported only once for each function it appears inkernel/ipipe/core.c:1753:2: error: implicit declaration of function ‘__copy_from_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_from_user_inatomic(dst,
^kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_write’:kernel/ipipe/core.c:1767:9: error: ‘KERNEL_DS’ undeclared (first use in this function)
Quoted 5 lines
set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1770:2: error: implicit declaration of function ‘__copy_to_user_inatomic’ [-Werror=implicit-function-declaration]
ret =__copy_to_user_inatomic((__force void __user *)dst, src, size);
This part of the code is compiled conditionally if CONFIG_KGDB is enabled. Have you tried turning KGDB off? Chances are, nobody ever tried running Xenomai with KGDB on ARM, so, I doubt it has any chance to work anyway.
Signature · 1 line
Gilles.
Quoted 65 lines · Lennart Sorensen
Quoted 64 lines · Marc Marí
Hello
I'm trying to put Xenomai 2.6.4 on top of a Raspberry Pi model B with kernel version 3.8.13. In theory, it should be straightforward, but I don't get it to compile, and I don't know if I'm missing something vital or something is broken.
This is what I executed:
$ git clone [email protected]:raspberrypi/linux.git $ mv linux rpi-xenomai $ git checkout rpi-3.8.y $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch $ ../xenomai-2.6.4/scripts/prepare-kernel.sh --arch=arm --linux=./ \ --adeos=../xenomai-2.6.4/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-4.patch $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-I get this output:
kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_read’:kernel/ipipe/core.c:1748:2: error: implicit declaration of function ‘get_fs’ [-Werror=implicit-function-declaration]
mm_segment_told_fs=get_fs();
^kernel/ipipe/core.c:1750:2: error: implicit declaration of function ‘set_fs’ [-Werror=implicit-function-declaration]
set_fs(KERNEL_DS);
^kernel/ipipe/core.c:1750:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1750:9: note: each undeclared identifier is reported only once for each function it appears inkernel/ipipe/core.c:1753:2: error: implicit declaration of function ‘__copy_from_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_from_user_inatomic(dst,
^kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_write’:kernel/ipipe/core.c:1767:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1770:2: error: implicit declaration of function ‘__copy_to_user_inatomic’ [-Werror=implicit-function-declaration]
ret =__copy_to_user_inatomic((__force void __user *)dst, src, size); ^
cc1: some warnings being treated as errorsscripts/Makefile.build:307: recipe for target 'kernel/ipipe/core.o' failed
make[2]: *** [kernel/ipipe/core.o] Error 1scripts/Makefile.build:454: recipe for target 'kernel/ipipe' failed make[1]: *** [kernel/ipipe] Error 2
Makefile:791: recipe for target 'kernel' failed
make: *** [kernel] Error 2I tried by including
asm/uaccess.h, which solved the issue. But the kernel doesn't boot, and there is no message. It just hangs.
Quoted 7 lines
Quoted 2 lines
I tried the same kernel without Xenomai patch, and it compiles and boots without problem.
Did you enable IPIPE in the config? After all
bcmrpi_defconfigprobably does NOT include IPIPE config, and most releases of ipipe don't compile if you disable IPIPE support. I have only ever seen recent versions actually be able to compile withCONFIG_IPIPE=n.
That statement is simply not true. Most I-pipe patched kernel compile with IPIPE off, but you happened to find one that did not. Please stop spreading this misconception.
Signature · 1 line
Gilles.
Quoted 53 lines · El Thu, 21 May 2015 23:24:32 +0200 Gilles Chanteperdrix…
Quoted 45 lines · Marc Marí
Hello
I'm trying to put Xenomai 2.6.4 on top of a Raspberry Pi model B with kernel version 3.8.13. In theory, it should be straightforward, but I don't get it to compile, and I don't know if I'm missing something vital or something is broken.
This is what I executed:
$ git clone [email protected]:raspberrypi/linux.git $ mv linux rpi-xenomai $ git checkout rpi-3.8.y $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch $ ../xenomai-2.6.4/scripts/prepare-kernel.sh --arch=arm --linux=./ \ --adeos=../xenomai-2.6.4/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-4.patch $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-I get this output:
kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_read’:kernel/ipipe/core.c:1748:2: error: implicit declaration of function ‘get_fs’ [-Werror=implicit-function-declaration]
mm_segment_told_fs=get_fs();
^kernel/ipipe/core.c:1750:2: error: implicit declaration of function ‘set_fs’ [-Werror=implicit-function-declaration]
set_fs(KERNEL_DS);
^kernel/ipipe/core.c:1750:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1750:9: note: each undeclared identifier is reported only once for each function it appears inkernel/ipipe/core.c:1753:2: error: implicit declaration of function ‘__copy_from_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_from_user_inatomic(dst,
^kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_write’:kernel/ipipe/core.c:1767:9: error: ‘KERNEL_DS’ undeclared (first use in this function)Quoted 6 lines
set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1770:2: error: implicit declaration of function ‘__copy_to_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_to_user_inatomic((__force void__user*)dst, src,
size);
Quoted 5 lines
This part of the code is compiled conditionally if
CONFIG_KGDBis enabled. Have you tried turning KGDB off? Chances are, nobody ever tried running Xenomai with KGDB on ARM, so, I doubt it has any chance to work anyway.
It stopped compiling asking to disable CC_STACKPROTECTOR. It now compiles, but it doesn't boot, and also doesn't give much information. Let's see if I can figure out this one.
Thanks!
Marc
Hi Marc,
I had the same problem a few months ago. I've first built a minimal system with Buildroot and then applied the Adeos and Xenomai 2.6.3 patches to the 3.8.13 kernel.
Please refer to this sequence of steps:
http://userk.co.uk/real-time-system-with-raspberry-pi/
If you find something wrong, please let me know and I will update the page. Hope it helps
GB
[image: www.whazzo.com] <http://www.whazzo.com>
2015-05-22 0:37 GMT+02:00 Marc Marí <[email protected]>:
Quoted 76 lines
Quoted 8 lines · El Thu, 21 May 2015 23:24:32 +0200 Gilles Chanteperdrix…
Quoted 7 lines · Marc Marí
Hello
I'm trying to put Xenomai 2.6.4 on top of a Raspberry Pi model B with kernel version 3.8.13. In theory, it should be straightforward, but I don't get it to compile, and I don't know if I'm missing something vital or something is broken.
Quoted 7 lines
Quoted 7 lines
This is what I executed:
$ git clone [email protected]:raspberrypi/linux.git $ mv linux rpi-xenomai $ git checkout rpi-3.8.y $ patch -p1 -i \
../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patchQuoted 2 lines
Quoted 2 lines
$ ../xenomai-2.6.4/scripts/prepare-kernel.sh --arch=arm --linux=./ \--adeos=../xenomai-2.6.4/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-4.patch
Quoted 2 lines
Quoted 2 lines
$ patch -p1 -i \
../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patchQuoted 34 lines
Quoted 27 lines
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-I get this output:
kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_read’:kernel/ipipe/core.c:1748:2: error: implicit declaration of function ‘get_fs’ [-Werror=implicit-function-declaration]
mm_segment_told_fs=get_fs();
^kernel/ipipe/core.c:1750:2: error: implicit declaration of function ‘set_fs’ [-Werror=implicit-function-declaration]
set_fs(KERNEL_DS);
^kernel/ipipe/core.c:1750:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1750:9: note: each undeclared identifier is reported only once for each function it appears inkernel/ipipe/core.c:1753:2: error: implicit declaration of function ‘__copy_from_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_from_user_inatomic(dst,
^kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_write’:kernel/ipipe/core.c:1767:9: error: ‘KERNEL_DS’ undeclared (first use in this function)Quoted 6 lines
set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1770:2: error: implicit declaration of function ‘__copy_to_user_inatomic’ [-Werror=implicit-function-declaration]
ret = __copy_to_user_inatomic((__force void__user*)dst, src,
size);Quoted 5 lines
This part of the code is compiled conditionally if
CONFIG_KGDBis enabled. Have you tried turning KGDB off? Chances are, nobody ever tried running Xenomai with KGDB on ARM, so, I doubt it has any chance to work anyway.It stopped compiling asking to disable
CC_STACKPROTECTOR. It now compiles, but it doesn't boot, and also doesn't give much information. Let's see if I can figure out this one.Thanks!
Marc_______________________________________________
Xenomai mailing list
[email protected]
http://xenomai.org/mailman/listinfo/xenomai
Quoted 5 lines · Giovanni Balestrieri
Hi Marc,
I had the same problem a few months ago. I've first built a minimal system with Buildroot and then applied the Adeos and Xenomai 2.6.3 patches to the 3.8.13 kernel.
Bad advice. Please use the latest stable version 2.6.4 and not 2.6.3. The two versions are ABI compatible and 2.6.4 contains fixes for 2.6.3 bugs.
Signature · 1 line
Gilles.
Quoted 71 lines · El Thu, 21 May 2015 23:27:32 +0200 Gilles Chanteperdrix…
Quoted 70 lines · Lennart Sorensen
Quoted 68 lines · Marc Marí
Hello
I'm trying to put Xenomai 2.6.4 on top of a Raspberry Pi model B with kernel version 3.8.13. In theory, it should be straightforward, but I don't get it to compile, and I don't know if I'm missing something vital or something is broken.
This is what I executed:
$ git clone [email protected]:raspberrypi/linux.git $ mv linux rpi-xenomai $ git checkout rpi-3.8.y $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-pre-2.patch $ ../xenomai-2.6.4/scripts/prepare-kernel.sh --arch=arm --linux=./ \ --adeos=../xenomai-2.6.4/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-4.patch $ patch -p1 -i \ ../xenomai-2.6.4/ksrc/arch/arm/patches/raspberry/ipipe-core-3.8.13-raspberry-post-2.patch $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcmrpi_defconfig $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-I get this output:
kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_read’:kernel/ipipe/core.c:1748:2: error: implicit declaration of function ‘get_fs’ [-Werror=implicit-function-declaration]
mm_segment_told_fs=get_fs();
^kernel/ipipe/core.c:1750:2: error: implicit declaration of function ‘set_fs’ [-Werror=implicit-function-declaration]
set_fs(KERNEL_DS);
^kernel/ipipe/core.c:1750:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1750:9: note: each undeclared identifier is reported only once for each function it appears inkernel/ipipe/core.c:1753:2: error: implicit declaration of function
‘__copy_from_user_inatomic’ [-Werror=implicit-function-declaration] ret = __copy_from_user_inatomic(dst, ^kernel/ipipe/core.c: In function ‘ipipe_probe_kernel_write’:kernel/ipipe/core.c:1767:9: error: ‘KERNEL_DS’ undeclared (first use in this function)set_fs(KERNEL_DS); ^
kernel/ipipe/core.c:1770:2: error: implicit declaration of function
‘__copy_to_user_inatomic’ [-Werror=implicit-function-declaration] ret =__copy_to_user_inatomic((__force void __user *)dst, src, size); ^ cc1: some warnings being treated as errorsscripts/Makefile.build:307: recipe for target 'kernel/ipipe/core.o' failed
make[2]: *** [kernel/ipipe/core.o] Error 1scripts/Makefile.build:454: recipe for target 'kernel/ipipe' failed make[1]: *** [kernel/ipipe] Error 2 Makefile:791: recipe for target 'kernel' failed
make: *** [kernel] Error 2I tried by including
asm/uaccess.h, which solved the issue. But the kernel doesn't boot, and there is no message. It just hangs.I tried the same kernel without Xenomai patch, and it compiles and boots without problem.
Quoted 9 lines
Quoted 4 lines
Did you enable IPIPE in the config? After all
bcmrpi_defconfigprobably does NOT include IPIPE config, and most releases of ipipe don't compile if you disable IPIPE support. I have only ever seen recent versions actually be able to compile withCONFIG_IPIPE=n.That statement is simply not true. Most I-pipe patched kernel compile with IPIPE off, but you happened to find one that did not. Please stop spreading this misconception.
Thanks. I had to disable a few config options, including the DWC OTG driver in order to boot. It now works.
Thanks
Marc