Skip to contentSkip to conversation

linux-boundary-rt: Add initial recipe

PATCH New Ian Coolidge 1 participant 1 message Feb 9, 2017 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-boundary-rt: Add initial recipe

Add support for the Boundary Devices kernel with the realtime patch applied

Patches and defconfig changes are based on linux-imx-rt recipe

---
 .../linux-boundary-rt-4.1.15/0001-fix-build.patch  |  71 ++++
 .../0002-no-split-ptlocks.patch                    |  85 ++++
 ...-around-CPU-stalls-in-the-imx-sdma-driver.patch | 126 ++++++
 .../0004-export-swait-locked-functions.patch       |  31 ++
 .../linux/linux-boundary-rt-4.1.15/defconfig       | 451 +++++++++++++++++++++
 recipes-kernel/linux/linux-boundary-rt_4.1.15.bb   |  25 ++
 6 files changed, 789 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-boundary-rt-4.1.15/0001-fix-build.patch
 create mode 100644 recipes-kernel/linux/linux-boundary-rt-4.1.15/0002-no-split-ptlocks.patch
 create mode 100644 recipes-kernel/linux/linux-boundary-rt-4.1.15/0003-Work-around-CPU-stalls-in-the-imx-sdma-driver.patch
 create mode 100644 recipes-kernel/linux/linux-boundary-rt-4.1.15/0004-export-swait-locked-functions.patch
 create mode 100644 recipes-kernel/linux/linux-boundary-rt-4.1.15/defconfig
 create mode 100644 recipes-kernel/linux/linux-boundary-rt_4.1.15.bb
recipes-kernel/linux/linux-boundary-rt-4.1.15/0001-fix-build.patch new file +71 -0
new file mode 100644
index 0000000..4be4066
@@ -0,0 +1,71 @@
+Fix build errors when RT patch is applied
+
+Upstream-Status: Inappropriate [other]
+Freescale does not support the RT patch
+
+Signed-off-by: Jacob Kroon <[email protected]>
+Signed-off-by: Dominic Sacré <[email protected]> [updated for 3.14.28]
+
+diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+index 2ec98dc..5d0b7df 100644
+--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
++++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+@@ -7344,7 +7344,7 @@ gckOS_WaitSignal(
+ 
+     might_sleep();
+ 
+-    spin_lock_irq(&signal->obj.wait.lock);
++    raw_spin_lock_irq(&signal->obj.wait.lock);
+ 
+     if (signal->obj.done)
+     {
+@@ -7366,9 +7366,8 @@ gckOS_WaitSignal(
+             ? MAX_SCHEDULE_TIMEOUT
+             : Wait * HZ / 1000;
+ 
+-        DECLARE_WAITQUEUE(wait, current);
+-        wait.flags |= WQ_FLAG_EXCLUSIVE;
+-        __add_wait_queue_tail(&signal->obj.wait, &wait);
++        DEFINE_SWAITER(wait);
++        swait_prepare_locked(&signal->obj.wait, &wait);
+ 
+         while (gcvTRUE)
+         {
+@@ -7380,9 +7379,9 @@ gckOS_WaitSignal(
+             }
+ 
+             __set_current_state(TASK_INTERRUPTIBLE);
+-            spin_unlock_irq(&signal->obj.wait.lock);
++            raw_spin_unlock_irq(&signal->obj.wait.lock);
+             timeout = schedule_timeout(timeout);
+-            spin_lock_irq(&signal->obj.wait.lock);
++            raw_spin_lock_irq(&signal->obj.wait.lock);
+ 
+             if (signal->obj.done)
+             {
+@@ -7403,10 +7402,10 @@ gckOS_WaitSignal(
+             }
+         }
+ 
+-        __remove_wait_queue(&signal->obj.wait, &wait);
++        swait_finish_locked(&signal->obj.wait, &wait);
+     }
+ 
+-    spin_unlock_irq(&signal->obj.wait.lock);
++    raw_spin_unlock_irq(&signal->obj.wait.lock);
+ 
+ OnError:
+     /* Return status. */
+diff --git a/include/linux/imx_sema4.h b/include/linux/imx_sema4.h
+index 9787980..3586199 100644
+--- a/include/linux/imx_sema4.h
++++ b/include/linux/imx_sema4.h
+@@ -9,6 +9,8 @@
+ #ifndef __LINUX_IMX_SEMA4_H__
+ #define __LINUX_IMX_SEMA4_H__
+ 
++#include <linux/wait.h>
++
+ #define SEMA4_NUM_DEVICES	1
+ #define SEMA4_NUM_GATES		16
+ 
recipes-kernel/linux/linux-boundary-rt-4.1.15/0002-no-split-ptlocks.patch new file +85 -0

85 lines not on this page · raw message

recipes-kernel/linux/linux-boundary-rt-4.1.15/0003-Work-around-CPU-stalls-in-the-imx-sdma-driver.patch new file +126 -0

126 lines not on this page · raw message

recipes-kernel/linux/linux-boundary-rt-4.1.15/0004-export-swait-locked-functions.patch new file +31 -0
new file mode 100644
index 0000000..1a616aa
@@ -0,0 +1,31 @@
+From 2460dd985b0cf477f74396de92d1bc5df496abdc Mon Sep 17 00:00:00 2001
+From: Julio Cruz <[email protected]>
+Date: Wed, 20 Jan 2016 19:26:44 +0800
+Subject: [PATCH] Export symbols for iMX-GPU-VIV module
+
+---
+ kernel/sched/wait-simple.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/kernel/sched/wait-simple.c b/kernel/sched/wait-simple.c
+index 7dfa86d..a3776ee 100644
+--- a/kernel/sched/wait-simple.c
++++ b/kernel/sched/wait-simple.c
+@@ -40,6 +40,7 @@ void swait_prepare_locked(struct swait_head *head, struct swaiter *w)
+ 	if (list_empty(&w->node))
+ 		__swait_enqueue(head, w);
+ }
++EXPORT_SYMBOL(swait_prepare_locked);
+ 
+ void swait_prepare(struct swait_head *head, struct swaiter *w, int state)
+ {
+@@ -58,6 +59,7 @@ void swait_finish_locked(struct swait_head *head, struct swaiter *w)
+ 	if (w->task)
+ 		__swait_dequeue(w);
+ }
++EXPORT_SYMBOL(swait_finish_locked);
+ 
+ void swait_finish(struct swait_head *head, struct swaiter *w)
+ {
+-- 
+2.1.0
recipes-kernel/linux/linux-boundary-rt-4.1.15/defconfig new file +451 -0

451 lines not on this page · raw message

recipes-kernel/linux/linux-boundary-rt_4.1.15.bb new file +25 -0
new file mode 100644
index 0000000..6acc81a
@@ -0,0 +1,25 @@
+# Adapted from linux-imx.inc, copyright (C) 2013, 2014 O.S. Systems Software LTDA
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require recipes-kernel/linux/linux-imx.inc
+require recipes-kernel/linux/linux-dtb.inc
+
+SUMMARY = "Linux kernel for Boundary Devices boards"
+
+SRC_URI = "git://github.com/boundarydevices/linux-imx6.git;branch=${SRCBRANCH} \
+           https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/older/patch-4.1.15-rt18.patch.gz;name=rt-patch \
+           file://0001-fix-build.patch \
+           file://0002-no-split-ptlocks.patch \
+           file://0003-Work-around-CPU-stalls-in-the-imx-sdma-driver.patch \
+           file://0004-export-swait-locked-functions.patch \
+           file://defconfig \
+"
+
+SRC_URI[rt-patch.md5sum] = "4afe06f7b58824143a60accb28a5ea3f"
+SRC_URI[rt-patch.sha256sum] = "e51b2c770d259fcfa683b03c2aa549efbadc6122b3d10a7767daf9df1bd863f0"
+
+LOCALVERSION = "-2.0.0_ga+yocto"
+SRCBRANCH = "boundary-imx_4.1.15_2.0.0_ga"
+SRCREV = "ff4e28b95115d7021c3ea6209b7c2b0b849874e1"
+DEPENDS += "lzop-native bc-native"
+COMPATIBLE_MACHINE = "(nitrogen6x|nitrogen6x-lite|nitrogen6sx|nitrogen7)"
Signature · 1 line
2.7.4