* [meta-virtualization][PATCH] uxen-guest-tools, image: package the Linux VM tools for uXen hypervisor
@ 2020-02-25 0:37 Christopher Clark
2020-02-27 22:00 ` Bruce Ashfield
0 siblings, 1 reply; 2+ messages in thread
From: Christopher Clark @ 2020-02-25 0:37 UTC (permalink / raw)
To: meta-virtualization; +Cc: bruce.ashfield
From: Christopher Clark <christopher.w.clark@gmail.com>
uXen is a type-2 Open Source hypervisor from Bromium/HP.
https://www.bromium.com/opensource/
This adds packaging for the Linux guest support software, enabling OE
to produce VM images to run on the uXen hypervisor.
uxen-guest-tools: in-guest software device drivers
uxen-guest-image-minimal : minimal core image with uXen drivers
Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
---
.../images/uxen-guest-image-minimal.bb | 9 ++++
recipes-extended/uxen/README.md | 48 +++++++++++++++++++
.../fix-Makefile-for-OE-kernel-build.patch | 36 ++++++++++++++
.../uxen/uxen-guest-tools_4.1.7.bb | 22 +++++++++
4 files changed, 115 insertions(+)
create mode 100644 recipes-extended/images/uxen-guest-image-minimal.bb
create mode 100644 recipes-extended/uxen/README.md
create mode 100644 recipes-extended/uxen/uxen-guest-tools/fix-Makefile-for-OE-kernel-build.patch
create mode 100644 recipes-extended/uxen/uxen-guest-tools_4.1.7.bb
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 0000000..d37a95b
--- /dev/null
+++ b/recipes-extended/images/uxen-guest-image-minimal.bb
@@ -0,0 +1,9 @@
+DESCRIPTION = "A Linux guest image for the uXen type-2 hypervisor."
+LICENSE = "MIT"
+
+inherit core-image
+
+IMAGE_INSTALL += " \
+ packagegroup-core-boot \
+ uxen-guest-tools \
+ "
diff --git a/recipes-extended/uxen/README.md b/recipes-extended/uxen/README.md
new file mode 100644
index 0000000..0973383
--- /dev/null
+++ b/recipes-extended/uxen/README.md
@@ -0,0 +1,48 @@
+# uXen : Open Source type-2 hypervisor support
+
+For any issues with the uXen recipes please make sure you CC:
+
+ christopher.w.clark@gmail.com
+
+## uxen-guest-tools : software for within guest VMs, kernel modules
+
+* uxenhc : hypercall driver
+* uxenfb : framebuffer driver
+* uxenhid : Human Input Device driver
+* uxennet : virtual network device driver
+* uxenplatform : uXen platform device driver
+* uxenstor : virtual storage device driver
+* uxenv4vlib : v4v, Hypervisor-Mediated data eXchange
+* v4vvsock : v4v vsock virtual network device driver
+* v4vtest : basic v4v vsock test
+
+To produce a bootable VM disk image file:
+
+ wic create directdisk -e uxen-guest-image-minimal
+
+To 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:
+
+ {
+ "name" : "Linux Virtual Machine",
+ "boot-order" : "c",
+ "block" :
+ { "id": "ich0", "proto" : "raw", "xsnapshot" : true,
+ "path" : "c:/Users/Yocto/directdisk-202001010100-sda.direct" },
+ "memory" : 768,
+ "net" : { "type" : "nic", "model" : "e1000" },
+ "hpet" : 1,
+ "vcpus" : 1,
+ "use-v4v-net" : 1,
+ "v4v-storage" : true,
+
+ "" : ""
+ }
+
+and then boot it:
+
+ uxendm -F linux-vm.json
+
+References:
+ https://www.bromium.com/opensource
+ https://github.com/uxen-virt
+ 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 0000000..651d991
--- /dev/null
+++ b/recipes-extended/uxen/uxen-guest-tools/fix-Makefile-for-OE-kernel-build.patch
@@ -0,0 +1,36 @@
+# OpenEmbedded uses KERNEL_SRC instead of KDIR
+# and enable the modules_install target.
+# Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
+diff --git a/Makefile b/Makefile
+index 3fd3075..80cf0fe 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,10 +1,13 @@
+ ifneq ($(KERNELRELEASE),)
+ # kbuild part of makefile
+-else
++include Kbuild
+
+-KVERSION ?= $(shell uname -r)
+-KDIR := /lib/modules/${KVERSION}/build
++else
++#normal makefile
++KERNEL_VERSION ?= $(shell uname -r)
++KERNEL_SRC ?= /lib/modules/${KERNEL_VERSION}/build
+ UXENDIR ?= $(shell pwd)/include/uxen
++INSTALL_HDR_PATH ?= /usr
+
+ LX_TARGET_FLAGS= -DLX_TARGET_STANDARDVM
+ LX_TARGET_ATTOVM=n
+@@ -19,7 +22,9 @@ EXTRA_CFLAGS=$(LX_TARGET_FLAGS) -g -Wall
+ NOSTDINC_FLAGS=-I$(shell pwd)/include/ -I$(UXENDIR) -I$(UXENDIR)/xen
+
+ all:
+- make -C $(KDIR) $(LX_TARGET) M=$(shell pwd) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)"
++ make -C $(KERNEL_SRC) $(LX_TARGET) M=$(shell pwd) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)"
+ clean:
+- make -C $(KDIR) $(LX_TARGET) M=$(shell pwd) clean
++ make -C $(KERNEL_SRC) $(LX_TARGET) M=$(shell pwd) clean
++modules_install:
++ make -C $(KERNEL_SRC) $(LX_TARGET) M=$(shell pwd) modules_install
+ 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 0000000..757f1e3
--- /dev/null
+++ b/recipes-extended/uxen/uxen-guest-tools_4.1.7.bb
@@ -0,0 +1,22 @@
+SUMMARY = "uXen type-2 Open Source hypervisor Linux guest tools"
+DESCRIPTION = "Linux guest virtual machine tools for the uXen hypervisor"
+HOMEPAGE = "https://www.bromium.com/opensource"
+LICENSE = "GPLv2"
+
+COMPATIBLE_HOST = '(x86_64.*).*-linux'
+
+SRC_URI = " \
+ https://www.bromium.com/wp-content/uploads/2019/06/uxen-vmsupport-linux-${PV}.zip;name=uxen \
+ https://www.bromium.com/wp-content/uploads/2019/11/Bromium-4.1.8-Open-Source-Software.pdf;name=license \
+ file://fix-Makefile-for-OE-kernel-build.patch \
+ "
+
+SRC_URI[uxen.sha384sum] = "d9d7a1fa5c44ac77eea3d8d4756f9e07fc02acfe12606325ff0bb8a60c07abc3e9ddb80c2039797fb2122d750219722f"
+SRC_URI[license.sha384sum] = "92e48c614df3094cb52321d4c4e01f6df5526d46aee5c6fa36c43ee23d4c33f03baa1fc5f6f29efafff636b6d13bc92c"
+
+# The software license is GPLv2: please see page 199 of the pdf document
+LIC_FILES_CHKSUM = "file://../Bromium-4.1.8-Open-Source-Software.pdf;md5=cf120df6ffa417b36f870a9997650049"
+
+S = "${WORKDIR}/uxen-vmsupport-linux-${PV}"
+
+inherit module
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [meta-virtualization][PATCH] uxen-guest-tools, image: package the Linux VM tools for uXen hypervisor
2020-02-25 0:37 [meta-virtualization][PATCH] uxen-guest-tools, image: package the Linux VM tools for uXen hypervisor Christopher Clark
@ 2020-02-27 22:00 ` Bruce Ashfield
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2020-02-27 22:00 UTC (permalink / raw)
To: christopher.w.clark; +Cc: meta-virtualization
In message: [meta-virtualization][PATCH] uxen-guest-tools, image: package the Linux VM tools for uXen hypervisor
on 24/02/2020 christopher.w.clark@gmail.com wrote:
> From: Christopher Clark <christopher.w.clark@gmail.com>
>
> uXen is a type-2 Open Source hypervisor from Bromium/HP.
> https://www.bromium.com/opensource/
>
> This adds packaging for the Linux guest support software, enabling OE
> to produce VM images to run on the uXen hypervisor.
>
> uxen-guest-tools: in-guest software device drivers
> uxen-guest-image-minimal : minimal core image with uXen drivers
merged.
Bruce
>
> Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
> ---
> .../images/uxen-guest-image-minimal.bb | 9 ++++
> recipes-extended/uxen/README.md | 48 +++++++++++++++++++
> .../fix-Makefile-for-OE-kernel-build.patch | 36 ++++++++++++++
> .../uxen/uxen-guest-tools_4.1.7.bb | 22 +++++++++
> 4 files changed, 115 insertions(+)
> create mode 100644 recipes-extended/images/uxen-guest-image-minimal.bb
> create mode 100644 recipes-extended/uxen/README.md
> create mode 100644 recipes-extended/uxen/uxen-guest-tools/fix-Makefile-for-OE-kernel-build.patch
> create mode 100644 recipes-extended/uxen/uxen-guest-tools_4.1.7.bb
>
> 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 0000000..d37a95b
> --- /dev/null
> +++ b/recipes-extended/images/uxen-guest-image-minimal.bb
> @@ -0,0 +1,9 @@
> +DESCRIPTION = "A Linux guest image for the uXen type-2 hypervisor."
> +LICENSE = "MIT"
> +
> +inherit core-image
> +
> +IMAGE_INSTALL += " \
> + packagegroup-core-boot \
> + uxen-guest-tools \
> + "
> diff --git a/recipes-extended/uxen/README.md b/recipes-extended/uxen/README.md
> new file mode 100644
> index 0000000..0973383
> --- /dev/null
> +++ b/recipes-extended/uxen/README.md
> @@ -0,0 +1,48 @@
> +# uXen : Open Source type-2 hypervisor support
> +
> +For any issues with the uXen recipes please make sure you CC:
> +
> + christopher.w.clark@gmail.com
> +
> +## uxen-guest-tools : software for within guest VMs, kernel modules
> +
> +* uxenhc : hypercall driver
> +* uxenfb : framebuffer driver
> +* uxenhid : Human Input Device driver
> +* uxennet : virtual network device driver
> +* uxenplatform : uXen platform device driver
> +* uxenstor : virtual storage device driver
> +* uxenv4vlib : v4v, Hypervisor-Mediated data eXchange
> +* v4vvsock : v4v vsock virtual network device driver
> +* v4vtest : basic v4v vsock test
> +
> +To produce a bootable VM disk image file:
> +
> + wic create directdisk -e uxen-guest-image-minimal
> +
> +To 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:
> +
> + {
> + "name" : "Linux Virtual Machine",
> + "boot-order" : "c",
> + "block" :
> + { "id": "ich0", "proto" : "raw", "xsnapshot" : true,
> + "path" : "c:/Users/Yocto/directdisk-202001010100-sda.direct" },
> + "memory" : 768,
> + "net" : { "type" : "nic", "model" : "e1000" },
> + "hpet" : 1,
> + "vcpus" : 1,
> + "use-v4v-net" : 1,
> + "v4v-storage" : true,
> +
> + "" : ""
> + }
> +
> +and then boot it:
> +
> + uxendm -F linux-vm.json
> +
> +References:
> + https://www.bromium.com/opensource
> + https://github.com/uxen-virt
> + 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 0000000..651d991
> --- /dev/null
> +++ b/recipes-extended/uxen/uxen-guest-tools/fix-Makefile-for-OE-kernel-build.patch
> @@ -0,0 +1,36 @@
> +# OpenEmbedded uses KERNEL_SRC instead of KDIR
> +# and enable the modules_install target.
> +# Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
> +diff --git a/Makefile b/Makefile
> +index 3fd3075..80cf0fe 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -1,10 +1,13 @@
> + ifneq ($(KERNELRELEASE),)
> + # kbuild part of makefile
> +-else
> ++include Kbuild
> +
> +-KVERSION ?= $(shell uname -r)
> +-KDIR := /lib/modules/${KVERSION}/build
> ++else
> ++#normal makefile
> ++KERNEL_VERSION ?= $(shell uname -r)
> ++KERNEL_SRC ?= /lib/modules/${KERNEL_VERSION}/build
> + UXENDIR ?= $(shell pwd)/include/uxen
> ++INSTALL_HDR_PATH ?= /usr
> +
> + LX_TARGET_FLAGS= -DLX_TARGET_STANDARDVM
> + LX_TARGET_ATTOVM=n
> +@@ -19,7 +22,9 @@ EXTRA_CFLAGS=$(LX_TARGET_FLAGS) -g -Wall
> + NOSTDINC_FLAGS=-I$(shell pwd)/include/ -I$(UXENDIR) -I$(UXENDIR)/xen
> +
> + all:
> +- make -C $(KDIR) $(LX_TARGET) M=$(shell pwd) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)"
> ++ make -C $(KERNEL_SRC) $(LX_TARGET) M=$(shell pwd) EXTRA_CFLAGS="$(EXTRA_CFLAGS)" NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)"
> + clean:
> +- make -C $(KDIR) $(LX_TARGET) M=$(shell pwd) clean
> ++ make -C $(KERNEL_SRC) $(LX_TARGET) M=$(shell pwd) clean
> ++modules_install:
> ++ make -C $(KERNEL_SRC) $(LX_TARGET) M=$(shell pwd) modules_install
> + 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 0000000..757f1e3
> --- /dev/null
> +++ b/recipes-extended/uxen/uxen-guest-tools_4.1.7.bb
> @@ -0,0 +1,22 @@
> +SUMMARY = "uXen type-2 Open Source hypervisor Linux guest tools"
> +DESCRIPTION = "Linux guest virtual machine tools for the uXen hypervisor"
> +HOMEPAGE = "https://www.bromium.com/opensource"
> +LICENSE = "GPLv2"
> +
> +COMPATIBLE_HOST = '(x86_64.*).*-linux'
> +
> +SRC_URI = " \
> + https://www.bromium.com/wp-content/uploads/2019/06/uxen-vmsupport-linux-${PV}.zip;name=uxen \
> + https://www.bromium.com/wp-content/uploads/2019/11/Bromium-4.1.8-Open-Source-Software.pdf;name=license \
> + file://fix-Makefile-for-OE-kernel-build.patch \
> + "
> +
> +SRC_URI[uxen.sha384sum] = "d9d7a1fa5c44ac77eea3d8d4756f9e07fc02acfe12606325ff0bb8a60c07abc3e9ddb80c2039797fb2122d750219722f"
> +SRC_URI[license.sha384sum] = "92e48c614df3094cb52321d4c4e01f6df5526d46aee5c6fa36c43ee23d4c33f03baa1fc5f6f29efafff636b6d13bc92c"
> +
> +# The software license is GPLv2: please see page 199 of the pdf document
> +LIC_FILES_CHKSUM = "file://../Bromium-4.1.8-Open-Source-Software.pdf;md5=cf120df6ffa417b36f870a9997650049"
> +
> +S = "${WORKDIR}/uxen-vmsupport-linux-${PV}"
> +
> +inherit module
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-27 22:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-25 0:37 [meta-virtualization][PATCH] uxen-guest-tools, image: package the Linux VM tools for uXen hypervisor Christopher Clark
2020-02-27 22:00 ` Bruce Ashfield
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.