summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/virtualization-layer/recipes-extended/xen
diff options
context:
space:
mode:
authorLeonid Lazarev <leonid.lazarev@mera.com>2020-05-15 11:51:48 +0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2020-05-26 17:12:19 +0000
commit4028c726be78adc1f1df3708dbe99f9eb2303790 (patch)
treea612c618ec8689bd785e816582116c4cf81cc681 /meta-agl-bsp/virtualization-layer/recipes-extended/xen
parent30063de420b4f6c993dd3f2021ab84f622d69320 (diff)
Raspberry 4: XEN support
Added the support for DOM0 in raspberry pi4. The feature agl-virt-xen should be enabled to activate this code. 1512 MB of memory is used for DOM0 machine. There are limitations: - brcmfmac module disabled (bluethooth and Wifi) due to the crash - total_memory is set to the 3Gb, as it impacts the USB ports on rasbperry pi4 on Linux kernel 4.19 v2 (jsmoeller): make changes in virtualization-layer conditional to raspberrypi4 Bug-AGL: SPEC-3259 Change-Id: I873fbf1f5498e31ae5f468407502f16e1873f7fc Signed-off-by: Leonid Lazarev <leonid.lazarev@mera.com> Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org> Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/24522 Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org> ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Diffstat (limited to 'meta-agl-bsp/virtualization-layer/recipes-extended/xen')
-rw-r--r--meta-agl-bsp/virtualization-layer/recipes-extended/xen/files/0001-XEN-on-RPi4-1GB-lmitation-workaround-XEN-tries-to-al.patch28
-rw-r--r--meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-mkimage-rpi4.bb (renamed from meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-mkimage.bb)0
-rw-r--r--meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-tools_git.bbappend11
-rw-r--r--meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen_git.bbappend18
4 files changed, 54 insertions, 3 deletions
diff --git a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/files/0001-XEN-on-RPi4-1GB-lmitation-workaround-XEN-tries-to-al.patch b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/files/0001-XEN-on-RPi4-1GB-lmitation-workaround-XEN-tries-to-al.patch
new file mode 100644
index 000000000..d83c65257
--- /dev/null
+++ b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/files/0001-XEN-on-RPi4-1GB-lmitation-workaround-XEN-tries-to-al.patch
@@ -0,0 +1,28 @@
+From 2701d65271686dff0cb39ab7da1e821f5dede61e Mon Sep 17 00:00:00 2001
+From: Leonid Lazarev <leonid.lazarev@mera.com>
+Date: Tue, 21 Apr 2020 17:28:16 +0300
+Subject: [PATCH] XEN on RPi4 1GB lmitation workaround: XEN tries to allocated
+ the memopry for dom0 within first 4GB, but for some reason raspberry pi only
+ allows to load kernel from 1st GB. Push XEN to allocate first bank for dom0
+ from 1st GB
+
+---
+ xen/arch/arm/domain_build.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
+index dd9c3b73ba..8501a8c8aa 100644
+--- a/xen/arch/arm/domain_build.c
++++ b/xen/arch/arm/domain_build.c
+@@ -281,7 +281,7 @@ static void __init allocate_memory_11(struct domain *d,
+ */
+ while ( order >= min_low_order )
+ {
+- for ( bits = order ; bits <= (lowmem ? 32 : PADDR_BITS); bits++ )
++ for ( bits = order ; bits <= (lowmem ? 30 : PADDR_BITS); bits++ )
+ {
+ pg = alloc_domheap_pages(d, order, MEMF_bits(bits));
+ if ( pg != NULL )
+--
+2.17.1
+
diff --git a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-mkimage.bb b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-mkimage-rpi4.bb
index ae8fe71b6..ae8fe71b6 100644
--- a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-mkimage.bb
+++ b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-mkimage-rpi4.bb
diff --git a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-tools_git.bbappend b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-tools_git.bbappend
new file mode 100644
index 000000000..057f4564c
--- /dev/null
+++ b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen-tools_git.bbappend
@@ -0,0 +1,11 @@
+
+# make the package specific to the machine for now
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+# rpi4
+LIC_FILES_CHKSUM_raspberrypi4 = "file://COPYING;md5=4295d895d4b5ce9d070263d52f030e49"
+XEN_REL_raspberrypi4 = "4.13"
+SRCREV_raspberrypi4 = "721f2c323ca55c77857c93e7275b4a93a0e15e1f"
+SRC_URI_raspberrypi4 = " \
+ git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
+ "
diff --git a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen_git.bbappend b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen_git.bbappend
index 70c7fd415..1b9aaf4ca 100644
--- a/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen_git.bbappend
+++ b/meta-agl-bsp/virtualization-layer/recipes-extended/xen/xen_git.bbappend
@@ -1,6 +1,18 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-XEN_REL = "4.13"
-XEN_BRANCH = "stable"
-SRCREV = "721f2c323ca55c77857c93e7275b4a93a0e15e1f"
+# make the package machine-specific
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+# rpi4 specifics
+LIC_FILES_CHKSUM_raspberrypi4 = "file://COPYING;md5=4295d895d4b5ce9d070263d52f030e49"
+XEN_REL_raspberrypi4 = "4.13"
+
+SRCREV_raspberrypi4 = "721f2c323ca55c77857c93e7275b4a93a0e15e1f"
+SRC_URI_append_raspberrypi4 = " file://0001-XEN-on-RPi4-1GB-lmitation-workaround-XEN-tries-to-al.patch"
+
+#due to incorrect xen binary preparation in external library, we add additional deploy
+do_deploy_append_raspberrypi4() {
+ if [ -f ${B}/xen/xen ]; then
+ install -m 0644 ${B}/xen/xen ${DEPLOYDIR}/xen-${MACHINE}
+ fi
+}