summaryrefslogtreecommitdiffstats
path: root/recipes-jailhouse/freertos-cell
diff options
context:
space:
mode:
authorOla Redell <ola.redell@retotech.se>2017-12-15 15:39:29 +0100
committerOla Redell <ola.redell@retotech.se>2017-12-15 15:39:29 +0100
commite0a1fea1252e26f95f5a6302f0079d4e7649ffc2 (patch)
treeb9f45fb0e96a17d6e3257bba0e7c4f510ba335a0 /recipes-jailhouse/freertos-cell
parentdee3ee44ae32ffe92d1628b2ad52402bf491a692 (diff)
downloadmeta-jailhouse-e0a1fea1252e26f95f5a6302f0079d4e7649ffc2.tar.gz
Added example cell recipe with freertos-cell
Diffstat (limited to 'recipes-jailhouse/freertos-cell')
-rw-r--r--recipes-jailhouse/freertos-cell/freertos-cell/Bananapi-config-fix-for-Jailhouse-0.6.patch30
-rw-r--r--recipes-jailhouse/freertos-cell/freertos-cell/Fix-Makefile.patch22
-rw-r--r--recipes-jailhouse/freertos-cell/freertos-cell/Remove-check-of-interrupt-mask.patch60
-rw-r--r--recipes-jailhouse/freertos-cell/freertos-cell_1.0.bb28
4 files changed, 140 insertions, 0 deletions
diff --git a/recipes-jailhouse/freertos-cell/freertos-cell/Bananapi-config-fix-for-Jailhouse-0.6.patch b/recipes-jailhouse/freertos-cell/freertos-cell/Bananapi-config-fix-for-Jailhouse-0.6.patch
new file mode 100644
index 0000000..2421d8a
--- /dev/null
+++ b/recipes-jailhouse/freertos-cell/freertos-cell/Bananapi-config-fix-for-Jailhouse-0.6.patch
@@ -0,0 +1,30 @@
1From 6b55388a1b2375f4deca7dbf1a974d9ce22add86 Mon Sep 17 00:00:00 2001
2From: Ola Redell <ola.redell@retotech.se>
3Date: Sat, 28 Jan 2017 23:16:06 +0100
4Subject: [PATCH 2/2] bananapi: fix for newer versions of Jailhouse
5
6---
7 jailhouse-configs/bananapi-freertos-demo.c | 3 ++-
8 1 file changed, 2 insertions(+), 1 deletion(-)
9
10diff --git a/jailhouse-configs/bananapi-freertos-demo.c b/jailhouse-configs/bananapi-freertos-demo.c
11index f9488c5..094c387 100644
12--- a/jailhouse-configs/bananapi-freertos-demo.c
13+++ b/jailhouse-configs/bananapi-freertos-demo.c
14@@ -1,4 +1,4 @@
15-#include <linux/types.h>
16+#include <jailhouse/types.h>
17 #include <jailhouse/cell-config.h>
18
19 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
20@@ -15,6 +15,7 @@ struct {
21 } __attribute__((packed)) config = {
22 .cell = {
23 .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
24+ .revision = JAILHOUSE_CONFIG_REVISION,
25 .name = "FreeRTOS",
26 .flags = JAILHOUSE_CELL_PASSIVE_COMMREG,
27
28--
291.9.1
30
diff --git a/recipes-jailhouse/freertos-cell/freertos-cell/Fix-Makefile.patch b/recipes-jailhouse/freertos-cell/freertos-cell/Fix-Makefile.patch
new file mode 100644
index 0000000..c680b03
--- /dev/null
+++ b/recipes-jailhouse/freertos-cell/freertos-cell/Fix-Makefile.patch
@@ -0,0 +1,22 @@
1diff --git a/Makefile b/Makefile
2index d49c25f..f9d295a 100644
3--- a/Makefile
4+++ b/Makefile
5@@ -4,12 +4,12 @@ src = $(CURDIR)
6
7 CROSS_COMPILE ?= arm-linux-gnueabihf-
8
9-CC = $(CROSS_COMPILE)gcc
10-LD = $(CROSS_COMPILE)ld
11-AR = $(CROSS_COMPILE)ar
12-OBJCOPY = $(CROSS_COMPILE)objcopy
13+#CC = $(CROSS_COMPILE)gcc
14+#LD = $(CROSS_COMPILE)ld
15+#AR = $(CROSS_COMPILE)ar
16+#OBJCOPY = $(CROSS_COMPILE)objcopy
17
18-CFLAGS += -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=vfpv4-d16 -mfloat-abi=hard -O2
19+CFLAGS += -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=vfpv4-d16 -mfloat-abi=hard -O0
20 CFLAGS += -DCONFIG_MACH_SUN7I=1
21 CFLAGS += -Wall -MMD -pipe
22 CFLAGS += -I $(src) -I $(src)/freertos/Source/include -I $(src)/freertos-runtime -I $(src)/freertos/Source/portable/GCC/ARM_A7jailhouse
diff --git a/recipes-jailhouse/freertos-cell/freertos-cell/Remove-check-of-interrupt-mask.patch b/recipes-jailhouse/freertos-cell/freertos-cell/Remove-check-of-interrupt-mask.patch
new file mode 100644
index 0000000..a343eff
--- /dev/null
+++ b/recipes-jailhouse/freertos-cell/freertos-cell/Remove-check-of-interrupt-mask.patch
@@ -0,0 +1,60 @@
1From 1b1d05fa9e086e7161f8ef2df43874a3712ff8e0 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Anders=20T=C3=B6rnqvist?= <anders.tornqvist@retotech.se>
3Date: Fri, 27 Jan 2017 16:20:29 +0100
4Subject: [PATCH 1/2] Remove check of interrupt mask check that probably is not
5 needed in recent versions of Jailhouse. This check causes FreeRTOS to hang
6 for ever in the while loop. The commit in Jailhouse that is close to this is
7 902ee9cfd32652f6926da709b259d46a68bdebf4
8
9---
10 .../Source/portable/GCC/ARM_A7jailhouse/port.c | 34 ----------------------
11 1 file changed, 34 deletions(-)
12
13diff --git a/freertos/Source/portable/GCC/ARM_A7jailhouse/port.c b/freertos/Source/portable/GCC/ARM_A7jailhouse/port.c
14index dd739c3..6084939 100644
15--- a/freertos/Source/portable/GCC/ARM_A7jailhouse/port.c
16+++ b/freertos/Source/portable/GCC/ARM_A7jailhouse/port.c
17@@ -323,40 +323,6 @@ BaseType_t xPortStartScheduler( void )
18 {
19 uint32_t ulAPSR;
20
21- #if( configASSERT_DEFINED == 1 )
22- {
23- volatile uint32_t ulOriginalPriority;
24- volatile uint8_t * const pucFirstUserPriorityRegister = ( volatile uint8_t * const ) ( gic_v2_gicd_get_address() + portINTERRUPT_PRIORITY_REGISTER_OFFSET );
25- volatile uint8_t ucMaxPriorityValue;
26-
27- /* Determine how many priority bits are implemented in the GIC.
28-
29- Save the interrupt priority value that is about to be clobbered. */
30- ulOriginalPriority = *pucFirstUserPriorityRegister;
31-
32- /* Determine the number of priority bits available. First write to
33- all possible bits. */
34- *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE;
35-
36- /* Read the value back to see how many bits stuck. */
37- ucMaxPriorityValue = *pucFirstUserPriorityRegister;
38-
39- /* Shift to the least significant bits. */
40- while( ( ucMaxPriorityValue & portBIT_0_SET ) != portBIT_0_SET )
41- {
42- ucMaxPriorityValue >>= ( uint8_t ) 0x01;
43- }
44-
45- /* Sanity check configUNIQUE_INTERRUPT_PRIORITIES matches the read
46- value. */
47- configASSERT( ucMaxPriorityValue == portLOWEST_INTERRUPT_PRIORITY );
48-
49- /* Restore the clobbered interrupt priority register to its original
50- value. */
51- *pucFirstUserPriorityRegister = ulOriginalPriority;
52- }
53- #endif /* conifgASSERT_DEFINED */
54-
55 ulICCIAR = ulICCEOIR = ulICCPMR = (uint32_t) gic_v2_gicc_get_address();
56 ulICCIAR += portICCIAR_INTERRUPT_ACKNOWLEDGE_OFFSET;
57 ulICCEOIR += portICCEOIR_END_OF_INTERRUPT_OFFSET;
58--
591.9.1
60
diff --git a/recipes-jailhouse/freertos-cell/freertos-cell_1.0.bb b/recipes-jailhouse/freertos-cell/freertos-cell_1.0.bb
new file mode 100644
index 0000000..a61dd80
--- /dev/null
+++ b/recipes-jailhouse/freertos-cell/freertos-cell_1.0.bb
@@ -0,0 +1,28 @@
1SUMMARY = "FreeRTOS for Jailhouse"
2HOMEPAGE = "https://github.com/siemens/freertos-cell"
3
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://freertos/License/license.txt;md5=ff3ee34806c13760712131849e183a35\
6 file://LICENSE;md5=494a529748a63071fbdf44f61db2391c"
7
8DEPENDS = "virtual/kernel make-native"
9
10SRC_URI = "git://github.com/siemens/freertos-cell.git;protocol=https;branch=master; \
11 file://Fix-Makefile.patch \
12 file://Remove-check-of-interrupt-mask.patch \
13 file://Bananapi-config-fix-for-Jailhouse-0.6.patch"
14
15SRCREV = "6ad80637be066d196d81c1640bc1bd5b66e0ec45"
16
17S ="${WORKDIR}/git"
18
19inherit jailhouse-cell
20
21INMATE = "${S}/freertos-demo.bin"
22CELLCONFIG = "${S}/jailhouse-configs/bananapi-freertos-demo.c"
23CELLCONFIG_TARGET = "freertos-cell.c"
24
25
26do_compile() {
27 LDFLAGS="" oe_runmake
28}