diff options
Diffstat (limited to 'recipes-extended/jailhouse')
-rw-r--r-- | recipes-extended/jailhouse/files/arm-arm64-Makefile-Remove-march-option-from-Makefile.patch | 40 | ||||
-rw-r--r-- | recipes-extended/jailhouse/jailhouse-imx_git.bb (renamed from recipes-extended/jailhouse/jailhouse_0.12.bb) | 80 | ||||
-rw-r--r-- | recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch | 69 |
3 files changed, 75 insertions, 114 deletions
diff --git a/recipes-extended/jailhouse/files/arm-arm64-Makefile-Remove-march-option-from-Makefile.patch b/recipes-extended/jailhouse/files/arm-arm64-Makefile-Remove-march-option-from-Makefile.patch new file mode 100644 index 00000000..442d2831 --- /dev/null +++ b/recipes-extended/jailhouse/files/arm-arm64-Makefile-Remove-march-option-from-Makefile.patch @@ -0,0 +1,40 @@ +From 7117c1fe979053e4b1071968b444c03fbffe55bb Mon Sep 17 00:00:00 2001 +From: Daiane Angolini <daiane.angolini@foundries.io> +Date: Tue, 6 Feb 2024 18:01:07 -0300 +Subject: [PATCH] arm:arm64: Makefile: Remove -march option from Makefile + +It let the recipe to decide which are the compilation flags to be used. + +It acomodates to [1]. + +[1] https://git.yoctoproject.org/poky/commit/?id=04eac1f2b67eac5f892a9e0f8fcfe54849923af5 + +Upstream-Status: Inappropriate [See above] + +Signed-off-by: Daiane Angolini <daiane.angolini@foundries.io> +--- + hypervisor/arch/arm/Makefile | 2 -- + hypervisor/arch/arm64/Makefile | 1 - + 2 files changed, 3 deletions(-) + +diff --git a/hypervisor/arch/arm/Makefile b/hypervisor/arch/arm/Makefile +index a54370fc..cddb6cd3 100644 +--- a/hypervisor/arch/arm/Makefile ++++ b/hypervisor/arch/arm/Makefile +@@ -12,5 +12,3 @@ + + LINUXINCLUDE += -I$(src)/arch/arm-common/include + +-KBUILD_CFLAGS += -marm -march=armv7ve -msoft-float +-KBUILD_AFLAGS += -march=armv7ve -msoft-float +diff --git a/hypervisor/arch/arm64/Makefile b/hypervisor/arch/arm64/Makefile +index 0718994d..5d7a80c6 100644 +--- a/hypervisor/arch/arm64/Makefile ++++ b/hypervisor/arch/arm64/Makefile +@@ -12,4 +12,3 @@ + + LINUXINCLUDE += -I$(src)/arch/arm-common/include + +-KBUILD_CFLAGS += -march=armv8-a+nofp +-- +2.34.1 diff --git a/recipes-extended/jailhouse/jailhouse_0.12.bb b/recipes-extended/jailhouse/jailhouse-imx_git.bb index 43b4cdf5..c230cc3a 100644 --- a/recipes-extended/jailhouse/jailhouse_0.12.bb +++ b/recipes-extended/jailhouse/jailhouse-imx_git.bb @@ -1,7 +1,7 @@ SUMMARY = "Jailhouse, i.MX fork" HOMEPAGE = "https://github.com/siemens/jailhouse" SECTION = "jailhouse" -LICENSE = "GPL-2.0" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \ file://tools/root-cell-config.c.tmpl;beginline=6;endline=33;md5=2825581c1666c44a17955dc574cfbfb3 \ @@ -13,12 +13,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9fa7f895f96bde2d47fd5b7d95b6ba4d \ file://driver/jailhouse.h;beginline=9;endline=36;md5=2825581c1666c44a17955dc574cfbfb3 \ " -SRCBRANCH = "imx_5.4.47_2.2.0" -SRCREV = "8bbe203ee7c1fc16198ce1bf964e54c90606c3c2" +PROVIDES = "jailhouse" +RPROVIDES:${PN} += "jailhouse" -SRC_URI = "git://source.codeaurora.org/external/imx/imx-jailhouse.git;protocol=ssh;branch=${SRCBRANCH} \ - file://0001-tools-scripts-update-shebang-to-python3.patch \ -" +SRCBRANCH = "lf-6.6.3_1.0.0" +SRCREV = "184a287f4c4c63a3842a3b582b5d700e0f9fd9a4" + +IMX_JAILHOUSE_SRC ?= "git://github.com/nxp-imx/imx-jailhouse.git;protocol=https" +SRC_URI = "${IMX_JAILHOUSE_SRC};branch=${SRCBRANCH} \ + file://arm-arm64-Makefile-Remove-march-option-from-Makefile.patch \ + " DEPENDS = " \ make-native \ @@ -27,7 +31,7 @@ DEPENDS = " \ dtc-native \ " -inherit module python3native bash-completion deploy setuptools3 +inherit module bash-completion deploy setuptools3 S = "${WORKDIR}/git" B = "${S}" @@ -38,50 +42,33 @@ CELL_DIR ?= "${JH_DATADIR}/cells" CELLCONF_DIR ?= "${JH_DATADIR}/configs" INMATES_DIR ?= "${JH_DATADIR}/inmates" -JH_CONFIG ?= "${S}/ci/jailhouse-config-x86.h" -JH_CONFIG:x86 ?= "${S}/ci/jailhouse-config-x86.h" -JH_CONFIG:x86-64 ?= "${S}/ci/jailhouse-config-x86.h" -JH_CONFIG:arm ?= "${S}/ci/jailhouse-config-banana-pi.h" +TUNE_CCARGS:remove:mx93-nxp-bsp = "-mcpu=cortex-a55" + +EXTRA_OEMAKE += 'V=1' +EXTRA_OEMAKE += 'PYTHON=python3' +EXTRA_OEMAKE += 'LDFLAGS=""' +EXTRA_OEMAKE += 'CC="${CC}"' +EXTRA_OEMAKE += 'ARCH=${JH_ARCH}' +EXTRA_OEMAKE += 'CROSS_COMPILE=${TARGET_PREFIX}' +EXTRA_OEMAKE += 'KDIR=${STAGING_KERNEL_BUILDDIR}' +EXTRA_OEMAKE += 'MODLIB="${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}"' +EXTRA_OEMAKE += 'INSTALL_MOD_PATH=${D}${root_prefix}' +EXTRA_OEMAKE += 'firmwaredir=${nonarch_base_libdir}/firmware' -do_configure() { +do_configure:prepend() { if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; then cp "${STAGING_DIR_HOST}/${CELLCONF_DIR}/"*.c ${S}/configs/${ARCH}/ fi } -USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \ - -DJAILHOUSE_VERSION=\\\"$JAILHOUSE_VERSION\\\" \ - -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \ - -I../driver' - -TOOLS_SRC_DIR = "${S}/tools" -TOOLS_OBJ_DIR = "${S}/tools" - -do_compile() { - unset LDFLAGS - oe_runmake V=1 CC="${CC}" \ - ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} \ - KDIR=${STAGING_KERNEL_BUILDDIR} - - cd ${TOOLS_SRC_DIR} - export JAILHOUSE_VERSION=$(cat ../VERSION) - oe_runmake V=1 \ - CFLAGS="${USER_SPACE_CFLAGS}" \ - src=${TOOLS_SRC_DIR} obj=${TOOLS_OBJ_DIR} \ - ${TOOLS_OBJ_DIR}/jailhouse-config-collect ${TOOLS_OBJ_DIR}/jailhouse +do_compile:prepend() { + # explicity call make to build the kernel module and tools + oe_runmake } -do_install() { - oe_runmake \ - PYTHON=python3 \ - V=1 \ - LDFLAGS="" \ - CC="${CC}" \ - ARCH=${JH_ARCH} \ - CROSS_COMPILE=${TARGET_PREFIX} \ - KDIR=${STAGING_KERNEL_BUILDDIR} \ - DESTDIR=${D} install +do_install:append() { + oe_runmake DESTDIR=${D} install install -d ${D}${CELL_DIR} install ${B}/configs/${JH_ARCH}/*.cell ${D}${CELL_DIR}/ @@ -99,12 +86,15 @@ do_install() { install ${B}/inmates/tools/${JH_ARCH}/linux-loader.bin ${D}${INMATES_DIR}/tools/${JH_ARCH} } -PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse" +PACKAGE_BEFORE_PN = "pyjailhouse" FILES:${PN} += "${nonarch_base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR}" -FILES:pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}/pyjailhouse" +# Remove libdir/* appended by setuptools3-base.bbclass for module split to work correctly +FILES:${PN}:remove = "${libdir}/*" +FILES:pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}" RDEPENDS:${PN} += " \ + pyjailhouse \ python3-curses \ python3-datetime \ python3-mmap \ @@ -119,4 +109,4 @@ RDEPENDS:pyjailhouse = " \ INSANE_SKIP:${PN} = "ldflags" -COMPATIBLE_MACHINE = "(mx8m)" +COMPATIBLE_MACHINE = "(mx8m-nxp-bsp|mx8ulp-nxp-bsp|mx9-nxp-bsp)" diff --git a/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch b/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch deleted file mode 100644 index df2f37ad..00000000 --- a/recipes-extended/jailhouse/jailhouse/0001-tools-scripts-update-shebang-to-python3.patch +++ /dev/null @@ -1,69 +0,0 @@ -From f07cd0e5f32a00a4091fa964d0dae0cd46c17554 Mon Sep 17 00:00:00 2001 -From: Cristinel Panfir <cristinel.panfir@nxp.com> -Date: Sat, 23 May 2020 08:51:31 +0000 -Subject: [PATCH] tools/scripts: update shebang to python3 - -Upstream-Status: Pending - -Signed-off-by: Cristinel Panfir <cristinel.panfir@nxp.com> ---- - scripts/arm64-parsedump.py | 2 +- - tools/jailhouse-cell-linux | 2 +- - tools/jailhouse-cell-stats | 2 +- - tools/jailhouse-config-create | 2 +- - tools/jailhouse-hardware-check | 2 +- - 5 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/scripts/arm64-parsedump.py b/scripts/arm64-parsedump.py -index 9519eb5..c695706 100755 ---- a/scripts/arm64-parsedump.py -+++ b/scripts/arm64-parsedump.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - # Jailhouse, a Linux-based partitioning hypervisor - # -diff --git a/tools/jailhouse-cell-linux b/tools/jailhouse-cell-linux -index 215932a..bcbb902 100755 ---- a/tools/jailhouse-cell-linux -+++ b/tools/jailhouse-cell-linux -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - # Jailhouse, a Linux-based partitioning hypervisor - # -diff --git a/tools/jailhouse-cell-stats b/tools/jailhouse-cell-stats -index 2f7e966..4c5289f 100755 ---- a/tools/jailhouse-cell-stats -+++ b/tools/jailhouse-cell-stats -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - # Jailhouse, a Linux-based partitioning hypervisor - # -diff --git a/tools/jailhouse-config-create b/tools/jailhouse-config-create -index 55601a6..9869b94 100755 ---- a/tools/jailhouse-config-create -+++ b/tools/jailhouse-config-create -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # - # Jailhouse, a Linux-based partitioning hypervisor - # -diff --git a/tools/jailhouse-hardware-check b/tools/jailhouse-hardware-check -index b86756a..0c8fb42 100755 ---- a/tools/jailhouse-hardware-check -+++ b/tools/jailhouse-hardware-check -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - # Jailhouse, a Linux-based partitioning hypervisor - # --- -2.7.4 - |