summaryrefslogtreecommitdiffstats
path: root/recipes-jailhouse/jailhouse
diff options
context:
space:
mode:
authorOla Redell <ola.redell@retotech.se>2017-11-15 21:54:39 +0100
committerOla Redell <ola.redell@retotech.se>2017-11-15 21:54:39 +0100
commit3af813eaa50cc3bf5192c0218cf7e779f9f5af01 (patch)
treedfb2fa235941f723cca0c9b1347fe04597d4bfb8 /recipes-jailhouse/jailhouse
parentf2cccf9409c91a33c4394ca4cfafe1cc00f9ce21 (diff)
downloadmeta-jailhouse-3af813eaa50cc3bf5192c0218cf7e779f9f5af01.tar.gz
Default Jailhouse configuration, add new jailhouse versions
Added variable JH_CONFIG that is used to point to current jailhouse hypervisor configuration. Added recipes for jailhouse version 0.7 and a _git recipe that tracks HEAD on master.
Diffstat (limited to 'recipes-jailhouse/jailhouse')
-rw-r--r--recipes-jailhouse/jailhouse/files/0001-ldflags-for-tools.patch13
-rw-r--r--recipes-jailhouse/jailhouse/files/jailhouse-config-bpi.h9
-rw-r--r--recipes-jailhouse/jailhouse/files/plamics-bpi-root.c221
-rw-r--r--recipes-jailhouse/jailhouse/jailhouse-0.6/0002-no-ldflags-in-tools.patch (renamed from recipes-jailhouse/jailhouse/files/0002-no-ldflags-in-tools.patch)0
-rw-r--r--recipes-jailhouse/jailhouse/jailhouse-0.6/0003-workaround-if-changed-problem-in-tools-makefile.patch (renamed from recipes-jailhouse/jailhouse/files/0003-workaround-if-changed-problem-in-tools-makefile.patch)0
-rw-r--r--recipes-jailhouse/jailhouse/jailhouse-0.6/0004-no-kbuild-of-tools.patch (renamed from recipes-jailhouse/jailhouse/files/0004-no-kbuild-of-tools.patch)0
-rw-r--r--recipes-jailhouse/jailhouse/jailhouse-0.7/0004-no-kbuild-of-tools.patch13
-rw-r--r--recipes-jailhouse/jailhouse/jailhouse-0.7/0005-tools-makefile.patch36
-rw-r--r--recipes-jailhouse/jailhouse/jailhouse.inc7
-rw-r--r--recipes-jailhouse/jailhouse/jailhouse_0.7.bb11
-rw-r--r--recipes-jailhouse/jailhouse/jailhouse_git.bb14
11 files changed, 81 insertions, 243 deletions
diff --git a/recipes-jailhouse/jailhouse/files/0001-ldflags-for-tools.patch b/recipes-jailhouse/jailhouse/files/0001-ldflags-for-tools.patch
deleted file mode 100644
index 47b79ed..0000000
--- a/recipes-jailhouse/jailhouse/files/0001-ldflags-for-tools.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1diff --git a/tools/Makefile b/tools/Makefile
2index 4d91e7a..ecc5503 100644
3--- a/tools/Makefile
4+++ b/tools/Makefile
5@@ -19,7 +19,7 @@ LINUXINCLUDE := -I$(src)/../driver
6 KBUILD_CFLAGS := -g -O3 -DLIBEXECDIR=\"$(libexecdir)\" \
7 -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \
8 -DJAILHOUSE_VERSION=\"$(shell cat $(src)/../VERSION)\" $(EXTRA_CFLAGS)
9-LDFLAGS :=
10+LDFLAGS := $(EXTRA_LDLAGS)
11
12 BINARIES := jailhouse
13 HELPERS := \
diff --git a/recipes-jailhouse/jailhouse/files/jailhouse-config-bpi.h b/recipes-jailhouse/jailhouse/files/jailhouse-config-bpi.h
deleted file mode 100644
index 91f651c..0000000
--- a/recipes-jailhouse/jailhouse/files/jailhouse-config-bpi.h
+++ /dev/null
@@ -1,9 +0,0 @@
1#define CONFIG_ARM_GIC_V2 1
2#define CONFIG_MACH_SUN7I 1
3
4/* Enable error tracing,
5 * c.f. https://github.com/siemens/jailhouse/blob/master/FAQ.md
6 * (Redefine macro:
7 * jailhouse/hypervisor/include/jailhouse/printk.h:trace_error(code)).
8 */
9#define CONFIG_TRACE_ERROR
diff --git a/recipes-jailhouse/jailhouse/files/plamics-bpi-root.c b/recipes-jailhouse/jailhouse/files/plamics-bpi-root.c
deleted file mode 100644
index 3d7b79f..0000000
--- a/recipes-jailhouse/jailhouse/files/plamics-bpi-root.c
+++ /dev/null
@@ -1,221 +0,0 @@
1/*
2 * Jailhouse, a Linux-based partitioning hypervisor
3 *
4 * Test configuration for Banana Pi board (A20 dual-core Cortex-A7, 1G RAM)
5 *
6 * Copyright (c) Siemens AG, 2014
7 *
8 * Authors:
9 * Jan Kiszka <jan.kiszka@siemens.com>
10 *
11 * This work is licensed under the terms of the GNU GPL, version 2. See
12 * the COPYING file in the top-level directory.
13 */
14
15#include <jailhouse/types.h>
16#include <jailhouse/cell-config.h>
17
18#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
19
20struct {
21 struct jailhouse_system header;
22 __u64 cpus[1];
23 struct jailhouse_memory mem_regions[18];
24 struct jailhouse_irqchip irqchips[1];
25 struct jailhouse_pci_device pci_devices[1];
26} __attribute__((packed)) config = {
27 .header = {
28 .signature = JAILHOUSE_SYSTEM_SIGNATURE,
29 .revision = JAILHOUSE_CONFIG_REVISION,
30 .hypervisor_memory = {
31 .phys_start = 0x7c000000,
32 .size = 0x4000000,
33 },
34 .debug_console = {
35 .address = 0x01c28000,
36 .size = 0x1000,
37 /* .clock_reg = 0x01c2006c, */
38 /* .gate_nr = 16 */
39 /* .divider = 0x0d, */
40 .flags = JAILHOUSE_CON_TYPE_8250 |
41 JAILHOUSE_CON_FLAG_MMIO,
42 },
43 .platform_info = {
44 .pci_mmconfig_base = 0x2000000,
45 .pci_mmconfig_end_bus = 0,
46 .pci_is_virtual = 1,
47 .arm = {
48 .gicd_base = 0x01c81000,
49 .gicc_base = 0x01c82000,
50 .gich_base = 0x01c84000,
51 .gicv_base = 0x01c86000,
52 .maintenance_irq = 25,
53 },
54 },
55 .root_cell = {
56 .name = "Banana-Pi",
57
58 .cpu_set_size = sizeof(config.cpus),
59 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
60 .num_irqchips = ARRAY_SIZE(config.irqchips),
61 .num_pci_devices = ARRAY_SIZE(config.pci_devices),
62
63 .vpci_irq_base = 108,
64 },
65 },
66
67 .cpus = {
68 0x3,
69 },
70
71 .mem_regions = {
72 /* SPI */ {
73 .phys_start = 0x01c05000,
74 .virt_start = 0x01c05000,
75 .size = 0x00001000,
76 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
77 JAILHOUSE_MEM_IO,
78 },
79 /* MMC */ {
80 .phys_start = 0x01c0f000,
81 .virt_start = 0x01c0f000,
82 .size = 0x00001000,
83 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
84 JAILHOUSE_MEM_IO,
85 },
86 /* USB + PMU1 */ {
87 .phys_start = 0x01c14000,
88 .virt_start = 0x01c14000,
89 .size = 0x00001000,
90 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
91 JAILHOUSE_MEM_IO,
92 },
93 /* SATA */ {
94 .phys_start = 0x01c18000,
95 .virt_start = 0x01c18000,
96 .size = 0x00001000,
97 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
98 JAILHOUSE_MEM_IO,
99 },
100 /* USB + PMU2 */ {
101 .phys_start = 0x01c1c000,
102 .virt_start = 0x01c1c000,
103 .size = 0x00001000,
104 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
105 JAILHOUSE_MEM_IO,
106 },
107 /* CCU */ {
108 .phys_start = 0x01c20000,
109 .virt_start = 0x01c20000,
110 .size = 0x400,
111 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
112 JAILHOUSE_MEM_IO | JAILHOUSE_MEM_IO_32,
113 },
114 /* Ints */ {
115 .phys_start = 0x01c20400,
116 .virt_start = 0x01c20400,
117 .size = 0x400,
118 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
119 JAILHOUSE_MEM_IO | JAILHOUSE_MEM_IO_32,
120 },
121 /* GPIO: ports A-G */ {
122 .phys_start = 0x01c20800,
123 .virt_start = 0x01c20800,
124 .size = 0xfc,
125 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
126 JAILHOUSE_MEM_IO | JAILHOUSE_MEM_IO_32,
127 },
128 /* GPIO: port H */ {
129 .phys_start = 0x01c208fc,
130 .virt_start = 0x01c208fc,
131 .size = 0x24,
132 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
133 JAILHOUSE_MEM_IO | JAILHOUSE_MEM_IO_32,
134 },
135 /* GPIO: port I */ {
136 .phys_start = 0x01c20920,
137 .virt_start = 0x01c20920,
138 .size = 0x24,
139 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
140 JAILHOUSE_MEM_IO | JAILHOUSE_MEM_IO_32,
141 },
142 /* GPIO: intr config */ {
143 .phys_start = 0x01c20a00,
144 .virt_start = 0x01c20a00,
145 .size = 0x1c,
146 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
147 JAILHOUSE_MEM_IO | JAILHOUSE_MEM_IO_32,
148 },
149 /* Timer */ {
150 .phys_start = 0x01c20c00,
151 .virt_start = 0x01c20c00,
152 .size = 0x400,
153 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
154 JAILHOUSE_MEM_IO | JAILHOUSE_MEM_IO_32,
155 },
156 /* UART0-3 */ {
157 .phys_start = 0x01c28000,
158 .virt_start = 0x01c28000,
159 .size = 0x1000,
160 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
161 JAILHOUSE_MEM_IO,
162 },
163 /* GMAC */ {
164 .phys_start = 0x01c50000,
165 .virt_start = 0x01c50000,
166 .size = 0x00010000,
167 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
168 JAILHOUSE_MEM_IO,
169 },
170 /* HSTIMER */ {
171 .phys_start = 0x01c60000,
172 .virt_start = 0x01c60000,
173 .size = 0x00001000,
174 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
175 JAILHOUSE_MEM_IO,
176 },
177 /* RAM */ {
178 .phys_start = 0x40000000,
179 .virt_start = 0x40000000,
180 .size = 0x3bf00000,
181 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
182 JAILHOUSE_MEM_EXECUTE,
183 },
184 /* IVSHMEM shared memory region */ {
185 .phys_start = 0x7bf00000,
186 .virt_start = 0x7bf00000,
187 .size = 0x100000,
188 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
189 },
190 /* Framebuffer */ {
191 .phys_start = 0x7f700000,
192 .virt_start = 0x7f700000,
193 .size = 9<<20,
194 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
195 JAILHOUSE_MEM_IO,
196 },
197 },
198
199 .irqchips = {
200 /* GIC */ {
201 .address = 0x01c81000,
202 .pin_base = 32,
203 .pin_bitmap = {
204 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
205 },
206 },
207 },
208
209 .pci_devices = {
210 {
211 .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
212 .bdf = 0x00,
213 .bar_mask = {
214 0xffffff00, 0xffffffff, 0x00000000,
215 0x00000000, 0x00000000, 0x00000000,
216 },
217 .shmem_region = 16,
218 .shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED,
219 },
220 },
221};
diff --git a/recipes-jailhouse/jailhouse/files/0002-no-ldflags-in-tools.patch b/recipes-jailhouse/jailhouse/jailhouse-0.6/0002-no-ldflags-in-tools.patch
index e94f69d..e94f69d 100644
--- a/recipes-jailhouse/jailhouse/files/0002-no-ldflags-in-tools.patch
+++ b/recipes-jailhouse/jailhouse/jailhouse-0.6/0002-no-ldflags-in-tools.patch
diff --git a/recipes-jailhouse/jailhouse/files/0003-workaround-if-changed-problem-in-tools-makefile.patch b/recipes-jailhouse/jailhouse/jailhouse-0.6/0003-workaround-if-changed-problem-in-tools-makefile.patch
index 7d02b55..7d02b55 100644
--- a/recipes-jailhouse/jailhouse/files/0003-workaround-if-changed-problem-in-tools-makefile.patch
+++ b/recipes-jailhouse/jailhouse/jailhouse-0.6/0003-workaround-if-changed-problem-in-tools-makefile.patch
diff --git a/recipes-jailhouse/jailhouse/files/0004-no-kbuild-of-tools.patch b/recipes-jailhouse/jailhouse/jailhouse-0.6/0004-no-kbuild-of-tools.patch
index 4e0f337..4e0f337 100644
--- a/recipes-jailhouse/jailhouse/files/0004-no-kbuild-of-tools.patch
+++ b/recipes-jailhouse/jailhouse/jailhouse-0.6/0004-no-kbuild-of-tools.patch
diff --git a/recipes-jailhouse/jailhouse/jailhouse-0.7/0004-no-kbuild-of-tools.patch b/recipes-jailhouse/jailhouse/jailhouse-0.7/0004-no-kbuild-of-tools.patch
new file mode 100644
index 0000000..30d3b6d
--- /dev/null
+++ b/recipes-jailhouse/jailhouse/jailhouse-0.7/0004-no-kbuild-of-tools.patch
@@ -0,0 +1,13 @@
1Index: git/Kbuild
2===================================================================
3--- git.orig/Kbuild
4+++ git/Kbuild
5@@ -53,7 +53,7 @@ $(obj)/driver $(obj)/hypervisor: $(GEN_V
6
7 endif
8
9-subdir-y := driver hypervisor configs inmates tools
10+subdir-y := driver hypervisor configs inmates
11
12 subdir-ccflags-y := -Werror
13
diff --git a/recipes-jailhouse/jailhouse/jailhouse-0.7/0005-tools-makefile.patch b/recipes-jailhouse/jailhouse/jailhouse-0.7/0005-tools-makefile.patch
new file mode 100644
index 0000000..ea041a9
--- /dev/null
+++ b/recipes-jailhouse/jailhouse/jailhouse-0.7/0005-tools-makefile.patch
@@ -0,0 +1,36 @@
1Index: git/tools/Makefile
2===================================================================
3--- git.orig/tools/Makefile
4+++ git/tools/Makefile
5@@ -19,7 +19,7 @@ LINUXINCLUDE := -I$(src)/../driver
6 KBUILD_CFLAGS := -g -O3 -DLIBEXECDIR=\"$(libexecdir)\" \
7 -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \
8 -DJAILHOUSE_VERSION=\"$(shell cat $(src)/../VERSION)\" $(EXTRA_CFLAGS)
9-LDFLAGS :=
10+
11 GCOV_PROFILE := n
12
13 BINARIES := jailhouse
14@@ -57,7 +57,7 @@ endef
15 targets += jailhouse.o
16
17 $(obj)/jailhouse: $(obj)/jailhouse.o
18- $(call if_changed,ld)
19+ $(LD) $(LDFLAGS) -o $@ $^
20
21 CFLAGS_jailhouse-gcov-extract.o := -I$(src)/../hypervisor/include \
22 -I$(src)/../hypervisor/arch/$(SRCARCH)/include
23@@ -68,10 +68,11 @@ targets += jailhouse-gcov-extract.o
24 always += jailhouse-gcov-extract
25
26 $(obj)/jailhouse-gcov-extract: $(obj)/jailhouse-gcov-extract.o
27- $(call if_changed,ld)
28+ $(LD) $(LDFLAGS) -o $@ $^
29
30 $(obj)/jailhouse-config-collect: $(src)/jailhouse-config-create $(src)/jailhouse-config-collect.tmpl
31- $(call if_changed,gen_collect)
32+ $< -g $@; \
33+ chmod +x $@
34
35 install-bin: $(BINARIES) $(DESTDIR)$(sbindir)
36 $(INSTALL_PROGRAM) $^
diff --git a/recipes-jailhouse/jailhouse/jailhouse.inc b/recipes-jailhouse/jailhouse/jailhouse.inc
index fb6b021..2b13832 100644
--- a/recipes-jailhouse/jailhouse/jailhouse.inc
+++ b/recipes-jailhouse/jailhouse/jailhouse.inc
@@ -17,11 +17,18 @@ S ="${WORKDIR}/git"
17require jailhouse-defs.inc 17require jailhouse-defs.inc
18inherit module pythonnative bash-completion 18inherit module pythonnative bash-completion
19 19
20JH_CONFIG ?= "${S}/ci/jailhouse-config-x86.h"
21JH_CONFIG_x86 ?= "${S}/ci/jailhouse-config-x86.h"
22JH_CONFIG_x86-64 ?= "${S}/ci/jailhouse-config-x86.h"
23JH_CONFIG_arm ?= "${S}/ci/jailhouse-config-banana-pi.h"
24
20do_configure() { 25do_configure() {
21 if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; 26 if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
22 then 27 then
23 cp "${STAGING_DIR_HOST}/${CELLCONF_DIR}/"*.c ${S}/configs/ 28 cp "${STAGING_DIR_HOST}/${CELLCONF_DIR}/"*.c ${S}/configs/
24 fi 29 fi
30
31 cp -av ${JH_CONFIG} ${S}/hypervisor/include/jailhouse/config.h
25} 32}
26 33
27USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \ 34USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
diff --git a/recipes-jailhouse/jailhouse/jailhouse_0.7.bb b/recipes-jailhouse/jailhouse/jailhouse_0.7.bb
new file mode 100644
index 0000000..dcc6af5
--- /dev/null
+++ b/recipes-jailhouse/jailhouse/jailhouse_0.7.bb
@@ -0,0 +1,11 @@
1require jailhouse.inc
2
3SRC_URI = "git://github.com/siemens/jailhouse.git;protocol=git \
4 file://0004-no-kbuild-of-tools.patch \
5 file://0005-tools-makefile.patch \
6 "
7
8SRCREV = "5c13b6409b6088ab717e8af444e11839868302eb"
9
10CELLS = ""
11
diff --git a/recipes-jailhouse/jailhouse/jailhouse_git.bb b/recipes-jailhouse/jailhouse/jailhouse_git.bb
new file mode 100644
index 0000000..ec7c0e1
--- /dev/null
+++ b/recipes-jailhouse/jailhouse/jailhouse_git.bb
@@ -0,0 +1,14 @@
1require jailhouse.inc
2
3FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-0.7:"
4
5SRC_URI = "git://github.com/siemens/jailhouse.git;protocol=git \
6 file://0004-no-kbuild-of-tools.patch \
7 file://0005-tools-makefile.patch \
8 "
9
10SRCREV = "${AUTOREV}"
11PV = "0.7-git${SRCPV}"
12
13CELLS = ""
14