summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-extended/images/uxen-guest-image-minimal.bb9
-rw-r--r--recipes-extended/uxen/README.md48
-rw-r--r--recipes-extended/uxen/uxen-guest-tools/fix-Makefile-for-OE-kernel-build.patch36
-rw-r--r--recipes-extended/uxen/uxen-guest-tools_4.1.7.bb22
4 files changed, 115 insertions, 0 deletions
diff --git a/recipes-extended/images/uxen-guest-image-minimal.bb b/recipes-extended/images/uxen-guest-image-minimal.bb
new file mode 100644
index 00000000..d37a95b7
--- /dev/null
+++ b/recipes-extended/images/uxen-guest-image-minimal.bb
@@ -0,0 +1,9 @@
1DESCRIPTION = "A Linux guest image for the uXen type-2 hypervisor."
2LICENSE = "MIT"
3
4inherit core-image
5
6IMAGE_INSTALL += " \
7 packagegroup-core-boot \
8 uxen-guest-tools \
9 "
diff --git a/recipes-extended/uxen/README.md b/recipes-extended/uxen/README.md
new file mode 100644
index 00000000..09733833
--- /dev/null
+++ b/recipes-extended/uxen/README.md
@@ -0,0 +1,48 @@
1# uXen : Open Source type-2 hypervisor support
2
3For any issues with the uXen recipes please make sure you CC:
4
5 christopher.w.clark@gmail.com
6
7## uxen-guest-tools : software for within guest VMs, kernel modules
8
9* uxenhc : hypercall driver
10* uxenfb : framebuffer driver
11* uxenhid : Human Input Device driver
12* uxennet : virtual network device driver
13* uxenplatform : uXen platform device driver
14* uxenstor : virtual storage device driver
15* uxenv4vlib : v4v, Hypervisor-Mediated data eXchange
16* v4vvsock : v4v vsock virtual network device driver
17* v4vtest : basic v4v vsock test
18
19To produce a bootable VM disk image file:
20
21 wic create directdisk -e uxen-guest-image-minimal
22
23To test, copy the .direct file that wic produces to the host with uXen installed and write the following to a new file: `linux-vm.json`. Update the file path within it to point to your wic-generated disk image:
24
25 {
26 "name" : "Linux Virtual Machine",
27 "boot-order" : "c",
28 "block" :
29 { "id": "ich0", "proto" : "raw", "xsnapshot" : true,
30 "path" : "c:/Users/Yocto/directdisk-202001010100-sda.direct" },
31 "memory" : 768,
32 "net" : { "type" : "nic", "model" : "e1000" },
33 "hpet" : 1,
34 "vcpus" : 1,
35 "use-v4v-net" : 1,
36 "v4v-storage" : true,
37
38 "" : ""
39 }
40
41and then boot it:
42
43 uxendm -F linux-vm.json
44
45References:
46 https://www.bromium.com/opensource
47 https://github.com/uxen-virt
48 https://www.platformsecuritysummit.com/2018/speaker/pratt/
diff --git a/recipes-extended/uxen/uxen-guest-tools/fix-Makefile-for-OE-kernel-build.patch b/recipes-extended/uxen/uxen-guest-tools/fix-Makefile-for-OE-kernel-build.patch
new file mode 100644
index 00000000..db4c53f5
--- /dev/null
+++ b/recipes-extended/uxen/uxen-guest-tools/fix-Makefile-for-OE-kernel-build.patch
@@ -0,0 +1,36 @@
1# OpenEmbedded uses KERNEL_SRC instead of KDIR
2# and enable the modules_install target.
3# Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
4diff --git a/Makefile b/Makefile
5index 3fd3075..80cf0fe 100644
6--- a/Makefile
7+++ b/Makefile
8@@ -1,10 +1,13 @@
9 ifneq ($(KERNELRELEASE),)
10 # kbuild part of makefile
11-else
12+include Kbuild
13
14-KVERSION ?= $(shell uname -r)
15-KDIR := /lib/modules/${KVERSION}/build
16+else
17+#normal makefile
18+KERNEL_VERSION ?= $(shell uname -r)
19+KERNEL_SRC ?= /lib/modules/${KERNEL_VERSION}/build
20 UXENDIR ?= $(shell pwd)/include/uxen
21+INSTALL_HDR_PATH ?= /usr
22
23 LX_TARGET_FLAGS= -DLX_TARGET_STANDARDVM
24 LX_TARGET_ATTOVM=n
25@@ -19,7 +22,9 @@ EXTRA_CFLAGS=$(LX_TARGET_FLAGS) -g -Wall
26 NOSTDINC_FLAGS=-I$(shell pwd)/include/ -I$(UXENDIR) -I$(UXENDIR)/xen
27
28 all:
29- make -C $(KDIR) $(LX_TARGET) M=$(shell pwd) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)"
30+ make -C $(KERNEL_SRC) $(LX_TARGET) M=$(shell pwd) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)"
31 clean:
32- make -C $(KDIR) $(LX_TARGET) M=$(shell pwd) clean
33+ make -C $(KERNEL_SRC) $(LX_TARGET) M=$(shell pwd) clean
34+modules_install:
35+ make -C $(KERNEL_SRC) $(LX_TARGET) M=$(shell pwd) modules_install
36 endif
diff --git a/recipes-extended/uxen/uxen-guest-tools_4.1.7.bb b/recipes-extended/uxen/uxen-guest-tools_4.1.7.bb
new file mode 100644
index 00000000..757f1e3b
--- /dev/null
+++ b/recipes-extended/uxen/uxen-guest-tools_4.1.7.bb
@@ -0,0 +1,22 @@
1SUMMARY = "uXen type-2 Open Source hypervisor Linux guest tools"
2DESCRIPTION = "Linux guest virtual machine tools for the uXen hypervisor"
3HOMEPAGE = "https://www.bromium.com/opensource"
4LICENSE = "GPLv2"
5
6COMPATIBLE_HOST = '(x86_64.*).*-linux'
7
8SRC_URI = " \
9 https://www.bromium.com/wp-content/uploads/2019/06/uxen-vmsupport-linux-${PV}.zip;name=uxen \
10 https://www.bromium.com/wp-content/uploads/2019/11/Bromium-4.1.8-Open-Source-Software.pdf;name=license \
11 file://fix-Makefile-for-OE-kernel-build.patch \
12 "
13
14SRC_URI[uxen.sha384sum] = "d9d7a1fa5c44ac77eea3d8d4756f9e07fc02acfe12606325ff0bb8a60c07abc3e9ddb80c2039797fb2122d750219722f"
15SRC_URI[license.sha384sum] = "92e48c614df3094cb52321d4c4e01f6df5526d46aee5c6fa36c43ee23d4c33f03baa1fc5f6f29efafff636b6d13bc92c"
16
17# The software license is GPLv2: please see page 199 of the pdf document
18LIC_FILES_CHKSUM = "file://../Bromium-4.1.8-Open-Source-Software.pdf;md5=cf120df6ffa417b36f870a9997650049"
19
20S = "${WORKDIR}/uxen-vmsupport-linux-${PV}"
21
22inherit module