Difference between revisions of "EBC Xenomai"

From eLinux.org
Jump to: navigation, search
m (Patching the Kernel: Added kernel compile instructions)
m (Setting up the Bone: Added)
Line 66: Line 66:
 
** Under  Real-time sub-system  ---> Drivers ---> Testing drivers, enable everything
 
** Under  Real-time sub-system  ---> Drivers ---> Testing drivers, enable everything
 
Then sit back an wait.
 
Then sit back an wait.
 +
 +
== Setting up the Bone ==
 +
While you are waiting for the compile to finish, you can set up the Bone.
  
 
{{YoderFoot}}
 
{{YoderFoot}}

Revision as of 11:38, 9 October 2014

thumb‎ Embedded Linux Class by Mark A. Yoder


Xenomai is a set of patches for the kernel that allow it to run real-time tasks. This is an adaptation of Bruno Martins' Xenomai on the Beaglebone Black in 14 easy steps that works with the kernel installed in EBC Installing Kernel Source.

Patching the Kernel

bone$ wget http://download.gna.org/xenomai/stable/latest/xenomai-2.6.4.tar.bz2
bone$ tar xvjf xenomai-2.6.4.tar.bz2
  • Checkout the the latest kernel
bone$ cd bb-kernel
bone$ uname -a
bone$ git tags | sort | less

Pick the tag that is close to your current version of the kernel.

bone$ get checkout 3.8.13-bone67 -v xenomai
  • Patch the kernel. This assumes b-kernel and xenomai-2.6.4 are at the same directory level.
bone$ cd bb-kernel
bone$ patch -p1 < ../../xenomai-2.6.4/ksrc/arch/arm/patches/beaglebone/ipipe-core-3.8.13-beaglebone-pre.patch
bone$ patch -p1 < ../../xenomai-2.6.4/ksrc/arch/arm/patches/ipipe-core-3.8.13-arm-4.patch
bone$ patch -p1 < ../../xenomai-2.6.4/ksrc/arch/arm/patches/beaglebone/ipipe-core-3.8.13-beaglebone-post.patch
  • Then one more patch from [1], which is shown here.
bone$ cat > thumb.patch
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index e2bc263..6f4d9f0 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -469,6 +469,7 @@ __irq_usr:
 	kuser_cmpxchg_check
 	irq_handler
 #ifdef CONFIG_IPIPE
+THUMB(	it	ne )
 	bne	__ipipe_ret_to_user_irqs_disabled
 #endif	/* CONFIG_IPIPE */
 	get_thread_info tsk
@@ -767,6 +768,7 @@ ENTRY(ret_from_exception)
 	disable_irq
 	bl	__ipipe_check_root
 	cmp     r0, #1
+THUMB(	it	ne )
 	bne	__ipipe_ret_to_user_irqs_disabled  @ Fast exit path over non-root domains
 #endif /* CONFIG_IPIPE */
 	get_thread_info tsk
bone$ patch -p1 < thumb.patch
  • Prepare the kernel
bone$ cd ../../xenomai-2.6.4/scripts
bone$ ./prepare-kernel.sh --arch=arm --linux=../../beagle-kernel/kernel

Compile the Kernel

bone$ cd ../../bb-kernel

Make sure AUTO_BUILD is turned off.

bone$ vi system.sh

Be sure the last line commented out.

#AUTO_BUILD=1
  • Build the kernel
bone$ ./build_kernel.sh
  • When the configuration menu comes up
    • Under CPU Power Management ---> CPU Frequency scaling, disable [ ] CPU Frequency scaling.
    • Under Real-time sub-system ---> Drivers ---> Testing drivers, enable everything

Then sit back an wait.

Setting up the Bone

While you are waiting for the compile to finish, you can set up the Bone.




thumb‎ Embedded Linux Class by Mark A. Yoder