[FE training-materials-updates] real-time: bump components
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Thu May 30 18:03:57 CEST 2013
Repository : git://git.free-electrons.com/training-materials.git
On branch : master
Link : http://git.free-electrons.com/training-materials/commit/?id=40dac8d16d2e894b375c29c35ee8e02958ffa44b
>---------------------------------------------------------------
commit 40dac8d16d2e894b375c29c35ee8e02958ffa44b
Author: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
Date: Thu May 30 18:03:09 2013 +0200
real-time: bump components
Bump Buildroot to 2013.02, Xenomai to 2.6.2.1 and the kernel to 3.5.7.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
>---------------------------------------------------------------
40dac8d16d2e894b375c29c35ee8e02958ffa44b
.../buildroot-2012.08-bump-xenomai-to-2.6.1.patch | 271 --------------------
...buildroot-2013.02-bump-xenomai-to-2.6.2.1.patch | 221 ++++++++++++++++
.../data/linux-3.5.7-igepv2-fix-pinmux.patch | 65 +++++
labs/sysdev-real-time/sysdev-real-time.tex | 31 ++-
4 files changed, 303 insertions(+), 285 deletions(-)
diff --git a/lab-data/realtime/rttest/data/buildroot-2012.08-bump-xenomai-to-2.6.1.patch b/lab-data/realtime/rttest/data/buildroot-2012.08-bump-xenomai-to-2.6.1.patch
deleted file mode 100644
index 81c6d9e..0000000
--- a/lab-data/realtime/rttest/data/buildroot-2012.08-bump-xenomai-to-2.6.1.patch
+++ /dev/null
@@ -1,271 +0,0 @@
-From 742c60d52f39b2e34a442e75d8fff25c1bb35bfa Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
-Date: Mon, 8 Oct 2012 11:41:44 +0200
-Subject: [PATCH] xenomai: bump to 2.6.1
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
----
- package/xenomai/xenomai-fix-lfs-issue.patch | 72 ------------
- package/xenomai/xenomai-thumb-fix.patch | 157 +++++++++++++++++++++++++++
- package/xenomai/xenomai.mk | 2 +-
- 3 files changed, 158 insertions(+), 73 deletions(-)
- delete mode 100644 package/xenomai/xenomai-fix-lfs-issue.patch
- create mode 100644 package/xenomai/xenomai-thumb-fix.patch
-
-diff --git a/package/xenomai/xenomai-fix-lfs-issue.patch b/package/xenomai/xenomai-fix-lfs-issue.patch
-deleted file mode 100644
-index 157c8e2..0000000
---- a/package/xenomai/xenomai-fix-lfs-issue.patch
-+++ /dev/null
-@@ -1,72 +0,0 @@
--From: Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org>
--Date: Sat, 5 Nov 2011 20:59:01 +0000 (+0100)
--Subject: posix: fix compilation for LFS
--X-Git-Url: http://git.xenomai.org/?p=xenomai-2.6.git;a=commitdiff_plain;h=06ae5c5e47fbfd9d8dbbe6fcf1a1db0c14bad9de;hp=8f6feff876029244dabc1257cdf13209fbd64fb5
--
--posix: fix compilation for LFS
-----
--
--diff --git a/include/posix/sys/mman.h b/include/posix/sys/mman.h
--index 455e565..a304755 100644
----- a/include/posix/sys/mman.h
--+++ b/include/posix/sys/mman.h
--@@ -63,17 +63,16 @@ int __real_shm_open(const char *name, int oflag, mode_t mode);
--
-- int __real_shm_unlink(const char *name);
--
---#if !defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
-- void *__real_mmap(void *addr,
-- size_t len,
-- int prot,
-- int flags,
-- int fildes,
-- long off);
---#else
---#define __real_mmap __real_mmap64
---#endif
---#ifdef _LARGEFILE64_SOURCE
--+
--+#if __WORDSIZE == 32
--+#if defined(_LARGEFILE64_SOURCE) \
--+ || defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-- void *__real_mmap64(void *addr,
-- size_t len,
-- int prot,
--@@ -82,6 +81,11 @@ void *__real_mmap64(void *addr,
-- long long off);
-- #endif
--
--+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
--+#define __real_mmap __real_mmap64
--+#endif
--+#endif
--+
-- int __real_munmap(void *addr, size_t len);
--
-- #ifdef __cplusplus
--diff --git a/include/posix/unistd.h b/include/posix/unistd.h
--index 49463a0..90cce86 100644
----- a/include/posix/unistd.h
--+++ b/include/posix/unistd.h
--@@ -54,13 +54,17 @@ int ftruncate(int fildes, off_t length);
-- extern "C" {
-- #endif
--
---#if !defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
-- int __real_ftruncate(int fildes, long length);
---#else
--+
--+#if __WORDSIZE == 32
--+#if defined(_LARGEFILE64_SOURCE) \
--+ || defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
--+int __real_ftruncate64(int fildes, long long length);
--+#endif
--+
--+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64
-- #define __real_ftruncate __real_ftruncate64
-- #endif
---#ifdef _LARGEFILE64_SOURCE
---int __real_ftruncate64(int fildes, long long length);
-- #endif
--
-- ssize_t __real_read(int fd, void *buf, size_t nbyte);
-diff --git a/package/xenomai/xenomai-thumb-fix.patch b/package/xenomai/xenomai-thumb-fix.patch
-new file mode 100644
-index 0000000..7c98c2e
---- /dev/null
-+++ b/package/xenomai/xenomai-thumb-fix.patch
-@@ -0,0 +1,157 @@
-+From ad3714e925f5c6b4ae0e0d31c4bab7f8c5e659db Mon Sep 17 00:00:00 2001
-+From: Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org>
-+Date: Fri, 10 Aug 2012 21:55:41 +0200
-+Subject: [PATCH] hal/arm: fix compilation for thumb
-+
-+---
-+ include/asm-arm/atomic.h | 3 ++
-+ ksrc/arch/arm/switch.S | 84 +++++++++++++++++++++++++++------------------
-+ 2 files changed, 53 insertions(+), 34 deletions(-)
-+
-+diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h
-+index 5d55ae8..ae96847 100644
-+--- a/include/asm-arm/atomic.h
-++++ b/include/asm-arm/atomic.h
-+@@ -183,6 +183,9 @@ xnarch_atomic_cmpxchg(xnarch_atomic_t *ptr,
-+ "ldrex %1, [%3]\n"
-+ "mov %0, #0\n"
-+ "teq %1, %4\n"
-++#ifdef __thumb__
-++ "it eq\n"
-++#endif
-+ "strexeq %0, %5, [%3]\n"
-+ : "=&r" (res), "=&r" (curval), "+Qo" (ptr->counter)
-+ : "r" (&ptr->counter), "Ir" (oldval), "r" (newval)
-+diff --git a/ksrc/arch/arm/switch.S b/ksrc/arch/arm/switch.S
-+index 83f4746..95c355f 100644
-+--- a/ksrc/arch/arm/switch.S
-++++ b/ksrc/arch/arm/switch.S
-+@@ -37,6 +37,11 @@
-+ .endm
-+ #endif
-+
-++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
-++#define ARM(x...) x
-++#define THUMB(x...)
-++#endif
-++
-+ #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 37)
-+ #ifdef CONFIG_MMU
-+ #define USE_DOMAINS
-+@@ -83,18 +88,19 @@
-+ * r0 = pointer to union vfp_state, r1 = fpexc
-+ */
-+ ENTRY(rthal_vfp_save)
-+- VFPFSTMIA r0, r2 @ save the working registers
-+- VFPFMRX r2, FPSCR @ current status
-+- tst r1, #FPEXC_EX @ is there additional state to save?
-+- beq 1f
-+- VFPFMRX r3, FPINST @ FPINST (only if FPEXC.EX is set)
-+- tst r1, #FPEXC_FP2V @ is there an FPINST2 to read?
-+- beq 1f
-+- VFPFMRX r12, FPINST2 @ FPINST2 if needed (and present)
-++ VFPFSTMIA r0, r2 @ save the working registers
-++ VFPFMRX r2, FPSCR @ current status
-++ tst r1, #FPEXC_EX @ is there additional state to save?
-++ beq 1f
-++ VFPFMRX r3, FPINST @ FPINST (only if FPEXC.EX is set)
-++ tst r1, #FPEXC_FP2V @ is there an FPINST2 to read?
-++ beq 1f
-++ VFPFMRX r12, FPINST2 @ FPINST2 if needed (and present)
-+ 1:
-+- stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2
-+- mov pc, lr
-+-
-++ stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2
-++ mov pc, lr
-++ENDPROC(rthal_vfp_save)
-++
-+ /* Copied from no_old_VFP_process in arch/arm/vfp/vfphw.S
-+ * r0 = pointer to union vfp_state
-+ * r1 = current cpu
-+@@ -102,20 +108,21 @@ ENTRY(rthal_vfp_save)
-+ ENTRY(rthal_vfp_load)
-+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) \
-+ || defined(CONFIG_VFP_3_2_BACKPORT)) && defined(CONFIG_SMP)
-+- str r1, [r0, #VFP_CPU]
-++ str r1, [r0, #VFP_CPU]
-+ #endif
-+- VFPFLDMIA r0, r2 @ reload the working registers while
-++ VFPFLDMIA r0, r2 @ reload the working registers while
-+ @ FPEXC is in a safe state
-+- ldmia r0, {r1, r2, r3, r12} @ load FPEXC, FPSCR, FPINST, FPINST2
-+- tst r1, #FPEXC_EX @ is there additional state to restore?
-+- beq 1f
-+- VFPFMXR FPINST, r3 @ restore FPINST (only if FPEXC.EX is set)
-+- tst r1, #FPEXC_FP2V @ is there an FPINST2 to write?
-+- beq 1f
-+- VFPFMXR FPINST2, r12 @ FPINST2 if needed (and present)
-++ ldmia r0, {r1, r2, r3, r12} @ load FPEXC, FPSCR, FPINST, FPINST2
-++ tst r1, #FPEXC_EX @ is there additional state to restore?
-++ beq 1f
-++ VFPFMXR FPINST, r3 @ restore FPINST (only if FPEXC.EX is set)
-++ tst r1, #FPEXC_FP2V @ is there an FPINST2 to write?
-++ beq 1f
-++ VFPFMXR FPINST2, r12 @ FPINST2 if needed (and present)
-+ 1:
-+- VFPFMXR FPSCR, r2 @ restore status
-+- mov pc, lr
-++ VFPFMXR FPSCR, r2 @ restore status
-++ mov pc, lr
-++ENDPROC(rthal_vfp_load)
-+ #endif
-+
-+ /*
-+@@ -144,28 +151,37 @@ ENTRY(rthal_vfp_load)
-+ * r0 = previous task_struct, r1 = previous thread_info, r2 = next thread_info
-+ */
-+ ENTRY(rthal_thread_switch)
-+- add ip, r1, #TI_CPU_SAVE
-+- ldr r3, [r2, #TI_TP_VALUE]
-+- stmia ip!, {r4 - sl, fp, sp, lr} @ Store most regs on stack
-++ add ip, r1, #TI_CPU_SAVE
-++ ldr r3, [r2, #TI_TP_VALUE]
-++ ARM( stmia ip!, {r4 - sl, fp, sp, lr} ) @ Store most regs on stack
-++ THUMB( stmia ip!, {r4 - sl, fp} ) @ Store most regs on stack
-++ THUMB( str sp, [ip], #4 )
-++ THUMB( str lr, [ip], #4 )
-+ #ifdef USE_DOMAINS
-+- ldr r6, [r2, #TI_CPU_DOMAIN]
-++ ldr r6, [r2, #TI_CPU_DOMAIN]
-+ #endif
-+
-+- clear_exclusive_monitor
-+- set_tls r3, r4, r5
-++ clear_exclusive_monitor
-++ set_tls r3, r4, r5
-+ #ifdef USE_DOMAINS
-+- mcr p15, 0, r6, c3, c0, 0 @ Set domain register
-++ mcr p15, 0, r6, c3, c0, 0 @ Set domain register
-+ #endif
-+- fpu_switch r4
-+- add r4, r2, #TI_CPU_SAVE
-+- ldmia r4, {r4 - sl, fp, sp, pc} @ Load all regs saved previously
-++ fpu_switch r4
-++ ARM( add r4, r2, #TI_CPU_SAVE )
-++ ARM( ldmia r4, {r4 - sl, fp, sp, pc} ) @ Load all regs saved previously
-++ THUMB( add ip, r2, #TI_CPU_SAVE )
-++ THUMB( ldmia ip!, {r4 - sl, fp} ) @ Load all regs saved previously
-++ THUMB( ldr sp, [ip], #4 )
-++ THUMB( ldr pc, [ip] )
-++ENDPROC(rthal_thread_switch)
-+
-+ /*
-+ * r4 = xnarch_thread_trampoline
-+ * r5 = xnarchtcb_t *
-+ */
-+ ENTRY(rthal_thread_trampoline)
-+- mov r0, r5
-+- mov pc, r4
-++ mov r0, r5
-++ mov pc, r4
-++ENDPROC(rthal_thread_trampoline)
-+
-+ // vim: ts=4 et sw=4 sts=4
-+--
-+1.7.2.5
-+
-diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk
-index 6dbdcea..e425b75 100644
---- a/package/xenomai/xenomai.mk
-+++ b/package/xenomai/xenomai.mk
-@@ -7,7 +7,7 @@
-
- XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION))
- ifeq ($(XENOMAI_VERSION),)
--XENOMAI_VERSION = 2.6.0
-+XENOMAI_VERSION = 2.6.1
- endif
-
- XENOMAI_SITE = http://download.gna.org/xenomai/stable/
---
-1.7.9.5
-
diff --git a/lab-data/realtime/rttest/data/buildroot-2013.02-bump-xenomai-to-2.6.2.1.patch b/lab-data/realtime/rttest/data/buildroot-2013.02-bump-xenomai-to-2.6.2.1.patch
new file mode 100644
index 0000000..bf0f43d
--- /dev/null
+++ b/lab-data/realtime/rttest/data/buildroot-2013.02-bump-xenomai-to-2.6.2.1.patch
@@ -0,0 +1,221 @@
+commit bd528977f1dbe232bd1ca2a0bd9a37f9172d579a
+Author: Victor Hiairrassary <victor.hiairrassary.ml at gmail.com>
+Date: Sun Apr 21 22:07:23 2013 +0000
+
+ xenomai: bump to version 2.6.2.1
+
+ - remove BR2_PACKAGE_XENOMAI_SMP since xenomai 2.6.2 no more
+ requires to pass the --enable-smp option : see release notes at
+ http://www.xenomai.org/index.php/Xenomai:News#2012-12-26_Xenomai_2.6.2
+
+ - remove xenomai-thumb-fix.patch since it was completely merged
+ in xenomai 2.6.2
+
+ Signed-off-by: Victor Hiairrassary <victor.hiairrassary.ml at gmail.com>
+ Signed-off-by: Peter Korsgaard <jacmet at sunsite.dk>
+
+diff --git a/package/xenomai/Config.in b/package/xenomai/Config.in
+index b09472d..767f622 100644
+--- a/package/xenomai/Config.in
++++ b/package/xenomai/Config.in
+@@ -39,13 +39,6 @@ config BR2_PACKAGE_XENOMAI_VERSION
+ BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH, in the Linux
+ Kernel -> Linux Kernel Extensions menu.
+
+-config BR2_PACKAGE_XENOMAI_SMP
+- bool "Enable SMP support"
+- depends on BR2_cortex_a9 || !BR2_arm # only A9 has SMP support
+- help
+- This option allows to enable or disable SMP support. It has
+- to match your kernel configuration.
+-
+ config BR2_PACKAGE_XENOMAI_TESTSUITE
+ bool "Install testsuite"
+ help
+diff --git a/package/xenomai/xenomai-thumb-fix.patch b/package/xenomai/xenomai-thumb-fix.patch
+deleted file mode 100644
+index 7c98c2e..0000000
+--- a/package/xenomai/xenomai-thumb-fix.patch
++++ /dev/null
+@@ -1,157 +0,0 @@
+-From ad3714e925f5c6b4ae0e0d31c4bab7f8c5e659db Mon Sep 17 00:00:00 2001
+-From: Gilles Chanteperdrix <gilles.chanteperdrix at xenomai.org>
+-Date: Fri, 10 Aug 2012 21:55:41 +0200
+-Subject: [PATCH] hal/arm: fix compilation for thumb
+-
+----
+- include/asm-arm/atomic.h | 3 ++
+- ksrc/arch/arm/switch.S | 84 +++++++++++++++++++++++++++------------------
+- 2 files changed, 53 insertions(+), 34 deletions(-)
+-
+-diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h
+-index 5d55ae8..ae96847 100644
+---- a/include/asm-arm/atomic.h
+-+++ b/include/asm-arm/atomic.h
+-@@ -183,6 +183,9 @@ xnarch_atomic_cmpxchg(xnarch_atomic_t *ptr,
+- "ldrex %1, [%3]\n"
+- "mov %0, #0\n"
+- "teq %1, %4\n"
+-+#ifdef __thumb__
+-+ "it eq\n"
+-+#endif
+- "strexeq %0, %5, [%3]\n"
+- : "=&r" (res), "=&r" (curval), "+Qo" (ptr->counter)
+- : "r" (&ptr->counter), "Ir" (oldval), "r" (newval)
+-diff --git a/ksrc/arch/arm/switch.S b/ksrc/arch/arm/switch.S
+-index 83f4746..95c355f 100644
+---- a/ksrc/arch/arm/switch.S
+-+++ b/ksrc/arch/arm/switch.S
+-@@ -37,6 +37,11 @@
+- .endm
+- #endif
+-
+-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
+-+#define ARM(x...) x
+-+#define THUMB(x...)
+-+#endif
+-+
+- #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 37)
+- #ifdef CONFIG_MMU
+- #define USE_DOMAINS
+-@@ -83,18 +88,19 @@
+- * r0 = pointer to union vfp_state, r1 = fpexc
+- */
+- ENTRY(rthal_vfp_save)
+-- VFPFSTMIA r0, r2 @ save the working registers
+-- VFPFMRX r2, FPSCR @ current status
+-- tst r1, #FPEXC_EX @ is there additional state to save?
+-- beq 1f
+-- VFPFMRX r3, FPINST @ FPINST (only if FPEXC.EX is set)
+-- tst r1, #FPEXC_FP2V @ is there an FPINST2 to read?
+-- beq 1f
+-- VFPFMRX r12, FPINST2 @ FPINST2 if needed (and present)
+-+ VFPFSTMIA r0, r2 @ save the working registers
+-+ VFPFMRX r2, FPSCR @ current status
+-+ tst r1, #FPEXC_EX @ is there additional state to save?
+-+ beq 1f
+-+ VFPFMRX r3, FPINST @ FPINST (only if FPEXC.EX is set)
+-+ tst r1, #FPEXC_FP2V @ is there an FPINST2 to read?
+-+ beq 1f
+-+ VFPFMRX r12, FPINST2 @ FPINST2 if needed (and present)
+- 1:
+-- stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2
+-- mov pc, lr
+--
+-+ stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2
+-+ mov pc, lr
+-+ENDPROC(rthal_vfp_save)
+-+
+- /* Copied from no_old_VFP_process in arch/arm/vfp/vfphw.S
+- * r0 = pointer to union vfp_state
+- * r1 = current cpu
+-@@ -102,20 +108,21 @@ ENTRY(rthal_vfp_save)
+- ENTRY(rthal_vfp_load)
+- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0) \
+- || defined(CONFIG_VFP_3_2_BACKPORT)) && defined(CONFIG_SMP)
+-- str r1, [r0, #VFP_CPU]
+-+ str r1, [r0, #VFP_CPU]
+- #endif
+-- VFPFLDMIA r0, r2 @ reload the working registers while
+-+ VFPFLDMIA r0, r2 @ reload the working registers while
+- @ FPEXC is in a safe state
+-- ldmia r0, {r1, r2, r3, r12} @ load FPEXC, FPSCR, FPINST, FPINST2
+-- tst r1, #FPEXC_EX @ is there additional state to restore?
+-- beq 1f
+-- VFPFMXR FPINST, r3 @ restore FPINST (only if FPEXC.EX is set)
+-- tst r1, #FPEXC_FP2V @ is there an FPINST2 to write?
+-- beq 1f
+-- VFPFMXR FPINST2, r12 @ FPINST2 if needed (and present)
+-+ ldmia r0, {r1, r2, r3, r12} @ load FPEXC, FPSCR, FPINST, FPINST2
+-+ tst r1, #FPEXC_EX @ is there additional state to restore?
+-+ beq 1f
+-+ VFPFMXR FPINST, r3 @ restore FPINST (only if FPEXC.EX is set)
+-+ tst r1, #FPEXC_FP2V @ is there an FPINST2 to write?
+-+ beq 1f
+-+ VFPFMXR FPINST2, r12 @ FPINST2 if needed (and present)
+- 1:
+-- VFPFMXR FPSCR, r2 @ restore status
+-- mov pc, lr
+-+ VFPFMXR FPSCR, r2 @ restore status
+-+ mov pc, lr
+-+ENDPROC(rthal_vfp_load)
+- #endif
+-
+- /*
+-@@ -144,28 +151,37 @@ ENTRY(rthal_vfp_load)
+- * r0 = previous task_struct, r1 = previous thread_info, r2 = next thread_info
+- */
+- ENTRY(rthal_thread_switch)
+-- add ip, r1, #TI_CPU_SAVE
+-- ldr r3, [r2, #TI_TP_VALUE]
+-- stmia ip!, {r4 - sl, fp, sp, lr} @ Store most regs on stack
+-+ add ip, r1, #TI_CPU_SAVE
+-+ ldr r3, [r2, #TI_TP_VALUE]
+-+ ARM( stmia ip!, {r4 - sl, fp, sp, lr} ) @ Store most regs on stack
+-+ THUMB( stmia ip!, {r4 - sl, fp} ) @ Store most regs on stack
+-+ THUMB( str sp, [ip], #4 )
+-+ THUMB( str lr, [ip], #4 )
+- #ifdef USE_DOMAINS
+-- ldr r6, [r2, #TI_CPU_DOMAIN]
+-+ ldr r6, [r2, #TI_CPU_DOMAIN]
+- #endif
+-
+-- clear_exclusive_monitor
+-- set_tls r3, r4, r5
+-+ clear_exclusive_monitor
+-+ set_tls r3, r4, r5
+- #ifdef USE_DOMAINS
+-- mcr p15, 0, r6, c3, c0, 0 @ Set domain register
+-+ mcr p15, 0, r6, c3, c0, 0 @ Set domain register
+- #endif
+-- fpu_switch r4
+-- add r4, r2, #TI_CPU_SAVE
+-- ldmia r4, {r4 - sl, fp, sp, pc} @ Load all regs saved previously
+-+ fpu_switch r4
+-+ ARM( add r4, r2, #TI_CPU_SAVE )
+-+ ARM( ldmia r4, {r4 - sl, fp, sp, pc} ) @ Load all regs saved previously
+-+ THUMB( add ip, r2, #TI_CPU_SAVE )
+-+ THUMB( ldmia ip!, {r4 - sl, fp} ) @ Load all regs saved previously
+-+ THUMB( ldr sp, [ip], #4 )
+-+ THUMB( ldr pc, [ip] )
+-+ENDPROC(rthal_thread_switch)
+-
+- /*
+- * r4 = xnarch_thread_trampoline
+- * r5 = xnarchtcb_t *
+- */
+- ENTRY(rthal_thread_trampoline)
+-- mov r0, r5
+-- mov pc, r4
+-+ mov r0, r5
+-+ mov pc, r4
+-+ENDPROC(rthal_thread_trampoline)
+-
+- // vim: ts=4 et sw=4 sts=4
+---
+-1.7.2.5
+-
+diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk
+index f40cbdc..fbf20b5 100644
+--- a/package/xenomai/xenomai.mk
++++ b/package/xenomai/xenomai.mk
+@@ -7,7 +7,7 @@
+
+ XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION))
+ ifeq ($(XENOMAI_VERSION),)
+-XENOMAI_VERSION = 2.6.1
++XENOMAI_VERSION = 2.6.2.1
+ endif
+
+ XENOMAI_SITE = http://download.gna.org/xenomai/stable/
+@@ -18,10 +18,6 @@ XENOMAI_LICENSE_FILES = debian/copyright include/COPYING src/skins/native/COPYIN
+
+ XENOMAI_INSTALL_STAGING = YES
+
+-ifeq ($(BR2_PACKAGE_XENOMAI_SMP),y)
+-XENOMAI_CONF_OPT += --enable-smp
+-endif
+-
+ XENOMAI_CONF_OPT += --includedir=/usr/include/xenomai/
+
+ ifeq ($(BR2_HAVE_DEVFILES),)
diff --git a/lab-data/realtime/rttest/data/linux-3.5.7-igepv2-fix-pinmux.patch b/lab-data/realtime/rttest/data/linux-3.5.7-igepv2-fix-pinmux.patch
new file mode 100644
index 0000000..6732c84
--- /dev/null
+++ b/lab-data/realtime/rttest/data/linux-3.5.7-igepv2-fix-pinmux.patch
@@ -0,0 +1,65 @@
+commit a71eb61c9d077ec5019b35da6c883d67fc43d002
+Author: Javier Martinez Canillas <javier at dowhile0.org>
+Date: Tue Jul 10 03:57:32 2012 +0200
+
+ ARM: OMAP3: igep0020: set GPIO mode for mux mcspi1_cs2 pin
+
+ According to the IGEPv2 Rev.C data-sheet the LAN9221i pin 14 (IRQ) is
+ connected to the OMAP3730 mcspi1_cs2 pin. Since this omap mux pin acts
+ as an IRQ line, it has to be configured as an input GPIO.
+
+ IGEPv2 platform code sets the smsc911x_cfg->gpio_irq to GPIO 176 but
+ since the mux pin default mode is MODE7 (safe_mode) the driver fails
+ when trying to register the IRQ with the following error message:
+
+ [ 1.994598] smsc911x: Driver version 2008-10-21
+ [ 3.704162] irq 272: nobody cared (try booting with the "irqpoll" option)
+ [ 3.711364] [<c001a114>] (unwind_backtrace+0x0/0xf0) from [<c009a0d4>] (__report_bad_irq+0x20/0xbc)
+ [ 3.720916] [<c009a0d4>] (__report_bad_irq+0x20/0xbc) from [<c009a41c>] (note_interrupt+0x1d8/0x238)
+ [ 3.730560] [<c009a41c>] (note_interrupt+0x1d8/0x238) from [<c0098234>] (handle_irq_event_percpu+0xc0/0x260)
+ [ 3.740936] [<c0098234>] (handle_irq_event_percpu+0xc0/0x260) from [<c0098410>] (handle_irq_event+0x3c/0x5c)
+ [ 3.751312] [<c0098410>] (handle_irq_event+0x3c/0x5c) from [<c009abe0>] (handle_level_irq+0xac/0x10c)
+ [ 3.761047] [<c009abe0>] (handle_level_irq+0xac/0x10c) from [<c0097a34>] (generic_handle_irq+0x30/0x48)
+ [ 3.770935] [<c0097a34>] (generic_handle_irq+0x30/0x48) from [<c02a6b74>] (gpio_irq_handler+0x180/0x1d4)
+ [ 3.780944] [<c02a6b74>] (gpio_irq_handler+0x180/0x1d4) from [<c0097a34>] (generic_handle_irq+0x30/0x48)
+ [ 3.790954] [<c0097a34>] (generic_handle_irq+0x30/0x48) from [<c0013e18>] (handle_IRQ+0x4c/0xac)
+ [ 3.800231] [<c0013e18>] (handle_IRQ+0x4c/0xac) from [<c000858c>] (omap3_intc_handle_irq+0x60/0x74)
+ [ 3.809783] [<c000858c>] (omap3_intc_handle_irq+0x60/0x74) from [<c04979e4>] (__irq_svc+0x44/0x60)
+ [ 3.819213] Exception stack(0xee42fde0 to 0xee42fe28)
+ [ 3.824554] fde0: 00000001 00000001 00000000 00000000 60000013 c06cce14 c06cce14 00000110
+ [ 3.833190] fe00: 00000000 c06ccdf4 60000013 ee41d000 fb058064 ee42fe28 c0089e08 c04976b4
+ [ 3.841796] fe20: 20000013 ffffffff
+ [ 3.845489] [<c04979e4>] (__irq_svc+0x44/0x60) from [<c04976b4>] (_raw_spin_unlock_irqrestore+0x34/0x44)
+ [ 3.855499] [<c04976b4>] (_raw_spin_unlock_irqrestore+0x34/0x44) from [<c0099744>] (__setup_irq+0x1b8/0x3f0)
+ [ 3.865875] [<c0099744>] (__setup_irq+0x1b8/0x3f0) from [<c0099a34>] (request_threaded_irq+0xb8/0x140)
+ [ 3.875701] [<c0099a34>] (request_threaded_irq+0xb8/0x140) from [<c0487950>] (smsc911x_drv_probe+0x75c/0x11a4)
+ [ 3.886260] [<c0487950>] (smsc911x_drv_probe+0x75c/0x11a4) from [<c02e9bcc>] (platform_drv_probe+0x18/0x1c)
+ [ 3.906707] [<c02e89b8>] (driver_probe_device+0x90/0x210) from [<c02e8bcc>] (__driver_attach+0x94/0x98)
+ [ 3.916625] [<c02e8bcc>] (__driver_attach+0x94/0x98) from [<c02e7298>] (bus_for_each_dev+0x50/0x7c)
+ [ 3.926177] [<c02e7298>] (bus_for_each_dev+0x50/0x7c) from [<c02e81d4>] (bus_add_driver+0x184/0x248)
+ [ 3.935821] [<c02e81d4>] (bus_add_driver+0x184/0x248) from [<c02e909c>] (driver_register+0x78/0x12c)
+ [ 3.945465] [<c02e909c>] (driver_register+0x78/0x12c) from [<c0008648>] (do_one_initcall+0x34/0x178)
+ [ 3.955108] [<c0008648>] (do_one_initcall+0x34/0x178) from [<c066e8f4>] (kernel_init+0xfc/0x1c0)
+ [ 3.964385] [<c066e8f4>] (kernel_init+0xfc/0x1c0) from [<c00140b0>] (kernel_thread_exit+0x0/0x8)
+ [ 3.973632] handlers:
+ [ 3.976043] [<c034e2cc>] smsc911x_irqhandler
+ [ 3.980560] Disabling IRQ #272
+
+ Signed-off-by: Javier Martinez Canillas <javier at dowhile0.org>
+ Acked-by: Enric Balletbo i Serra <eballetbo at gmail.com>
+ Tested-by: Enric Balletbo i Serra <eballetbo at gmail.com>
+ Signed-off-by: Tony Lindgren <tony at atomide.com>
+
+diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
+index 7491529..2821448 100644
+--- a/arch/arm/mach-omap2/board-igep0020.c
++++ b/arch/arm/mach-omap2/board-igep0020.c
+@@ -554,6 +554,8 @@ static const struct usbhs_omap_board_data igep3_usbhs_bdata __initconst = {
+
+ #ifdef CONFIG_OMAP_MUX
+ static struct omap_board_mux board_mux[] __initdata = {
++ /* SMSC9221 LAN Controller ETH IRQ (GPIO_176) */
++ OMAP3_MUX(MCSPI1_CS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
+ { .reg_offset = OMAP_MUX_TERMINATOR },
+ };
+ #endif
diff --git a/labs/sysdev-real-time/sysdev-real-time.tex b/labs/sysdev-real-time/sysdev-real-time.tex
index 91c106e..32bb30d 100644
--- a/labs/sysdev-real-time/sysdev-real-time.tex
+++ b/labs/sysdev-real-time/sysdev-real-time.tex
@@ -27,10 +27,10 @@ supports Xenomai.
Let's build this with Buildroot.
-Download and extract the Buildroot 2012.08 sources. Apply the
-Buildroot patch \code{buildroot-2012.08-bump-xenomai-to-2.6.1.patch}
+Download and extract the Buildroot 2013.02 sources. Apply the
+Buildroot patch \code{buildroot-2013.02-bump-xenomai-to-2.6.2.1.patch}
from the lab {\em data} directory to your Buildroot sources. It
-upgrades the Xenomai version to 2.6.1, which allows to use the 3.2
+upgrades the Xenomai version to 2.6.2.1, which allows to use the 3.5
kernel.
Configure Buildroot with the following settings, using the \code{/}
@@ -42,7 +42,7 @@ command in \code{make menuconfig} to find parameters by their name:
\item In \code{Toolchain}:
\begin{itemize}
\item \code{Toolchain type}: \code{External toolchain}
- \item \code{Toolchain}: \code{Sourcery CodeBench ARM 2011.09}
+ \item \code{Toolchain}: \code{Linaro 2013.01}
\end{itemize}
\item In \code{System configuration}:
\begin{itemize}
@@ -81,10 +81,13 @@ cp data/* nfsroot/root
\section{Compile a standard Linux kernel}
-Download the exact Linux 3.2.21 version. That's the most recent
-ARM Linux version that Xenomai 2.6.1 supports. You will have trouble
+Download the exact Linux 3.5.7 version. That's the most recent
+ARM Linux version that Xenomai 2.6.2.1 supports. You will have trouble
applying Xenomai kernel patches otherwise.
+Apply the \code{linux-3.5.7-igepv2-fix-pinmux.patch} patch from this
+lab's \code{data} directory.
+
Configure your kernel with the default configuration for the IGEPv2
board.
@@ -124,7 +127,7 @@ Let's configure our \code{PATH} to use this toolchain:
\begin{verbatim}
export
-PATH=$HOME/felabs/realtime/rttest/buildroot-2012.08/output/host/usr/bin:$PATH
+PATH=$HOME/felabs/realtime/rttest/buildroot-2013.02/output/host/usr/bin:$PATH
\end{verbatim}
Have a look at the \code{rttest.c} source file available in \code{root/} in
@@ -176,9 +179,9 @@ the results.
Prepare the kernel for Xenomai compilation:
\begin{verbatim}
-cd $HOME/felabs/realtime/rttest/buildroot-2012.08/
-./output/build/xenomai-2.6.1/scripts/prepare-kernel.sh \
- --arch=arm --linux=/path/to/linux-3.2.21
+cd $HOME/felabs/realtime/rttest/buildroot-2013.02/
+./output/build/xenomai-2.6.2.1/scripts/prepare-kernel.sh \
+ --arch=arm --linux=/path/to/linux-3.5.7
\end{verbatim}
Now, run the kernel configuration interface, and make sure that
@@ -197,8 +200,8 @@ source directory, and force Buildroot to build the host variant of
{\em pkg-config}:
\begin{verbatim}
-cd $HOME/felabs/realtime/rttest/buildroot-2012.08/
-make host-pkg-config
+cd $HOME/felabs/realtime/rttest/buildroot-2013.02/
+make host-pkgconf
\end{verbatim}
Compile your kernel, and in the meantime,
@@ -207,8 +210,8 @@ compile \code{rttest} for the Xenomai POSIX skin:
\small
\begin{verbatim}
cd $HOME/felabs/realtime/rttest/nfsroot/root
-export PATH=$HOME/felabs/realtime/rttest/buildroot-2012.08/output/host/usr/bin:$PATH
-arm-none-linux-gnueabi-gcc -o rttest rttest.c $(pkg-config libxenomai_posix)
+export PATH=$HOME/felabs/realtime/rttest/buildroot-2013.02/output/host/usr/bin:$PATH
+arm-none-linux-gnueabi-gcc -o rttest rttest.c $(pkg-config --libs --cflags libxenomai_posix)
\end{verbatim}
\normalsize
More information about the training-materials-updates
mailing list