Xen on Raspberry Pi 4
v2 cover Xen on Raspberry Pi 4
Changes since v1:
- rebased on to current meta-virtualization, meta-openembedded, poky
- updated Xen revision to the tip of stable 4.13
- fixed Xen build on ARM64 with gcc 10.1.0
- added upstream debugger patch to fix compiler warning
This series introduces support for running Xen on the Raspberry Pi 4 board, with meta-virtualization and meta-raspberrypi, using the linux-raspberrypi kernel at version 5.4 which is the current linux-yocto kernel version supported in this layer.
It introduces use of dynamic layers to handle configuration that is both Xen and Raspberry Pi specific, and inclusion of Xen-specific configuration when the 'xen' DISTRO_FEATURE is enabled to simplify Xen image builds.
It applies a backported set of Xen-specific Linux kernel patches, developed by upstream Xen developers working with the Linux Foundation Eve Project, that are currently being iterated on for inclusion in the Linux kernel.
Xen is uprev'd to version 4.13; this is currently compile-and-boot-tested only on this RPi4 board.
Christopher
Christopher Clark (11):
xen: apply layer settings when xen DISTRO_FEATURE is enabled
xen-tools: add RRECOMENDS qemu on ARM and x86 when HVM is enabled
xen-tools: use non-busybox ifupdown tool if available xen, xen-tools: update revision to Xen 4.13 meta-virt-xen.inc: add Raspberry Pi settings
xen, raspberry pi: add dynamic-layer for Xen configuration for Rpi4 xen, raspberry pi 4: provide a default defconfig for raspberrypi4 xen, linux-raspberrypi: add Linux kernel 5.4 patches for Xen support xen, raspberry pi: add Xen-specific SD card class
linux-raspberrypi: prefer kernel version 5.4
xen: add patch to fix build on ARM64 with gcc 10.1.0
classes/meta-virt-xen-cfg.bbclass | 6 + classes/sdcard_image-rpi-xen.bbclass | 120 ++++ conf/distro/include/meta-virt-xen.inc | 19 + conf/layer.conf | 19 +- .../bootfiles/rpi-config_git.bbappend | 6 + .../rpi-u-boot-scr/files/boot.cmd.xen.in | 49 ++ .../rpi-u-boot-scr/rpi-u-boot-scr.bbappend | 17 + .../xen/files/defconfig_raspberrypi4-64 | 117 ++++ .../recipes-extended/xen/xen_git.bbappend | 11 + ...vmalloc_to_page-on-vmalloc-virt-addr.patch | 44 ++ ...02-swiotlb-xen-remove-start_dma_addr.patch | 47 ++ ...struct-device-parameter-to-xen_phys_.patch | 78 +++ ...struct-device-parameter-to-xen_bus_t.patch | 66 +++ ...struct-device-parameter-to-is_xen_sw.patch | 57 ++ ...oduce-phys_to_dma-dma_to_phys-transl.patch | 88 +++ ...translations-in-xen_dma_s_kernel_5.4.patch | 68 +++ ..._to_phys-on-the-dma_addr_t-parameter.patch | 75 +++ .../0011-adding-page-coherent-patch.patch | 39 ++ .../linux/linux-raspberrypi_%.bbappend | 5 + .../linux/linux-raspberrypi_5.4.bbappend | 19 + ...xen-build-temporarily-inhibit-Werror.patch | 18 +- ...xen-arm64-implement-atomic-fetch-add.patch | 50 ++ ...g-0-arrays-to-access-packet-contents.patch | 60 ++ .../files/xen-tools-libxl-gentypes-py3.patch | 140 ----- ...tools-pygrub-change-tabs-into-spaces.patch | 40 -- ...-python-scripts-work-with-2.6-and-up.patch | 529 ------------------ .../xen/files/xen-tools-pygrub-py3.patch | 233 -------- ...ls-python-fix-Wsign-compare-warnings.patch | 136 ----- ...n-tools-update-python-scripts-to-py3.patch | 140 ----- recipes-extended/xen/xen-tools.inc | 16 + recipes-extended/xen/xen-tools_git.bb | 13 +- recipes-extended/xen/xen_git.bb | 11 +- 32 files changed, 1102 insertions(+), 1234 deletions(-) create mode 100644 classes/meta-virt-xen-cfg.bbclass create mode 100644 classes/sdcard_image-rpi-xen.bbclass create mode 100644 conf/distro/include/meta-virt-xen.inc create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.xen.in create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/files/defconfig_raspberrypi4-64 create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/xen_git.bbappend create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0001-swiotlb-xen-use-vmalloc_to_page-on-vmalloc-virt-addr.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0002-swiotlb-xen-remove-start_dma_addr.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0003-swiotlb-xen-add-struct-device-parameter-to-xen_phys_.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0004-swiotlb-xen-add-struct-device-parameter-to-xen_bus_t.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0007-swiotlb-xen-add-struct-device-parameter-to-is_xen_sw.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0008-swiotlb-xen-introduce-phys_to_dma-dma_to_phys-transl.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0009-xen-arm-introduce-phys-dma-translations-in-xen_dma_s_kernel_5.4.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0010-xen-arm-call-dma_to_phys-on-the-dma_addr_t-parameter.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0011-adding-page-coherent-patch.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bbappend create mode 100644 recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch create mode 100644 recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch delete mode 100644 recipes-extended/xen/files/xen-tools-libxl-gentypes-py3.patch delete mode 100644 recipes-extended/xen/files/xen-tools-pygrub-change-tabs-into-spaces.patch delete mode 100644 recipes-extended/xen/files/xen-tools-pygrub-make-python-scripts-work-with-2.6-and-up.patch delete mode 100644 recipes-extended/xen/files/xen-tools-pygrub-py3.patch delete mode 100644 recipes-extended/xen/files/xen-tools-python-fix-Wsign-compare-warnings.patch delete mode 100644 recipes-extended/xen/files/xen-tools-update-python-scripts-to-py3.patch
Signature · 1 line
2.17.1
PATCH v2 1/11 xen: apply layer settings when xen DISTRO_FEATURE is enabled
These settings are necessary for Xen and enabling them here, using the same mechanism that is used by k8s in this layer, simplifies building images for Xen.
- Ensure that Xen mode is enabled in QEMU.
- On ARM platforms: enable Flattened Device Tree (FDT) support.
--- classes/meta-virt-xen-cfg.bbclass | 6 ++++++ conf/distro/include/meta-virt-xen.inc | 6 ++++++ conf/layer.conf | 4 +++- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 classes/meta-virt-xen-cfg.bbclass create mode 100644 conf/distro/include/meta-virt-xen.inc
classes/meta-virt-xen-cfg.bbclass new file +6 -0
@@ -0,0 +1,6 @@ +# We need to load the Xen meta-virt config components, only if "xen" +# is in the distro features. Since we don't know the distro flags during +# layer.conf load time, we delay using a special bbclass that simply includes +# the META_VIRT_XEN_CONFIG_PATH file. + +include ${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${META_VIRT_XEN_CONFIG_PATH}', '', d)}
conf/distro/include/meta-virt-xen.inc new file +6 -0
@@ -0,0 +1,6 @@ +# Make sure Xen mode is enabled in qemu +PACKAGECONFIG_append_pn-qemu = " xen" + +# For builds for ARM platforms, enable fdt +PACKAGECONFIG_append_pn-qemu_arm = " fdt" +PACKAGECONFIG_append_pn-qemu_aarch64 = " fdt"
conf/layer.conf +3 -1
@@ -43,8 +43,10 @@ INHERIT += "sanity-meta-virt" # We need to load the meta-virt config components, only if "virtualization" # is in the distro features. Since we don't know the distro flags during # layer.conf load time, we delay using a special bbclass that simply includes -# the META_VIRT_CONFIG_PATH file, and likewise for the k8s configs +# the META_VIRT_CONFIG_PATH file, and likewise for the Xen and k8s configs META_VIRT_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-virt-default-versions.inc" +META_VIRT_XEN_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/meta-virt-xen.inc" K8S_CONFIG_PATH = "${LAYERDIR}/conf/distro/include/k8s-versions.inc" USER_CLASSES_append = " meta-virt-cfg" USER_CLASSES_append = " meta-virt-k8s-cfg" +USER_CLASSES_append = " meta-virt-xen-cfg"
Signature · 1 line
2.17.1
PATCH v2 2/11 xen-tools: add RRECOMENDS qemu on ARM and x86 when HVM is enabled
In reply to Christopher Clark--- recipes-extended/xen/xen-tools.inc | 6 ++++++ 1 file changed, 6 insertions(+)
recipes-extended/xen/xen-tools.inc +6 -0
@@ -53,7 +53,13 @@ RDEPENDS_${PN} = "\ RDEPENDS_${PN}-dev = "" +# Qemu is necessary on ARM platforms, and to support HVM guests on x86 +QEMU = "${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'qemu', '', d)}" +QEMU_arm = "qemu" +QEMU_aarch64 = "qemu" + RRECOMMENDS_${PN} = " \ + ${QEMU} \ ${@bb.utils.contains('PACKAGECONFIG', 'hvm', 'seabios', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'externalblktap', '', '${BLKTAP_RRECOMMENDS}', d)} \ ${PN}-flask \
Signature · 1 line
2.17.1
PATCH v2 3/11 xen-tools: use non-busybox ifupdown tool if available
In reply to Christopher ClarkAdds: RSUGGESTS_${PN}-scripts-network = "ifupdown"
--- recipes-extended/xen/xen-tools.inc | 4 ++++ 1 file changed, 4 insertions(+)
recipes-extended/xen/xen-tools.inc +4 -0
@@ -113,6 +113,10 @@ RDEPENDS_${PN}-scripts-network = "\ ${PN}-volatiles \ " +RSUGGESTS_${PN}-scripts-network = "\ + ifupdown \ + " + RSUGGESTS_${PN}-xencov = "${PN}-xencov-split" RDEPENDS_${PN}-xencommons = "\
Signature · 1 line
2.17.1
PATCH v2 4/11 xen, xen-tools: update revision to Xen 4.13
In reply to Christopher ClarkPull to the current tip of the stable 4.13 branch and apply an upstream 4.14-release-acked patch to xen-tools for a compiler warning in kdd.
--- ...xen-build-temporarily-inhibit-Werror.patch | 18 +- ...g-0-arrays-to-access-packet-contents.patch | 60 ++ .../files/xen-tools-libxl-gentypes-py3.patch | 140 ----- ...tools-pygrub-change-tabs-into-spaces.patch | 40 -- ...-python-scripts-work-with-2.6-and-up.patch | 529 ------------------ .../xen/files/xen-tools-pygrub-py3.patch | 233 -------- ...ls-python-fix-Wsign-compare-warnings.patch | 136 ----- ...n-tools-update-python-scripts-to-py3.patch | 140 ----- recipes-extended/xen/xen-tools.inc | 6 + recipes-extended/xen/xen-tools_git.bb | 13 +- recipes-extended/xen/xen_git.bb | 6 +- 11 files changed, 89 insertions(+), 1232 deletions(-) create mode 100644 recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch delete mode 100644 recipes-extended/xen/files/xen-tools-libxl-gentypes-py3.patch delete mode 100644 recipes-extended/xen/files/xen-tools-pygrub-change-tabs-into-spaces.patch delete mode 100644 recipes-extended/xen/files/xen-tools-pygrub-make-python-scripts-work-with-2.6-and-up.patch delete mode 100644 recipes-extended/xen/files/xen-tools-pygrub-py3.patch delete mode 100644 recipes-extended/xen/files/xen-tools-python-fix-Wsign-compare-warnings.patch delete mode 100644 recipes-extended/xen/files/xen-tools-update-python-scripts-to-py3.patch
recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror.patch +16 -2
@@ -4,6 +4,8 @@ Date: Thu, 18 Jun 2020 09:05:22 -0400 Subject: [PATCH] xen/build: temporarily inhibit Werror Signed-off-by: Bruce Ashfield <[email protected]> +Rebased on Xen 4.13: +Signed-off-by: Christopher Clark <[email protected]> --- tools/libxl/Makefile | 2 +- xen/Rules.mk | 2 +-
@@ -13,8 +15,8 @@ diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile index 6da342ed61..c67560e269 100644 --- a/tools/libxl/Makefile +++ b/tools/libxl/Makefile -@@ -11,7 +11,7 @@ MINOR = 0 - XLUMAJOR = 4.12 +@@ -14,7 +14,7 @@ MINOR = 0 + XLUMAJOR = 4.13 XLUMINOR = 0 -CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
@@ -38,3 +40,15 @@ index a151b3f625..a05ceec1e5 100644 -- 2.19.1 +diff --git a/tools/debugger/kdd/Makefile b/tools/debugger/kdd/Makefile +index 26116949d4..a72ad3b1e0 100644 +--- a/tools/debugger/kdd/Makefile ++++ b/tools/debugger/kdd/Makefile +@@ -1,7 +1,6 @@ + XEN_ROOT = $(CURDIR)/../../.. + include $(XEN_ROOT)/tools/Rules.mk + +-CFLAGS += -Werror + CFLAGS += $(CFLAGS_libxenctrl) + CFLAGS += -DXC_WANT_COMPAT_MAP_FOREIGN_API + LDLIBS += $(LDLIBS_libxenctrl)
recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch new file +60 -0
60 lines not on this page · raw message
recipes-extended/xen/files/xen-tools-libxl-gentypes-py3.patch deleted +0 -140
140 lines not on this page · raw message
recipes-extended/xen/files/xen-tools-pygrub-change-tabs-into-spaces.patch deleted +0 -40
@@ -1,40 +0,0 @@ -From b9e1368af14ded6aee3bdf64e8329628b16291ff Mon Sep 17 00:00:00 2001 -From: Wei Liu <[email protected]> -Date: Mon, 11 Mar 2019 12:55:29 +0000 -Subject: [PATCH] pygrub: change tabs into spaces - -Not sure why Python 2 never complained, but Python 3 does. - -Change tabs to spaces. - -Signed-off-by: Wei Liu <[email protected]> -Reviewed-by: Andrew Cooper <[email protected]> ---- - tools/pygrub/src/pygrub | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub -index 52a8965ad9..1189b1ca48 100755 ---- a/tools/pygrub/src/pygrub -+++ b/tools/pygrub/src/pygrub -@@ -858,7 +858,7 @@ if __name__ == "__main__": - output_directory = a - - if debug: -- logging.basicConfig(level=logging.DEBUG) -+ logging.basicConfig(level=logging.DEBUG) - - - try: -@@ -917,7 +917,7 @@ if __name__ == "__main__": - # IOErrors raised by fsimage.open - # RuntimeErrors raised by run_grub if no menu.lst present - if debug: -- traceback.print_exc() -+ traceback.print_exc() - fs = None - continue - --- -2.17.1 -
recipes-extended/xen/files/xen-tools-pygrub-make-python-scripts-work-with-2.6-and-up.patch deleted +0 -529
529 lines not on this page · raw message
recipes-extended/xen/files/xen-tools-pygrub-py3.patch deleted +0 -233
233 lines not on this page · raw message
recipes-extended/xen/files/xen-tools-python-fix-Wsign-compare-warnings.patch deleted +0 -136
136 lines not on this page · raw message
recipes-extended/xen/files/xen-tools-update-python-scripts-to-py3.patch deleted +0 -140
140 lines not on this page · raw message
recipes-extended/xen/xen-tools.inc +6 -0
@@ -65,6 +65,7 @@ RRECOMMENDS_${PN} = " \ ${PN}-flask \ ${PN}-hvmloader \ ${PN}-shim \ + ${PN}-ucode \ ${PN}-xenpaging \ "
@@ -202,6 +203,7 @@ PACKAGES = " \ ${PN}-scripts-network \ ${PN}-shim \ ${PN}-staticdev \ + ${PN}-ucode \ ${PN}-volatiles \ ${PN}-xcutils \ ${PN}-xencommons \
@@ -529,6 +531,10 @@ FILES_${PN}-shim = " \ ${libdir}/xen/boot/xen-shim \ " +FILES_${PN}-ucode = "\ + ${sbindir}/xen-ucode \ + " + FILES_${PN}-volatiles = "\ ${sysconfdir}/default/volatiles/99_xen \ ${sysconfdir}/tmpfiles.d/xen.conf \
recipes-extended/xen/xen-tools_git.bb +4 -9
@@ -1,21 +1,16 @@ -SRCREV ?= "a5fcafbfbee55261853fba07149c1c795f2baf58" +SRCREV ?= "9f7e8bac4ca279b3bfccb5f3730fb2e5398c95ab" -XEN_REL ?= "4.12" +XEN_REL ?= "4.13" XEN_BRANCH ?= "stable-${XEN_REL}" SRC_URI = " \ git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ file://0001-python-pygrub-pass-DISTUTILS-xen.4.12.patch \ - file://xen-tools-update-python-scripts-to-py3.patch \ - file://xen-tools-libxl-gentypes-py3.patch \ - file://xen-tools-python-fix-Wsign-compare-warnings.patch \ - file://xen-tools-pygrub-change-tabs-into-spaces.patch \ - file://xen-tools-pygrub-make-python-scripts-work-with-2.6-and-up.patch \ - file://xen-tools-pygrub-py3.patch \ file://0001-xen-build-temporarily-inhibit-Werror.patch \ + file://xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch \ " -LIC_FILES_CHKSUM ?= "file://COPYING;md5=bbb4b1bdc2c3b6743da3c39d03249095" +LIC_FILES_CHKSUM ?= "file://COPYING;md5=4295d895d4b5ce9d070263d52f030e49" PV = "${XEN_REL}+git${SRCPV}"
recipes-extended/xen/xen_git.bb +3 -3
@@ -1,11 +1,11 @@ -SRCREV ?= "a5fcafbfbee55261853fba07149c1c795f2baf58" +SRCREV ?= "9f7e8bac4ca279b3bfccb5f3730fb2e5398c95ab" -XEN_REL ?= "4.12" +XEN_REL ?= "4.13" XEN_BRANCH ?= "stable-${XEN_REL}" SRC_URI = "git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH}" -LIC_FILES_CHKSUM ?= "file://COPYING;md5=bbb4b1bdc2c3b6743da3c39d03249095" +LIC_FILES_CHKSUM ?= "file://COPYING;md5=4295d895d4b5ce9d070263d52f030e49" PV = "${XEN_REL}+git${SRCPV}"
Signature · 1 line
2.17.1
PATCH v2 5/11 meta-virt-xen.inc: add Raspberry Pi settings
In reply to Christopher Clark--- conf/distro/include/meta-virt-xen.inc | 8 ++++++++ 1 file changed, 8 insertions(+)
conf/distro/include/meta-virt-xen.inc +8 -0
@@ -4,3 +4,11 @@ PACKAGECONFIG_append_pn-qemu = " xen" # For builds for ARM platforms, enable fdt PACKAGECONFIG_append_pn-qemu_arm = " fdt" PACKAGECONFIG_append_pn-qemu_aarch64 = " fdt" + +# Raspberry Pi settings +# - Xen guest console +KERNEL_CONSOLE = "hvc0" +SERIAL_CONSOLES = "115200;hvc0" +# - Xen uses u-boot for configuration and uses the uart +RPI_USE_U_BOOT = "1" +ENABLE_UART = "1"
Signature · 1 line
2.17.1
PATCH v2 6/11 xen, raspberry pi: add dynamic-layer for Xen configuration for Rpi4
In reply to Christopher ClarkA Xen-specific u-boot script is needed for launching Xen, and the GIC (interrupt controller) needs to be enabled.
Since this is both Xen-specific and Raspberry Pi-specific, use a dynamic layer to conditionally enable the recipes when both meta-virtualization and meta-raspberrypi are in use together.
--- conf/layer.conf | 15 ++++++ .../bootfiles/rpi-config_git.bbappend | 6 +++ .../rpi-u-boot-scr/files/boot.cmd.xen.in | 49 +++++++++++++++++++ .../rpi-u-boot-scr/rpi-u-boot-scr.bbappend | 17 +++++++ 4 files changed, 87 insertions(+) create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.xen.in create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
conf/layer.conf +15 -0
@@ -11,6 +11,21 @@ BBFILE_PRIORITY_virtualization-layer = "8" # Custom licenses used by some packages in this layer LICENSE_PATH += "${LAYERDIR}/files/custom-licenses" +# The dynamic-layers directory hosts extensions and layer-specific +# modifications. +# +# The .bbappend and .bb files are included if the respective layer +# collection is available. +BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bbappend' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" +BBFILES += "${@' '.join('${LAYERDIR}/dynamic-layers/%s/recipes*/*/*.bb' % layer \ + for layer in BBFILE_COLLECTIONS.split())}" + +BBFILES_DYNAMIC += " \ + raspberrypi:${LAYERDIR}/dynamic-layers/raspberrypi/*/*/*.bb \ + raspberrypi:${LAYERDIR}/dynamic-layers/rasbperrypi/*/*/*.bbappend \ +" + # This should only be incremented on significant changes that will # cause compatibility issues with other layers LAYERVERSION_virtualization-layer = "1"
dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend new file +6 -0
@@ -0,0 +1,6 @@ +do_deploy_append() { + # We need the GIC enabled for Xen to work. + if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'yes', 'no', d)}" = "yes" ]; then + echo "enable_gic=1" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi +}
dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.xen.in new file +49 -0
49 lines not on this page · raw message
dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend new file +17 -0
@@ -0,0 +1,17 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +RPI_DOM0_MEM ??= "256M" +RPI_DEBUG_XEN_ARGS ??= "sync_console bootscrub=0" + +SRC_URI += "file://boot.cmd.xen.in" + +# If the distro is Xen enabled, override the default boot.cmd.in with the +# alternative boot.cmd.xen.in from this layer, with variables subsitution here +do_compile_append() { + if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'yes', 'no', d)}" = "yes" ]; then + sed -e 's/@@RPI_DOM0_MEM@@/${RPI_DOM0_MEM}/' \ + -e 's/@@RPI_DEBUG_XEN_ARGS@@/${RPI_DEBUG_XEN_ARGS}/' \ + "${WORKDIR}/boot.cmd.xen.in" > "${WORKDIR}/boot.cmd" + mkimage -A arm -T script -C none -n "Boot script" -d "${WORKDIR}/boot.cmd" boot.scr + fi +}
Signature · 1 line
2.17.1
PATCH v2 7/11 xen, raspberry pi 4: provide a default defconfig for raspberrypi4
In reply to Christopher Clark--- .../xen/files/defconfig_raspberrypi4-64 | 117 ++++++++++++++++++ .../recipes-extended/xen/xen_git.bbappend | 11 ++ 2 files changed, 128 insertions(+) create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/files/defconfig_raspberrypi4-64 create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/xen_git.bbappend
dynamic-layers/raspberrypi/recipes-extended/xen/files/defconfig_raspberrypi4-64 new file +117 -0
@@ -0,0 +1,117 @@ +# +# Automatically generated file; DO NOT EDIT. +# Xen/arm 4.13.0 Configuration +# +CONFIG_64BIT=y +CONFIG_ARM_64=y +CONFIG_ARM=y +CONFIG_ARCH_DEFCONFIG="arch/arm/configs/arm64_defconfig" + +# +# Architecture Features +# +CONFIG_NR_CPUS=128 +# CONFIG_ACPI is not set +CONFIG_GICV3=y +# CONFIG_HAS_ITS is not set +CONFIG_HVM=y +# CONFIG_NEW_VGIC is not set +CONFIG_SBSA_VUART_CONSOLE=y +CONFIG_ARM_SSBD=y +CONFIG_HARDEN_BRANCH_PREDICTOR=y +# CONFIG_TEE is not set + +# +# ARM errata workaround via the alternative framework +# +CONFIG_ARM64_ERRATUM_827319=y +CONFIG_ARM64_ERRATUM_824069=y +CONFIG_ARM64_ERRATUM_819472=y +CONFIG_ARM64_ERRATUM_832075=y +CONFIG_ARM64_ERRATUM_834220=y +CONFIG_ARM64_HARDEN_BRANCH_PREDICTOR=y +CONFIG_ALL_PLAT=y +# CONFIG_QEMU is not set +# CONFIG_RCAR3 is not set +# CONFIG_MPSOC is not set +# CONFIG_NO_PLAT is not set +CONFIG_ALL64_PLAT=y +# CONFIG_ALL32_PLAT is not set +CONFIG_MPSOC_PLATFORM=y + +# +# Common Features +# +CONFIG_GRANT_TABLE=y +CONFIG_HAS_ALTERNATIVE=y +CONFIG_HAS_DEVICE_TREE=y +CONFIG_HAS_FAST_MULTIPLY=y +# CONFIG_MEM_ACCESS is not set +CONFIG_HAS_PDX=y + +# +# Speculative hardening +# +CONFIG_SPECULATIVE_HARDEN_ARRAY=y +# CONFIG_EFI_SET_VIRTUAL_ADDRESS_MAP is not set +CONFIG_XSM=y +CONFIG_XSM_FLASK=y +CONFIG_XSM_FLASK_AVC_STATS=y +# CONFIG_XSM_FLASK_POLICY is not set +CONFIG_XSM_SILO=y +# CONFIG_XSM_DUMMY_DEFAULT is not set +# CONFIG_XSM_FLASK_DEFAULT is not set +CONFIG_XSM_SILO_DEFAULT=y +# CONFIG_ARGO is not set + +# +# Schedulers +# +CONFIG_SCHED_CREDIT=y +CONFIG_SCHED_CREDIT2=y +CONFIG_SCHED_RTDS=y +CONFIG_SCHED_ARINC653=y +CONFIG_SCHED_NULL=y +# CONFIG_SCHED_CREDIT_DEFAULT is not set +CONFIG_SCHED_CREDIT2_DEFAULT=y +# CONFIG_SCHED_RTDS_DEFAULT is not set +# CONFIG_SCHED_ARINC653_DEFAULT is not set +# CONFIG_SCHED_NULL_DEFAULT is not set +CONFIG_SCHED_DEFAULT="credit2" +# CONFIG_LIVEPATCH is not set +# CONFIG_ENFORCE_UNIQUE_SYMBOLS is not set +# CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS is not set +CONFIG_CMDLINE="" +CONFIG_DOM0_MEM="" +CONFIG_TRACEBUFFER=y + +# +# Device Drivers +# +CONFIG_HAS_NS16550=y +CONFIG_HAS_CADENCE_UART=y +CONFIG_HAS_MVEBU=y +CONFIG_HAS_MESON=y +CONFIG_HAS_PL011=y +CONFIG_HAS_SCIF=y +CONFIG_HAS_PASSTHROUGH=y +CONFIG_ARM_SMMU=y +# CONFIG_IPMMU_VMSA is not set +CONFIG_IOMMU_FORCE_PT_SHARE=y +CONFIG_DEFCONFIG_LIST="arch/arm/configs/arm64_defconfig" + +# +# Debugging Options +# +CONFIG_DEBUG=y +CONFIG_DEBUG_INFO=y +CONFIG_FRAME_POINTER=y +# CONFIG_COVERAGE is not set +# CONFIG_DEBUG_LOCK_PROFILE is not set +CONFIG_DEBUG_LOCKS=y +# CONFIG_PERF_COUNTERS is not set +CONFIG_VERBOSE_DEBUG=y +# CONFIG_DEVICE_TREE_DEBUG is not set +CONFIG_SCRUB_DEBUG=y +# CONFIG_DEBUG_TRACE is not set +CONFIG_XMEM_POOL_POISON=y
dynamic-layers/raspberrypi/recipes-extended/xen/xen_git.bbappend new file +11 -0
@@ -0,0 +1,11 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append_raspberrypi4-64 = " \ + file://defconfig_raspberrypi4-64 \ + " + +do_post_patch_append_raspberrypi4-64() { + if [ ! -e "${WORKDIR}/defconfig" ] ; then + cp "${WORKDIR}/defconfig_raspberrypi4-64" "${WORKDIR}/defconfig" + fi +}
Signature · 1 line
2.17.1
PATCH v2 8/11 xen, linux-raspberrypi: add Linux kernel 5.4 patches for Xen support
In reply to Christopher ClarkKernel patches are in process of Linux review and submission, and are backported from the Linux Foundation's Eve Project kernel from 5.6 to 5.4 (some patches not needed for 5.4, hence gaps in the patch sequence number)
https://github.com/lf-edge/eve/tree/master/pkg/new-kernel/patches-5.6.x
A bbappend applies Xen overrides to the boot command line.
Since linux-raspberrypi depends on linux-yocto, and linux-yocto_virtualization introduces a requirement for cfg/virtio.scc obtain it from the yocto kernel cache.
--- ...vmalloc_to_page-on-vmalloc-virt-addr.patch | 44 ++++++++++ ...02-swiotlb-xen-remove-start_dma_addr.patch | 47 ++++++++++ ...struct-device-parameter-to-xen_phys_.patch | 78 ++++++++++++++++ ...struct-device-parameter-to-xen_bus_t.patch | 66 ++++++++++++++ ...struct-device-parameter-to-is_xen_sw.patch | 57 ++++++++++++ ...oduce-phys_to_dma-dma_to_phys-transl.patch | 88 +++++++++++++++++++ ...translations-in-xen_dma_s_kernel_5.4.patch | 68 ++++++++++++++ ..._to_phys-on-the-dma_addr_t-parameter.patch | 75 ++++++++++++++++ .../0011-adding-page-coherent-patch.patch | 39 ++++++++ .../linux/linux-raspberrypi_%.bbappend | 5 ++ .../linux/linux-raspberrypi_5.4.bbappend | 19 ++++ 11 files changed, 586 insertions(+) create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0001-swiotlb-xen-use-vmalloc_to_page-on-vmalloc-virt-addr.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0002-swiotlb-xen-remove-start_dma_addr.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0003-swiotlb-xen-add-struct-device-parameter-to-xen_phys_.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0004-swiotlb-xen-add-struct-device-parameter-to-xen_bus_t.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0007-swiotlb-xen-add-struct-device-parameter-to-is_xen_sw.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0008-swiotlb-xen-introduce-phys_to_dma-dma_to_phys-transl.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0009-xen-arm-introduce-phys-dma-translations-in-xen_dma_s_kernel_5.4.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0010-xen-arm-call-dma_to_phys-on-the-dma_addr_t-parameter.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0011-adding-page-coherent-patch.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bbappend
dynamic-layers/raspberrypi/recipes-kernel/linux/files/0001-swiotlb-xen-use-vmalloc_to_page-on-vmalloc-virt-addr.patch new file +44 -0
@@ -0,0 +1,44 @@ +From f5f4de59377afdd9a80e0f47df109eacf427c203 Mon Sep 17 00:00:00 2001 +From: Boris Ostrovsky <[email protected]> +Date: Wed, 20 May 2020 16:42:06 -0700 +Subject: [PATCH 01/10] swiotlb-xen: use vmalloc_to_page on vmalloc virt + addresses + +Don't just assume that virt_to_page works on all virtual addresses. +Instead add a is_vmalloc_addr check and use vmalloc_to_page on vmalloc +virt addresses. + +Signed-off-by: Boris Ostrovsky <[email protected]> +Signed-off-by: Stefano Stabellini <[email protected]> +--- + drivers/xen/swiotlb-xen.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c +index b6d27762c6f8..a42129cba36e 100644 +--- a/drivers/xen/swiotlb-xen.c ++++ b/drivers/xen/swiotlb-xen.c +@@ -335,6 +335,7 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr, + int order = get_order(size); + phys_addr_t phys; + u64 dma_mask = DMA_BIT_MASK(32); ++ struct page *pg; + + if (hwdev && hwdev->coherent_dma_mask) + dma_mask = hwdev->coherent_dma_mask; +@@ -346,9 +347,11 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr, + /* Convert the size to actually allocated. */ + size = 1UL << (order + XEN_PAGE_SHIFT); + ++ pg = is_vmalloc_addr(vaddr) ? vmalloc_to_page(vaddr) : ++ virt_to_page(vaddr); + if (!WARN_ON((dev_addr + size - 1 > dma_mask) || + range_straddles_page_boundary(phys, size)) && +- TestClearPageXenRemapped(virt_to_page(vaddr))) ++ TestClearPageXenRemapped(pg)) + xen_destroy_contiguous_region(phys, order); + + xen_free_coherent_pages(hwdev, size, vaddr, (dma_addr_t)phys, attrs); +-- +2.15.4 +
dynamic-layers/raspberrypi/recipes-kernel/linux/files/0002-swiotlb-xen-remove-start_dma_addr.patch new file +47 -0
47 lines not on this page · raw message
dynamic-layers/raspberrypi/recipes-kernel/linux/files/0003-swiotlb-xen-add-struct-device-parameter-to-xen_phys_.patch new file +78 -0
78 lines not on this page · raw message
dynamic-layers/raspberrypi/recipes-kernel/linux/files/0004-swiotlb-xen-add-struct-device-parameter-to-xen_bus_t.patch new file +66 -0
66 lines not on this page · raw message
dynamic-layers/raspberrypi/recipes-kernel/linux/files/0007-swiotlb-xen-add-struct-device-parameter-to-is_xen_sw.patch new file +57 -0
57 lines not on this page · raw message
dynamic-layers/raspberrypi/recipes-kernel/linux/files/0008-swiotlb-xen-introduce-phys_to_dma-dma_to_phys-transl.patch new file +88 -0
88 lines not on this page · raw message
dynamic-layers/raspberrypi/recipes-kernel/linux/files/0009-xen-arm-introduce-phys-dma-translations-in-xen_dma_s_kernel_5.4.patch new file +68 -0
68 lines not on this page · raw message
dynamic-layers/raspberrypi/recipes-kernel/linux/files/0010-xen-arm-call-dma_to_phys-on-the-dma_addr_t-parameter.patch new file +75 -0
75 lines not on this page · raw message
dynamic-layers/raspberrypi/recipes-kernel/linux/files/0011-adding-page-coherent-patch.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 1f1182bf84ec7a6d1ec74c56fccd66ff013077af Mon Sep 17 00:00:00 2001 +From: Stefano Stabellini <[email protected]> +Date: Wed, 20 May 2020 16:43:08 -0700 +Subject: [PATCH 11/11] xen/arm: call dma_to_phys on the dma_addr_t parameter + of dma_cache_maint + +Add a struct device* parameter to dma_cache_maint. + +Translate the dma_addr_t parameter of dma_cache_maint by calling +dma_to_phys. Do it for the first page and all the following pages, in +case of multipage handling. + +Signed-off-by: Stefano Stabellini <[email protected]> +--- + include/xen/arm/page-coherent.h | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/arch/arm/xen/mm.c b/arch/arm/xen/mm.c +index 7639251bcc79..6ddf3b3c1ab5 100644 +--- a/include/xen/arm/page-coherent.h 2020-05-20 06:22:38.000000000 +0000 ++++ b/include/xen/arm/page-coherent.h 2020-05-29 00:37:15.604981421 +0000 +@@ -8,12 +8,17 @@ + static inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size, + dma_addr_t *dma_handle, gfp_t flags, unsigned long attrs) + { ++ void *cpu_addr; ++ if (dma_alloc_from_dev_coherent(hwdev, size, dma_handle, &cpu_addr)) ++ return cpu_addr; + return dma_direct_alloc(hwdev, size, dma_handle, flags, attrs); + } + + static inline void xen_free_coherent_pages(struct device *hwdev, size_t size, + void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs) + { ++ if (dma_release_from_dev_coherent(hwdev, get_order(size), cpu_addr)) ++ return; + dma_direct_free(hwdev, size, cpu_addr, dma_handle, attrs); + } +
dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend new file +5 -0
@@ -0,0 +1,5 @@ +# For a Xen-enabled distro, override the contents of cmdline.txt + +DEFAULT_CMDLINE := "${CMDLINE}" +XEN_LINUX_CMDLINE ?= "console=hvc0 clk_ignore_unused earlyprintk=xen debug root=/dev/mmcblk0p2 rootwait" +CMDLINE = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${XEN_LINUX_CMDLINE}', '${DEFAULT_CMDLINE}', d)}"
dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bbappend new file +19 -0
@@ -0,0 +1,19 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI += " \ + file://0001-swiotlb-xen-use-vmalloc_to_page-on-vmalloc-virt-addr.patch \ + file://0002-swiotlb-xen-remove-start_dma_addr.patch \ + file://0003-swiotlb-xen-add-struct-device-parameter-to-xen_phys_.patch \ + file://0004-swiotlb-xen-add-struct-device-parameter-to-xen_bus_t.patch \ + file://0007-swiotlb-xen-add-struct-device-parameter-to-is_xen_sw.patch \ + file://0008-swiotlb-xen-introduce-phys_to_dma-dma_to_phys-transl.patch \ + file://0009-xen-arm-introduce-phys-dma-translations-in-xen_dma_s_kernel_5.4.patch \ + file://0010-xen-arm-call-dma_to_phys-on-the-dma_addr_t-parameter.patch \ + file://0011-adding-page-coherent-patch.patch \ + " + +# Add support for virtio.scc which linux-yocto_virtualization adds +SRCREV_meta = "aafb8f095e97013d6e55b09ed150369cbe0c6476" +SRC_URI_append += " \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-5.4;destsuffix=kernel-meta \ + "
Signature · 1 line
2.17.1
PATCH v2 9/11 xen, raspberry pi: add Xen-specific SD card class
In reply to Christopher ClarkAt the moment the regular meta-raspberrypi SD card class does not allow for optional inclusion of extra files in the SD card boot partition without requiring those same files be present in the root filesystem. This affects hypervisor binaries, such as Xen, which do not necessarily belong within the guest filesystem.
As a workaround, inherit the sdcard_image-rpi.bbclass and clone the main IMAGE_CMD function, adding the Xen-specific deploy that is needed. This can be retired when the parent class has extensibility added.
--- classes/sdcard_image-rpi-xen.bbclass | 120 ++++++++++++++++++++++++++ conf/distro/include/meta-virt-xen.inc | 3 + 2 files changed, 123 insertions(+) create mode 100644 classes/sdcard_image-rpi-xen.bbclass
classes/sdcard_image-rpi-xen.bbclass new file +120 -0
@@ -0,0 +1,120 @@ +inherit sdcard_image-rpi + +# This image class should be retired and folded into sdcard_image-rpi.bbclass +# when it has support for adding binaries to the boot partition that are not +# present in the root partition filesystem: ie. the hypervisor (xen) image. + +do_image_rpi_xen_sdimg[depends] = " \ + parted-native:do_populate_sysroot \ + mtools-native:do_populate_sysroot \ + dosfstools-native:do_populate_sysroot \ + virtual/kernel:do_deploy \ + ${IMAGE_BOOTLOADER}:do_deploy \ + rpi-config:do_deploy \ + ${@bb.utils.contains('MACHINE_FEATURES', 'armstub', 'armstubs:do_deploy', '' ,d)} \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot-default-script:do_deploy', '',d)} \ + xen:do_deploy \ + " + +do_image_rpi_xen_sdimg[recrdeps] = "do_build" + +IMAGE_TYPEDEP_rpi-xen-sdimg = "${SDIMG_ROOTFS_TYPE}" + +SDIMG = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.rpi-xen-sdimg" + +# Take from: IMAGE_CMD_rpi-sdimg from meta-raspberrypi, current as of: 44d7dd0e +# with modification to include the Xen hypervisor binary in the boot partition. +IMAGE_CMD_rpi-xen-sdimg () { + + # Align partitions + BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) + BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) + SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE) + + echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB" + + # Check if we are building with device tree support + DTS="${KERNEL_DEVICETREE}" + + # Initialize sdcard image file + dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE} + + # Create partition table + parted -s ${SDIMG} mklabel msdos + # Create boot partition and mark it as bootable + parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) + parted -s ${SDIMG} set 1 boot on + # Create rootfs partition to the end of disk + parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s + parted ${SDIMG} print + + # Create a vfat image with boot files + BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') + rm -f ${WORKDIR}/boot.img + mkfs.vfat -F32 -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* into boot.img" + if [ "${@bb.utils.contains("MACHINE_FEATURES", "armstub", "1", "0", d)}" = "1" ]; then + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} ::/ || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/armstubs/${ARMSTUB} into boot.img" + fi + if test -n "${DTS}"; then + # Copy board device trees to root folder + for dtbf in ${@split_overlays(d, True)}; do + dtb=`basename $dtbf` + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::$dtb || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/$dtb into boot.img" + done + + # Copy device tree overlays to dedicated folder + mmd -i ${WORKDIR}/boot.img overlays + for dtbf in ${@split_overlays(d, False)}; do + dtb=`basename $dtbf` + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::overlays/$dtb || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/$dtb into boot.img" + done + fi + if [ "${RPI_USE_U_BOOT}" = "1" ]; then + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/u-boot.bin into boot.img" + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/boot.scr into boot.img" + if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${KERNEL_IMAGETYPE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin into boot.img" + else + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${KERNEL_IMAGETYPE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} into boot.img" + fi + else + if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin into boot.img" + else + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${SDIMG_KERNELIMAGE} || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} into boot.img" + fi + fi + # -- Begin Xen deploy modification + mcopy -v -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/xen-${MACHINE} ::xen || bbfatal "mcopy cannot copy ${DEPLOY_DIR_IMAGE}/xen-${MACHINE} into boot.img" + # -- End Xen deploy modification + + if [ -n "${FATPAYLOAD}" ] ; then + echo "Copying payload into VFAT" + for entry in ${FATPAYLOAD} ; do + # use bbwarn instead of bbfatal to stop aborting on vfat issues like not supporting .~lock files + mcopy -v -i ${WORKDIR}/boot.img -s ${IMAGE_ROOTFS}$entry :: || bbwarn "mcopy cannot copy ${IMAGE_ROOTFS}$entry into boot.img" + done + fi + + # Add stamp file + echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info + mcopy -v -i ${WORKDIR}/boot.img ${WORKDIR}/image-version-info :: || bbfatal "mcopy cannot copy ${WORKDIR}/image-version-info into boot.img" + + # Deploy vfat partition + if [ "${SDIMG_VFAT_DEPLOY}" = "1" ]; then + cp ${WORKDIR}/boot.img ${IMGDEPLOYDIR}/${SDIMG_VFAT} + ln -sf ${SDIMG_VFAT} ${SDIMG_LINK_VFAT} + fi + + # Burn Partitions + dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) + # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat + if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz" + then + xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) + else + dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) + fi +}
conf/distro/include/meta-virt-xen.inc +3 -0
@@ -12,3 +12,6 @@ SERIAL_CONSOLES = "115200;hvc0" # - Xen uses u-boot for configuration and uses the uart RPI_USE_U_BOOT = "1" ENABLE_UART = "1" +# Build the bootable SD card image +IMAGE_CLASSES_append_raspberrypi4-64 = " sdcard_image-rpi-xen" +IMAGE_FSTYPES_append_raspberrypi4-64 = " rpi-xen-sdimg"
Signature · 1 line
2.17.1
PATCH v2 10/11 linux-raspberrypi: prefer kernel version 5.4
In reply to Christopher ClarkAligns with Yocto's current kernel version.
--- conf/distro/include/meta-virt-xen.inc | 2 ++ 1 file changed, 2 insertions(+)
conf/distro/include/meta-virt-xen.inc +2 -0
@@ -15,3 +15,5 @@ ENABLE_UART = "1" # Build the bootable SD card image IMAGE_CLASSES_append_raspberrypi4-64 = " sdcard_image-rpi-xen" IMAGE_FSTYPES_append_raspberrypi4-64 = " rpi-xen-sdimg" +# Align kernel version with current meta-virtualization kernel version +PREFERRED_VERSION_linux-raspberrypi ?= "5.4.%"
Signature · 1 line
2.17.1
PATCH v2 11/11 xen: add patch to fix build on ARM64 with gcc 10.1.0
In reply to Christopher ClarkThe newer gcc toolchain won't link due to a missing builtin:__sync_fetch_and_add. Xen is built with -fno-builtin, so add a patch to implement the one required function.
--- ...xen-arm64-implement-atomic-fetch-add.patch | 50 +++++++++++++++++++ recipes-extended/xen/xen_git.bb | 5 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch
recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch new file +50 -0
@@ -0,0 +1,50 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Christopher Clark <[email protected]> +Date: Fri, 26 June 2020 16:34:00 -0800 +Subject: [PATCH] xen: implement atomic op to fix arm64 compilation + +Xen's ARM implementation of arch_fetch_and_add since f9cc3cd9 +uses a builtin, despite the build being performed with -fno-builtin. +With gcc 10.1.0, this now breaks prelinking spinlock.c, so +implement the one atomic operation that is required with logic +derived from Linux's atomic_ll_sc.h: ATOMIC_FETCH_OP and comparison with +the binary produced with and without the patch with gcc 9.2.0. + +Signed-off-by: Christopher Clark <[email protected]> +diff --git a/xen/include/asm-arm/system.h b/xen/include/asm-arm/system.h +index e5d062667d..c46dd3ac71 100644 +--- a/xen/include/asm-arm/system.h ++++ b/xen/include/asm-arm/system.h +@@ -55,7 +55,32 @@ static inline int local_abort_is_enabled(void) + return !(flags & PSR_ABT_MASK); + } + ++#ifdef CONFIG_ARM_64 ++ ++/* see atomic_ll_sc.h: ATOMIC_FETCH_OP(name, mb, acq, rel, cl, op, asm_op, constraint) */ ++static inline int arch_fetch_and_add(unsigned int *ptr, unsigned long i) ++{ ++ int register lptr asm("x0"); ++ int register result asm("w1"); ++ int register newval asm("w2"); ++ int register status asm("w3"); ++ ++ asm volatile( ++ " mov %[lptr], %[ptr]\n" ++ "1: ldxr %w[result], [%[lptr]]\n" ++ " add %w[newval], %w[result], %w[i]\n" ++ " stlxr %w[status], %w[newval], [%[lptr]]\n" ++ " cbnz %w[status], 1b\n" ++ " dmb ish\n" ++ : [result] "=&r" (result), [lptr] "=&r" (lptr), [newval] "=&r" (newval), [status] "=&r" (status), [i] "+r" (i), "+Q" (*ptr) ++ : [ptr] "r" (ptr), "r" (i) ++ : "memory"); ++ ++ return result; ++} ++#else + #define arch_fetch_and_add(x, v) __sync_fetch_and_add(x, v) ++#endif + + extern struct vcpu *__context_switch(struct vcpu *prev, struct vcpu *next); +
recipes-extended/xen/xen_git.bb +4 -1
@@ -3,7 +3,10 @@ SRCREV ?= "9f7e8bac4ca279b3bfccb5f3730fb2e5398c95ab" XEN_REL ?= "4.13" XEN_BRANCH ?= "stable-${XEN_REL}" -SRC_URI = "git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH}" +SRC_URI = " \ + git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ + file://xen-arm64-implement-atomic-fetch-add.patch \ + " LIC_FILES_CHKSUM ?= "file://COPYING;md5=4295d895d4b5ce9d070263d52f030e49"
Signature · 1 line
2.17.1
HI
Quoted 12 lines · Christopher Clark via lists.yoctoproject.org
This series introduces support for running Xen on the Raspberry Pi 4 board, with meta-virtualization and meta-raspberrypi, using the linux-raspberrypi kernel at version 5.4 which is the current linux-yocto kernel version supported in this layer.
It introduces use of dynamic layers to handle configuration that is both Xen and Raspberry Pi specific, and inclusion of Xen-specific configuration when the 'xen'
DISTRO_FEATUREis enabled to simplify Xen image builds.
Quoted 7 lines
It applies a backported set of Xen-specific Linux kernel patches, developed by upstream Xen developers working with the Linux Foundation Eve Project, that are currently being iterated on for inclusion in the Linux kernel.
Xen is uprev'd to version 4.13; this is currently compile-and-boot-tested only on this RPi4 board.
Could you give a sumup of what was changed in v2 ?
That’s a big serie and reviewing it would be easier with some infos on what has been changed.
Thanks
Bertrand
Quoted 81 lines
Christopher
Christopher Clark (11):
xen: apply layer settings when xenDISTRO_FEATUREis enabled
xen-tools: add RRECOMENDS qemu on ARM and x86 when HVM is enabled
xen-tools: use non-busybox ifupdown tool if available xen, xen-tools: update revision to Xen 4.13 meta-virt-xen.inc: add Raspberry Pi settings
xen, raspberry pi: add dynamic-layer for Xen configuration for Rpi4 xen, raspberry pi 4: provide a default defconfig for raspberrypi4 xen, linux-raspberrypi: add Linux kernel 5.4 patches for Xen support xen, raspberry pi: add Xen-specific SD card class
linux-raspberrypi: prefer kernel version 5.4
xen: add patch to fix build on ARM64 with gcc 10.1.0classes/meta-virt-xen-cfg.bbclass | 6 + classes/sdcard_image-rpi-xen.bbclass | 120 ++++ conf/distro/include/meta-virt-xen.inc | 19 + conf/layer.conf | 19 +- .../bootfiles/rpi-config_git.bbappend | 6 + .../rpi-u-boot-scr/files/boot.cmd.xen.in | 49 ++ .../rpi-u-boot-scr/rpi-u-boot-scr.bbappend | 17 + .../xen/files/defconfig_raspberrypi4-64 | 117 ++++ .../recipes-extended/xen/xen_git.bbappend | 11 + ...vmalloc_to_page-on-vmalloc-virt-addr.patch | 44 ++ ...02-swiotlb-xen-remove-start_dma_addr.patch | 47 ++ ...struct-device-parameter-to-xen_phys_.patch | 78 +++ ...struct-device-parameter-to-xen_bus_t.patch | 66 +++ ...struct-device-parameter-to-is_xen_sw.patch | 57 ++ ...oduce-phys_to_dma-dma_to_phys-transl.patch | 88 +++ ...translations-in-xen_dma_s_kernel_5.4.patch | 68 +++ ..._to_phys-on-the-dma_addr_t-parameter.patch | 75 +++ .../0011-adding-page-coherent-patch.patch | 39 ++ .../linux/linux-raspberrypi_%.bbappend | 5 + .../linux/linux-raspberrypi_5.4.bbappend | 19 + ...xen-build-temporarily-inhibit-Werror.patch | 18 +- ...xen-arm64-implement-atomic-fetch-add.patch | 50 ++ ...g-0-arrays-to-access-packet-contents.patch | 60 ++ .../files/xen-tools-libxl-gentypes-py3.patch | 140 ----- ...tools-pygrub-change-tabs-into-spaces.patch | 40 -- ...-python-scripts-work-with-2.6-and-up.patch | 529 ------------------ .../xen/files/xen-tools-pygrub-py3.patch | 233 -------- ...ls-python-fix-Wsign-compare-warnings.patch | 136 ----- ...n-tools-update-python-scripts-to-py3.patch | 140 ----- recipes-extended/xen/xen-tools.inc | 16 + recipes-extended/xen/xen-tools_git.bb | 13 +- recipes-extended/xen/xen_git.bb | 11 +- 32 files changed, 1102 insertions(+), 1234 deletions(-)create mode 100644 classes/meta-virt-xen-cfg.bbclass
create mode 100644 classes/sdcard_image-rpi-xen.bbclass
create mode 100644 conf/distro/include/meta-virt-xen.inc
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.xen.in
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/files/defconfig_raspberrypi4-64
create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/xen_git.bbappend
create mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0001-swiotlb-xen-use-vmalloc_to_page-on-vmalloc-virt-addr.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0002-swiotlb-xen-remove-start_dma_addr.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0003-swiotlb-xen-add-struct-device-parameter-to-xen_phys_.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0004-swiotlb-xen-add-struct-device-parameter-to-xen_bus_t.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0007-swiotlb-xen-add-struct-device-parameter-to-is_xen_sw.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0008-swiotlb-xen-introduce-phys_to_dma-dma_to_phys-transl.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0009-xen-arm-introduce-phys-dma-translations-in-xen_dma_s_kernel_5.4.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0010-xen-arm-call-dma_to_phys-on-the-dma_addr_t-parameter.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0011-adding-page-coherent-patch.patch
create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bbappend
create mode 100644recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch
create mode 100644recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch
delete mode 100644recipes-extended/xen/files/xen-tools-libxl-gentypes-py3.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-change-tabs-into-spaces.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-make-python-scripts-work-with-2.6-and-up.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-py3.patch
delete mode 100644recipes-extended/xen/files/xen-tools-python-fix-Wsign-compare-warnings.patch
delete mode 100644recipes-extended/xen/files/xen-tools-update-python-scripts-to-py3.patchSignature · 1 line
2.17.1
Quoted 20 lines · Bertrand Marquis
HI
Quoted 17 lines · Christopher Clark via lists.yoctoproject.org
This series introduces support for running Xen on the Raspberry Pi 4 board, with meta-virtualization and meta-raspberrypi, using the linux-raspberrypi kernel at version 5.4 which is the current linux-yocto kernel version supported in this layer.
It introduces use of dynamic layers to handle configuration that is both Xen and Raspberry Pi specific, and inclusion of Xen-specific configuration when the 'xen'
DISTRO_FEATUREis enabled to simplify Xen image builds.It applies a backported set of Xen-specific Linux kernel patches, developed by upstream Xen developers working with the Linux Foundation Eve Project, that are currently being iterated on for inclusion in the Linux kernel.
Quoted 6 lines
Quoted 2 lines
Xen is uprev'd to version 4.13; this is currently compile-and-boot-tested only on this RPi4 board.
Could you give a sumup of what was changed in v2 ?
That’s a big serie and reviewing it would be easier with some infos on what has been changed.
Hi Bertrand,
Thanks for your interest. I think your reply just clipped the start of my message that contained the summary of the changes in v2? The text was:
Changes since v1:
- rebased on to current meta-virtualization, meta-openembedded, poky
- updated Xen revision to the tip of stable 4.13
- fixed Xen build on ARM64 with gcc 10.1.0
- added upstream debugger patch to fix compiler warning
ie. The most notable change is that this series applies and build to completion with much more up to date poky and meta-openembedded repos. The last patch in the series is necessary to enable that: it adds a new implementation of an atomic primitive to Xen for the spinlock implementation on ARM64, replacing use of a builtin which the newer compiler does not make available for the current Xen build, possibly since -fno-builtin is presented as a compiler option.
I've also pulled the Xen revision closer to the tip of stable 4.13 branch and applied handling for warnings that the new gcc version reports.
Christopher
Quoted 86 lines
Thanks
BertrandQuoted 81 lines
Christopher
Christopher Clark (11):
xen: apply layer settings when xenDISTRO_FEATUREis enabled
xen-tools: add RRECOMENDS qemu on ARM and x86 when HVM is enabled
xen-tools: use non-busybox ifupdown tool if available xen, xen-tools: update revision to Xen 4.13 meta-virt-xen.inc: add Raspberry Pi settings
xen, raspberry pi: add dynamic-layer for Xen configuration for Rpi4 xen, raspberry pi 4: provide a default defconfig for raspberrypi4 xen, linux-raspberrypi: add Linux kernel 5.4 patches for Xen support xen, raspberry pi: add Xen-specific SD card class
linux-raspberrypi: prefer kernel version 5.4
xen: add patch to fix build on ARM64 with gcc 10.1.0classes/meta-virt-xen-cfg.bbclass | 6 + classes/sdcard_image-rpi-xen.bbclass | 120 ++++ conf/distro/include/meta-virt-xen.inc | 19 + conf/layer.conf | 19 +- .../bootfiles/rpi-config_git.bbappend | 6 + .../rpi-u-boot-scr/files/boot.cmd.xen.in | 49 ++ .../rpi-u-boot-scr/rpi-u-boot-scr.bbappend | 17 + .../xen/files/defconfig_raspberrypi4-64 | 117 ++++ .../recipes-extended/xen/xen_git.bbappend | 11 + ...vmalloc_to_page-on-vmalloc-virt-addr.patch | 44 ++ ...02-swiotlb-xen-remove-start_dma_addr.patch | 47 ++ ...struct-device-parameter-to-xen_phys_.patch | 78 +++ ...struct-device-parameter-to-xen_bus_t.patch | 66 +++ ...struct-device-parameter-to-is_xen_sw.patch | 57 ++ ...oduce-phys_to_dma-dma_to_phys-transl.patch | 88 +++ ...translations-in-xen_dma_s_kernel_5.4.patch | 68 +++ ..._to_phys-on-the-dma_addr_t-parameter.patch | 75 +++ .../0011-adding-page-coherent-patch.patch | 39 ++ .../linux/linux-raspberrypi_%.bbappend | 5 + .../linux/linux-raspberrypi_5.4.bbappend | 19 + ...xen-build-temporarily-inhibit-Werror.patch | 18 +- ...xen-arm64-implement-atomic-fetch-add.patch | 50 ++ ...g-0-arrays-to-access-packet-contents.patch | 60 ++ .../files/xen-tools-libxl-gentypes-py3.patch | 140 ----- ...tools-pygrub-change-tabs-into-spaces.patch | 40 -- ...-python-scripts-work-with-2.6-and-up.patch | 529 ------------------ .../xen/files/xen-tools-pygrub-py3.patch | 233 -------- ...ls-python-fix-Wsign-compare-warnings.patch | 136 ----- ...n-tools-update-python-scripts-to-py3.patch | 140 ----- recipes-extended/xen/xen-tools.inc | 16 + recipes-extended/xen/xen-tools_git.bb | 13 +- recipes-extended/xen/xen_git.bb | 11 +- 32 files changed, 1102 insertions(+), 1234 deletions(-)create mode 100644 classes/meta-virt-xen-cfg.bbclass
create mode 100644 classes/sdcard_image-rpi-xen.bbclass
create mode 100644 conf/distro/include/meta-virt-xen.inc
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.xen.in
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/files/defconfig_raspberrypi4-64
create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/xen_git.bbappend
create mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0001-swiotlb-xen-use-vmalloc_to_page-on-vmalloc-virt-addr.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0002-swiotlb-xen-remove-start_dma_addr.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0003-swiotlb-xen-add-struct-device-parameter-to-xen_phys_.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0004-swiotlb-xen-add-struct-device-parameter-to-xen_bus_t.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0007-swiotlb-xen-add-struct-device-parameter-to-is_xen_sw.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0008-swiotlb-xen-introduce-phys_to_dma-dma_to_phys-transl.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0009-xen-arm-introduce-phys-dma-translations-in-xen_dma_s_kernel_5.4.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0010-xen-arm-call-dma_to_phys-on-the-dma_addr_t-parameter.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0011-adding-page-coherent-patch.patch
create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bbappend
create mode 100644recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch
create mode 100644recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch
delete mode 100644recipes-extended/xen/files/xen-tools-libxl-gentypes-py3.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-change-tabs-into-spaces.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-make-python-scripts-work-with-2.6-and-up.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-py3.patch
delete mode 100644recipes-extended/xen/files/xen-tools-python-fix-Wsign-compare-warnings.patch
delete mode 100644recipes-extended/xen/files/xen-tools-update-python-scripts-to-py3.patch--
2.17.1
Hi Christopher,
Quoted 43 lines · Christopher Clark
Quoted 20 lines · Bertrand Marquis
HI
Quoted 17 lines · Christopher Clark via lists.yoctoproject.org
This series introduces support for running Xen on the Raspberry Pi 4 board, with meta-virtualization and meta-raspberrypi, using the linux-raspberrypi kernel at version 5.4 which is the current linux-yocto kernel version supported in this layer.
It introduces use of dynamic layers to handle configuration that is both Xen and Raspberry Pi specific, and inclusion of Xen-specific configuration when the 'xen'
DISTRO_FEATUREis enabled to simplify Xen image builds.It applies a backported set of Xen-specific Linux kernel patches, developed by upstream Xen developers working with the Linux Foundation Eve Project, that are currently being iterated on for inclusion in the Linux kernel.
Quoted 6 lines
Quoted 2 lines
Xen is uprev'd to version 4.13; this is currently compile-and-boot-tested only on this RPi4 board.
Could you give a sumup of what was changed in v2 ?
That’s a big serie and reviewing it would be easier with some infos on what has been changed.Hi Bertrand,
Thanks for your interest. I think your reply just clipped the start of my message that contained the summary of the changes in v2? The text was:
Changes since v1:
- rebased on to current meta-virtualization, meta-openembedded, poky
- updated Xen revision to the tip of stable 4.13
- fixed Xen build on ARM64 with gcc 10.1.0
- added upstream debugger patch to fix compiler warning
Quoted 11 lines
ie. The most notable change is that this series applies and build to completion with much more up to date poky and meta-openembedded repos. The last patch in the series is necessary to enable that: it adds a new implementation of an atomic primitive to Xen for the spinlock implementation on ARM64, replacing use of a builtin which the newer compiler does not make available for the current Xen build, possibly since -fno-builtin is presented as a compiler option.
I've also pulled the Xen revision closer to the tip of stable 4.13 branch and applied handling for warnings that the new gcc version reports.
Thanks, this is a very interesting serie which could define how boards specific support could be handled.
I am not quite sure if the dynamic layer should be in meta-virtualization and activate if meta-rpi4 is there or in meta-rpi4 activated if meta-virtualization is there.
@Bruce: Do you think it is ok to start defining dynamic layers this way in meta-virtualization ?
I would see a risk of them not being maintained or tested.
Bertrand
Quoted 87 lines
Christopher
Quoted 85 lines
Thanks
BertrandQuoted 81 lines
Christopher
Christopher Clark (11):
xen: apply layer settings when xenDISTRO_FEATUREis enabled
xen-tools: add RRECOMENDS qemu on ARM and x86 when HVM is enabled
xen-tools: use non-busybox ifupdown tool if available xen, xen-tools: update revision to Xen 4.13 meta-virt-xen.inc: add Raspberry Pi settings
xen, raspberry pi: add dynamic-layer for Xen configuration for Rpi4 xen, raspberry pi 4: provide a default defconfig for raspberrypi4 xen, linux-raspberrypi: add Linux kernel 5.4 patches for Xen support xen, raspberry pi: add Xen-specific SD card class
linux-raspberrypi: prefer kernel version 5.4
xen: add patch to fix build on ARM64 with gcc 10.1.0classes/meta-virt-xen-cfg.bbclass | 6 + classes/sdcard_image-rpi-xen.bbclass | 120 ++++ conf/distro/include/meta-virt-xen.inc | 19 + conf/layer.conf | 19 +- .../bootfiles/rpi-config_git.bbappend | 6 + .../rpi-u-boot-scr/files/boot.cmd.xen.in | 49 ++ .../rpi-u-boot-scr/rpi-u-boot-scr.bbappend | 17 + .../xen/files/defconfig_raspberrypi4-64 | 117 ++++ .../recipes-extended/xen/xen_git.bbappend | 11 + ...vmalloc_to_page-on-vmalloc-virt-addr.patch | 44 ++ ...02-swiotlb-xen-remove-start_dma_addr.patch | 47 ++ ...struct-device-parameter-to-xen_phys_.patch | 78 +++ ...struct-device-parameter-to-xen_bus_t.patch | 66 +++ ...struct-device-parameter-to-is_xen_sw.patch | 57 ++ ...oduce-phys_to_dma-dma_to_phys-transl.patch | 88 +++ ...translations-in-xen_dma_s_kernel_5.4.patch | 68 +++ ..._to_phys-on-the-dma_addr_t-parameter.patch | 75 +++ .../0011-adding-page-coherent-patch.patch | 39 ++ .../linux/linux-raspberrypi_%.bbappend | 5 + .../linux/linux-raspberrypi_5.4.bbappend | 19 + ...xen-build-temporarily-inhibit-Werror.patch | 18 +- ...xen-arm64-implement-atomic-fetch-add.patch | 50 ++ ...g-0-arrays-to-access-packet-contents.patch | 60 ++ .../files/xen-tools-libxl-gentypes-py3.patch | 140 ----- ...tools-pygrub-change-tabs-into-spaces.patch | 40 -- ...-python-scripts-work-with-2.6-and-up.patch | 529 ------------------ .../xen/files/xen-tools-pygrub-py3.patch | 233 -------- ...ls-python-fix-Wsign-compare-warnings.patch | 136 ----- ...n-tools-update-python-scripts-to-py3.patch | 140 ----- recipes-extended/xen/xen-tools.inc | 16 + recipes-extended/xen/xen-tools_git.bb | 13 +- recipes-extended/xen/xen_git.bb | 11 +- 32 files changed, 1102 insertions(+), 1234 deletions(-)create mode 100644 classes/meta-virt-xen-cfg.bbclass
create mode 100644 classes/sdcard_image-rpi-xen.bbclass
create mode 100644 conf/distro/include/meta-virt-xen.inc
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.xen.in
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/files/defconfig_raspberrypi4-64
create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/xen_git.bbappend
create mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0001-swiotlb-xen-use-vmalloc_to_page-on-vmalloc-virt-addr.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0002-swiotlb-xen-remove-start_dma_addr.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0003-swiotlb-xen-add-struct-device-parameter-to-xen_phys_.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0004-swiotlb-xen-add-struct-device-parameter-to-xen_bus_t.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0007-swiotlb-xen-add-struct-device-parameter-to-is_xen_sw.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0008-swiotlb-xen-introduce-phys_to_dma-dma_to_phys-transl.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0009-xen-arm-introduce-phys-dma-translations-in-xen_dma_s_kernel_5.4.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0010-xen-arm-call-dma_to_phys-on-the-dma_addr_t-parameter.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0011-adding-page-coherent-patch.patch
create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bbappend
create mode 100644recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch
create mode 100644recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch
delete mode 100644recipes-extended/xen/files/xen-tools-libxl-gentypes-py3.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-change-tabs-into-spaces.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-make-python-scripts-work-with-2.6-and-up.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-py3.patch
delete mode 100644recipes-extended/xen/files/xen-tools-python-fix-Wsign-compare-warnings.patch
delete mode 100644recipes-extended/xen/files/xen-tools-update-python-scripts-to-py3.patch--
2.17.1
Quoted 58 lines · Bertrand Marquis
Hi Christopher,
Quoted 43 lines · Christopher Clark
Quoted 20 lines · Bertrand Marquis
HI
Quoted 17 lines · Christopher Clark via lists.yoctoproject.org
This series introduces support for running Xen on the Raspberry Pi 4 board, with meta-virtualization and meta-raspberrypi, using the linux-raspberrypi kernel at version 5.4 which is the current linux-yocto kernel version supported in this layer.
It introduces use of dynamic layers to handle configuration that is both Xen and Raspberry Pi specific, and inclusion of Xen-specific configuration when the 'xen'
DISTRO_FEATUREis enabled to simplify Xen image builds.It applies a backported set of Xen-specific Linux kernel patches, developed by upstream Xen developers working with the Linux Foundation Eve Project, that are currently being iterated on for inclusion in the Linux kernel.
Quoted 6 lines
Quoted 2 lines
Xen is uprev'd to version 4.13; this is currently compile-and-boot-tested only on this RPi4 board.
Could you give a sumup of what was changed in v2 ?
That’s a big serie and reviewing it would be easier with some infos on what has been changed.Hi Bertrand,
Thanks for your interest. I think your reply just clipped the start of my message that contained the summary of the changes in v2? The text was:
Changes since v1:
- rebased on to current meta-virtualization, meta-openembedded, poky
- updated Xen revision to the tip of stable 4.13
- fixed Xen build on ARM64 with gcc 10.1.0
- added upstream debugger patch to fix compiler warningQuoted 11 lines
ie. The most notable change is that this series applies and build to completion with much more up to date poky and meta-openembedded repos. The last patch in the series is necessary to enable that: it adds a new implementation of an atomic primitive to Xen for the spinlock implementation on ARM64, replacing use of a builtin which the newer compiler does not make available for the current Xen build, possibly since -fno-builtin is presented as a compiler option.
I've also pulled the Xen revision closer to the tip of stable 4.13 branch and applied handling for warnings that the new gcc version reports.
Quoted 5 lines
Thanks, this is a very interesting serie which could define how boards specific support could be handled.
I am not quite sure if the dynamic layer should be in meta-virtualization and activate if meta-rpi4 is there or in meta-rpi4 activated if meta-virtualization is there.
@Bruce: Do you think it is ok to start defining dynamic layers this way in meta-virtualization ?
Yes, this is the way we decided to do it in previous discussions.
We'd (for now) rather have the full stack in one place, versus having it spread across multiple repos. The test matrix starts to get very difficult if we have things spread about, and with this out statement of what has been tested is very clear.
I'll be testing it and so will Christopher.
If the model breaks, we'll of course revisit it and adjust as necessary :D
Bruce
Quoted 94 lines
I would see a risk of them not being maintained or tested.
Bertrand
Quoted 87 lines
Christopher
Quoted 85 lines
Thanks
BertrandQuoted 81 lines
Christopher
Christopher Clark (11):
xen: apply layer settings when xenDISTRO_FEATUREis enabled
xen-tools: add RRECOMENDS qemu on ARM and x86 when HVM is enabled
xen-tools: use non-busybox ifupdown tool if available xen, xen-tools: update revision to Xen 4.13 meta-virt-xen.inc: add Raspberry Pi settings
xen, raspberry pi: add dynamic-layer for Xen configuration for Rpi4 xen, raspberry pi 4: provide a default defconfig for raspberrypi4 xen, linux-raspberrypi: add Linux kernel 5.4 patches for Xen support xen, raspberry pi: add Xen-specific SD card class
linux-raspberrypi: prefer kernel version 5.4
xen: add patch to fix build on ARM64 with gcc 10.1.0classes/meta-virt-xen-cfg.bbclass | 6 + classes/sdcard_image-rpi-xen.bbclass | 120 ++++ conf/distro/include/meta-virt-xen.inc | 19 + conf/layer.conf | 19 +- .../bootfiles/rpi-config_git.bbappend | 6 + .../rpi-u-boot-scr/files/boot.cmd.xen.in | 49 ++ .../rpi-u-boot-scr/rpi-u-boot-scr.bbappend | 17 + .../xen/files/defconfig_raspberrypi4-64 | 117 ++++ .../recipes-extended/xen/xen_git.bbappend | 11 + ...vmalloc_to_page-on-vmalloc-virt-addr.patch | 44 ++ ...02-swiotlb-xen-remove-start_dma_addr.patch | 47 ++ ...struct-device-parameter-to-xen_phys_.patch | 78 +++ ...struct-device-parameter-to-xen_bus_t.patch | 66 +++ ...struct-device-parameter-to-is_xen_sw.patch | 57 ++ ...oduce-phys_to_dma-dma_to_phys-transl.patch | 88 +++ ...translations-in-xen_dma_s_kernel_5.4.patch | 68 +++ ..._to_phys-on-the-dma_addr_t-parameter.patch | 75 +++ .../0011-adding-page-coherent-patch.patch | 39 ++ .../linux/linux-raspberrypi_%.bbappend | 5 + .../linux/linux-raspberrypi_5.4.bbappend | 19 + ...xen-build-temporarily-inhibit-Werror.patch | 18 +- ...xen-arm64-implement-atomic-fetch-add.patch | 50 ++ ...g-0-arrays-to-access-packet-contents.patch | 60 ++ .../files/xen-tools-libxl-gentypes-py3.patch | 140 ----- ...tools-pygrub-change-tabs-into-spaces.patch | 40 -- ...-python-scripts-work-with-2.6-and-up.patch | 529 ------------------ .../xen/files/xen-tools-pygrub-py3.patch | 233 -------- ...ls-python-fix-Wsign-compare-warnings.patch | 136 ----- ...n-tools-update-python-scripts-to-py3.patch | 140 ----- recipes-extended/xen/xen-tools.inc | 16 + recipes-extended/xen/xen-tools_git.bb | 13 +- recipes-extended/xen/xen_git.bb | 11 +- 32 files changed, 1102 insertions(+), 1234 deletions(-)create mode 100644 classes/meta-virt-xen-cfg.bbclass
create mode 100644 classes/sdcard_image-rpi-xen.bbclass
create mode 100644 conf/distro/include/meta-virt-xen.inc
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.xen.in
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/files/defconfig_raspberrypi4-64
create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/xen_git.bbappend
create mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0001-swiotlb-xen-use-vmalloc_to_page-on-vmalloc-virt-addr.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0002-swiotlb-xen-remove-start_dma_addr.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0003-swiotlb-xen-add-struct-device-parameter-to-xen_phys_.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0004-swiotlb-xen-add-struct-device-parameter-to-xen_bus_t.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0007-swiotlb-xen-add-struct-device-parameter-to-is_xen_sw.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0008-swiotlb-xen-introduce-phys_to_dma-dma_to_phys-transl.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0009-xen-arm-introduce-phys-dma-translations-in-xen_dma_s_kernel_5.4.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0010-xen-arm-call-dma_to_phys-on-the-dma_addr_t-parameter.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0011-adding-page-coherent-patch.patch
create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bbappend
create mode 100644recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch
create mode 100644recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch
delete mode 100644recipes-extended/xen/files/xen-tools-libxl-gentypes-py3.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-change-tabs-into-spaces.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-make-python-scripts-work-with-2.6-and-up.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-py3.patch
delete mode 100644recipes-extended/xen/files/xen-tools-python-fix-Wsign-compare-warnings.patch
delete mode 100644recipes-extended/xen/files/xen-tools-update-python-scripts-to-py3.patch--
2.17.1
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 68 lines · Bruce Ashfield
Quoted 62 lines · Bertrand Marquis
Hi Christopher,
Quoted 43 lines · Christopher Clark
Quoted 20 lines · Bertrand Marquis
HI
Quoted 17 lines · Christopher Clark via lists.yoctoproject.org
This series introduces support for running Xen on the Raspberry Pi 4 board, with meta-virtualization and meta-raspberrypi, using the linux-raspberrypi kernel at version 5.4 which is the current linux-yocto kernel version supported in this layer.
It introduces use of dynamic layers to handle configuration that is both Xen and Raspberry Pi specific, and inclusion of Xen-specific configuration when the 'xen'
DISTRO_FEATUREis enabled to simplify Xen image builds.It applies a backported set of Xen-specific Linux kernel patches, developed by upstream Xen developers working with the Linux Foundation Eve Project, that are currently being iterated on for inclusion in the Linux kernel.
Quoted 6 lines
Quoted 2 lines
Xen is uprev'd to version 4.13; this is currently compile-and-boot-tested only on this RPi4 board.
Could you give a sumup of what was changed in v2 ?
That’s a big serie and reviewing it would be easier with some infos on what has been changed.Hi Bertrand,
Thanks for your interest. I think your reply just clipped the start of my message that contained the summary of the changes in v2? The text was:
Changes since v1:
- rebased on to current meta-virtualization, meta-openembedded, poky
- updated Xen revision to the tip of stable 4.13
- fixed Xen build on ARM64 with gcc 10.1.0
- added upstream debugger patch to fix compiler warningQuoted 11 lines
ie. The most notable change is that this series applies and build to completion with much more up to date poky and meta-openembedded repos. The last patch in the series is necessary to enable that: it adds a new implementation of an atomic primitive to Xen for the spinlock implementation on ARM64, replacing use of a builtin which the newer compiler does not make available for the current Xen build, possibly since -fno-builtin is presented as a compiler option.
I've also pulled the Xen revision closer to the tip of stable 4.13 branch and applied handling for warnings that the new gcc version reports.Thanks, this is a very interesting serie which could define how boards specific support could be handled.
I am not quite sure if the dynamic layer should be in meta-virtualization and activate if meta-rpi4 is there or in meta-rpi4 activated if meta-virtualization is there.
Quoted 8 lines
Quoted 1 line
@Bruce: Do you think it is ok to start defining dynamic layers this way in meta-virtualization ?
Yes, this is the way we decided to do it in previous discussions.
We'd (for now) rather have the full stack in one place, versus having it spread across multiple repos. The test matrix starts to get very difficult if we have things spread about, and with this out statement of what has been tested is very clear.
ok just wanted to make sure that was clear.
Quoted 4 lines
I'll be testing it and so will Christopher.
If the model breaks, we'll of course revisit it and adjust as necessary :D
That works for me :-)
Bertrand
Quoted 103 lines
Bruce
Quoted 94 lines
I would see a risk of them not being maintained or tested.
Bertrand
Quoted 87 lines
Christopher
Quoted 85 lines
Thanks
BertrandQuoted 81 lines
Christopher
Christopher Clark (11):
xen: apply layer settings when xenDISTRO_FEATUREis enabled
xen-tools: add RRECOMENDS qemu on ARM and x86 when HVM is enabled
xen-tools: use non-busybox ifupdown tool if available xen, xen-tools: update revision to Xen 4.13 meta-virt-xen.inc: add Raspberry Pi settings
xen, raspberry pi: add dynamic-layer for Xen configuration for Rpi4 xen, raspberry pi 4: provide a default defconfig for raspberrypi4 xen, linux-raspberrypi: add Linux kernel 5.4 patches for Xen support xen, raspberry pi: add Xen-specific SD card class
linux-raspberrypi: prefer kernel version 5.4
xen: add patch to fix build on ARM64 with gcc 10.1.0classes/meta-virt-xen-cfg.bbclass | 6 + classes/sdcard_image-rpi-xen.bbclass | 120 ++++ conf/distro/include/meta-virt-xen.inc | 19 + conf/layer.conf | 19 +- .../bootfiles/rpi-config_git.bbappend | 6 + .../rpi-u-boot-scr/files/boot.cmd.xen.in | 49 ++ .../rpi-u-boot-scr/rpi-u-boot-scr.bbappend | 17 + .../xen/files/defconfig_raspberrypi4-64 | 117 ++++ .../recipes-extended/xen/xen_git.bbappend | 11 + ...vmalloc_to_page-on-vmalloc-virt-addr.patch | 44 ++ ...02-swiotlb-xen-remove-start_dma_addr.patch | 47 ++ ...struct-device-parameter-to-xen_phys_.patch | 78 +++ ...struct-device-parameter-to-xen_bus_t.patch | 66 +++ ...struct-device-parameter-to-is_xen_sw.patch | 57 ++ ...oduce-phys_to_dma-dma_to_phys-transl.patch | 88 +++ ...translations-in-xen_dma_s_kernel_5.4.patch | 68 +++ ..._to_phys-on-the-dma_addr_t-parameter.patch | 75 +++ .../0011-adding-page-coherent-patch.patch | 39 ++ .../linux/linux-raspberrypi_%.bbappend | 5 + .../linux/linux-raspberrypi_5.4.bbappend | 19 + ...xen-build-temporarily-inhibit-Werror.patch | 18 +- ...xen-arm64-implement-atomic-fetch-add.patch | 50 ++ ...g-0-arrays-to-access-packet-contents.patch | 60 ++ .../files/xen-tools-libxl-gentypes-py3.patch | 140 ----- ...tools-pygrub-change-tabs-into-spaces.patch | 40 -- ...-python-scripts-work-with-2.6-and-up.patch | 529 ------------------ .../xen/files/xen-tools-pygrub-py3.patch | 233 -------- ...ls-python-fix-Wsign-compare-warnings.patch | 136 ----- ...n-tools-update-python-scripts-to-py3.patch | 140 ----- recipes-extended/xen/xen-tools.inc | 16 + recipes-extended/xen/xen-tools_git.bb | 13 +- recipes-extended/xen/xen_git.bb | 11 +- 32 files changed, 1102 insertions(+), 1234 deletions(-)create mode 100644 classes/meta-virt-xen-cfg.bbclass
create mode 100644 classes/sdcard_image-rpi-xen.bbclass
create mode 100644 conf/distro/include/meta-virt-xen.inc
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.xen.in
create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/files/defconfig_raspberrypi4-64
create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/xen_git.bbappend
create mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0001-swiotlb-xen-use-vmalloc_to_page-on-vmalloc-virt-addr.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0002-swiotlb-xen-remove-start_dma_addr.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0003-swiotlb-xen-add-struct-device-parameter-to-xen_phys_.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0004-swiotlb-xen-add-struct-device-parameter-to-xen_bus_t.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0007-swiotlb-xen-add-struct-device-parameter-to-is_xen_sw.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0008-swiotlb-xen-introduce-phys_to_dma-dma_to_phys-transl.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0009-xen-arm-introduce-phys-dma-translations-in-xen_dma_s_kernel_5.4.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0010-xen-arm-call-dma_to_phys-on-the-dma_addr_t-parameter.patchcreate mode 100644dynamic-layers/raspberrypi/recipes-kernel/linux/files/0011-adding-page-coherent-patch.patch
create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bbappend
create mode 100644recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch
create mode 100644recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch
delete mode 100644recipes-extended/xen/files/xen-tools-libxl-gentypes-py3.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-change-tabs-into-spaces.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-make-python-scripts-work-with-2.6-and-up.patch
delete mode 100644recipes-extended/xen/files/xen-tools-pygrub-py3.patch
delete mode 100644recipes-extended/xen/files/xen-tools-python-fix-Wsign-compare-warnings.patch
delete mode 100644recipes-extended/xen/files/xen-tools-update-python-scripts-to-py3.patch--
2.17.1Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
In message: [meta-virtualization][PATCH v2 00/11] Xen on Raspberry Pi 4
Quoted 16 lines · on 29/06/2020 Christopher Clark wrote:
Changes since v1:
- rebased on to current meta-virtualization, meta-openembedded, poky
- updated Xen revision to the tip of stable 4.13
- fixed Xen build on ARM64 with gcc 10.1.0
- added upstream debugger patch to fix compiler warningThis series introduces support for running Xen on the Raspberry Pi 4 board, with meta-virtualization and meta-raspberrypi, using the linux-raspberrypi kernel at version 5.4 which is the current linux-yocto kernel version supported in this layer.
It introduces use of dynamic layers to handle configuration that is both Xen and Raspberry Pi specific, and inclusion of Xen-specific configuration when the 'xen'
DISTRO_FEATUREis enabled to simplify Xen image builds.
Quoted 7 lines
It applies a backported set of Xen-specific Linux kernel patches, developed by upstream Xen developers working with the Linux Foundation Eve Project, that are currently being iterated on for inclusion in the Linux kernel.
Xen is uprev'd to version 4.13; this is currently compile-and-boot-tested only on this RPi4 board.
These have soaked on the list long enough, things build here as well, so I've pulled these into master.
Bruce
Quoted 80 lines
Christopher
Christopher Clark (11):
xen: apply layer settings when xenDISTRO_FEATUREis enabled
xen-tools: add RRECOMENDS qemu on ARM and x86 when HVM is enabled
xen-tools: use non-busybox ifupdown tool if available xen, xen-tools: update revision to Xen 4.13 meta-virt-xen.inc: add Raspberry Pi settings
xen, raspberry pi: add dynamic-layer for Xen configuration for Rpi4 xen, raspberry pi 4: provide a default defconfig for raspberrypi4 xen, linux-raspberrypi: add Linux kernel 5.4 patches for Xen support xen, raspberry pi: add Xen-specific SD card class
linux-raspberrypi: prefer kernel version 5.4
xen: add patch to fix build on ARM64 with gcc 10.1.0classes/meta-virt-xen-cfg.bbclass | 6 + classes/sdcard_image-rpi-xen.bbclass | 120 ++++ conf/distro/include/meta-virt-xen.inc | 19 + conf/layer.conf | 19 +- .../bootfiles/rpi-config_git.bbappend | 6 + .../rpi-u-boot-scr/files/boot.cmd.xen.in | 49 ++ .../rpi-u-boot-scr/rpi-u-boot-scr.bbappend | 17 + .../xen/files/defconfig_raspberrypi4-64 | 117 ++++ .../recipes-extended/xen/xen_git.bbappend | 11 + ...vmalloc_to_page-on-vmalloc-virt-addr.patch | 44 ++ ...02-swiotlb-xen-remove-start_dma_addr.patch | 47 ++ ...struct-device-parameter-to-xen_phys_.patch | 78 +++ ...struct-device-parameter-to-xen_bus_t.patch | 66 +++ ...struct-device-parameter-to-is_xen_sw.patch | 57 ++ ...oduce-phys_to_dma-dma_to_phys-transl.patch | 88 +++ ...translations-in-xen_dma_s_kernel_5.4.patch | 68 +++ ..._to_phys-on-the-dma_addr_t-parameter.patch | 75 +++ .../0011-adding-page-coherent-patch.patch | 39 ++ .../linux/linux-raspberrypi_%.bbappend | 5 + .../linux/linux-raspberrypi_5.4.bbappend | 19 + ...xen-build-temporarily-inhibit-Werror.patch | 18 +- ...xen-arm64-implement-atomic-fetch-add.patch | 50 ++ ...g-0-arrays-to-access-packet-contents.patch | 60 ++ .../files/xen-tools-libxl-gentypes-py3.patch | 140 ----- ...tools-pygrub-change-tabs-into-spaces.patch | 40 -- ...-python-scripts-work-with-2.6-and-up.patch | 529 ------------------ .../xen/files/xen-tools-pygrub-py3.patch | 233 -------- ...ls-python-fix-Wsign-compare-warnings.patch | 136 ----- ...n-tools-update-python-scripts-to-py3.patch | 140 ----- recipes-extended/xen/xen-tools.inc | 16 + recipes-extended/xen/xen-tools_git.bb | 13 +- recipes-extended/xen/xen_git.bb | 11 +- 32 files changed, 1102 insertions(+), 1234 deletions(-) create mode 100644 classes/meta-virt-xen-cfg.bbclass create mode 100644 classes/sdcard_image-rpi-xen.bbclass create mode 100644 conf/distro/include/meta-virt-xen.inc create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bbappend create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/files/boot.cmd.xen.in create mode 100644 dynamic-layers/raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bbappend create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/files/defconfig_raspberrypi4-64 create mode 100644 dynamic-layers/raspberrypi/recipes-extended/xen/xen_git.bbappend create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0001-swiotlb-xen-use-vmalloc_to_page-on-vmalloc-virt-addr.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0002-swiotlb-xen-remove-start_dma_addr.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0003-swiotlb-xen-add-struct-device-parameter-to-xen_phys_.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0004-swiotlb-xen-add-struct-device-parameter-to-xen_bus_t.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0007-swiotlb-xen-add-struct-device-parameter-to-is_xen_sw.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0008-swiotlb-xen-introduce-phys_to_dma-dma_to_phys-transl.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0009-xen-arm-introduce-phys-dma-translations-in-xen_dma_s_kernel_5.4.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0010-xen-arm-call-dma_to_phys-on-the-dma_addr_t-parameter.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/files/0011-adding-page-coherent-patch.patch create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend create mode 100644 dynamic-layers/raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.4.bbappend create mode 100644 recipes-extended/xen/files/xen-arm64-implement-atomic-fetch-add.patch create mode 100644 recipes-extended/xen/files/xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch delete mode 100644 recipes-extended/xen/files/xen-tools-libxl-gentypes-py3.patch delete mode 100644 recipes-extended/xen/files/xen-tools-pygrub-change-tabs-into-spaces.patch delete mode 100644 recipes-extended/xen/files/xen-tools-pygrub-make-python-scripts-work-with-2.6-and-up.patch delete mode 100644 recipes-extended/xen/files/xen-tools-pygrub-py3.patch delete mode 100644 recipes-extended/xen/files/xen-tools-python-fix-Wsign-compare-warnings.patch delete mode 100644 recipes-extended/xen/files/xen-tools-update-python-scripts-to-py3.patchSignature · 1 line
2.17.1