Skip to contentSkip to conversation

jailhouse: update to ti2019.03-rc2

PATCH In review Jacob Stiffler 3 participants 21 messages Aug 20, 2019 – Aug 30, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/3 jailhouse: update to ti2019.03-rc2

* extend to am65xx family
* and correct am65xx cell and inmate filenames.
* remove earlycon bootargs for am65xx

---
v2 changes:
* Remove earlycon args for all k3

 recipes-kernel/jailhouse/jailhouse_git.bb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +5 -5
index 5e2c71b..d637d51 100644
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = " \
 "
 
 PV = "0.10+git${SRCPV}"
-SRCREV = "e71fd2dc7e8494a44cc3c762a24824532a412807"
+SRCREV = "96329f098e655cd42d7d0dbb3cd2cc7c3492d633"
 BRANCH = "ti-jailhouse-0.10"
 
 SRC_URI = " \
@@ -47,19 +47,19 @@ JH_CELL_FILES ?= "*.cell"
 JH_CELL_FILES_k3 ?= "k3-*.cell"
 
 JH_INMATE_DTB ?= ""
-JH_INMATE_DTB_am65xx-evm ?= "inmate-k3-am654.dtb"
+JH_INMATE_DTB_am65xx ?= "inmate-k3-am654-idk.dtb"
 JH_INMATE_DTB_j7-evm ?= "inmate-k3-j721e-evm.dtb"
 
 JH_LINUX_DEMO_CELL ?= ""
-JH_LINUX_DEMO_CELL_am65xx-evm ?= "k3-am654-linux-demo.cell"
+JH_LINUX_DEMO_CELL_am65xx ?= "k3-am654-idk-linux-demo.cell"
 JH_LINUX_DEMO_CELL_j7-evm ?= "k3-j721e-evm-linux-demo.cell"
 
 JH_SYSCONFIG_CELL ?= ""
-JH_SYSCONFIG_CELL_am65xx-evm ?= "k3-am654.cell"
+JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
 JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
 
 JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x2810000"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
 
 do_configure() {
 	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; 
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 2/3 jailhouse: provide tools package

Create a package containing the jailhouse tools which are used to work with the cells and inmates. This recipe provides a good example for using the jailhouse-cell-linux tool.

The tools require the pyjailhouse python modules, so package them as well.

---
 recipes-kernel/jailhouse/jailhouse_git.bb | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +20 -4
index d637d51..5d572d0 100644
@@ -29,7 +29,7 @@ RDEPENDS_${PN} += "\
 S = "${WORKDIR}/git"
 
 require jailhouse-arch.inc
-inherit module pythonnative bash-completion deploy
+inherit module pythonnative bash-completion deploy setuptools
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 COMPATIBLE_MACHINE = "(ti-soc)"
@@ -78,12 +78,21 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
 TOOLS_SRC_DIR = "${S}/tools"
 TOOLS_OBJ_DIR = "${S}/tools"
 
+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}"
+
+
 do_compile() {
-	oe_runmake V=1 ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}
+	oe_runmake V=1
 }
 
 do_install() {
-	oe_runmake ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR} DESTDIR=${D} install
+	# Install pyjailhouse python modules needed by the tools
+	distutils_do_install
+
+	# We want to install the python tools, but we do not want to use pip...
+	# At least with v0.10, we can work around this with
+	# 'PIP=":" PYTHON_PIP_USEABLE=yes'
+	oe_runmake PIP=: PYTHON_PIP_USEABLE=yes DESTDIR=${D} install
 
 	install -d ${D}${CELL_DIR}
 	install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/
@@ -115,8 +124,15 @@ do_install() {
 	fi
 }
 
-PACKAGE_BEFORE_PN = "kernel-module-jailhouse"
+PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools"
 FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot"
+FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
+FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*"
+
+RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression"
+RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell"
+
+RRECCOMMENDS_${PN} = "${PN}-tools"
 
 INSANE_SKIP_${PN} = "ldflags"
 
Signature · 1 line
2.7.4
Tested-by on v2 2/3
#2 lore raw

Re: [master/thud][PATCH v2 2/3] jailhouse: provide tools package

Quoted 8 lines · Jacob Stiffler

Create a package containing the jailhouse tools which are used to work with the cells and inmates. This recipe provides a good example for using the jailhouse-cell-linux tool.

The tools require the pyjailhouse python modules, so package them as well.

I had to specifically install the pyjailhouse IPK for pyjailhouse. You can add this in the meta-arago packagegroup recipe

Nikhil D

Quoted 59 lines
---
  recipes-kernel/jailhouse/jailhouse_git.bb | 24 ++++++++++++++++++++----
  1 file changed, 20 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +20 -4
index d637d51..5d572d0 100644
@@ -29,7 +29,7 @@ RDEPENDS_${PN} += "\
  S = "${WORKDIR}/git"
 
  require jailhouse-arch.inc
-inherit module pythonnative bash-completion deploy
+inherit module pythonnative bash-completion deploy setuptools
 
  PACKAGE_ARCH = "${MACHINE_ARCH}"
  COMPATIBLE_MACHINE = "(ti-soc)"
@@ -78,12 +78,21 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
  TOOLS_SRC_DIR = "${S}/tools"
  TOOLS_OBJ_DIR = "${S}/tools"
 
+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}"
+
+
  do_compile() {
-	oe_runmake V=1 ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}
+	oe_runmake V=1
  }
 
  do_install() {
-	oe_runmake ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR} DESTDIR=${D} install
+	# Install pyjailhouse python modules needed by the tools
+	distutils_do_install
+
+	# We want to install the python tools, but we do not want to use pip...
+	# At least with v0.10, we can work around this with
+	# 'PIP=":" PYTHON_PIP_USEABLE=yes'
+	oe_runmake PIP=: PYTHON_PIP_USEABLE=yes DESTDIR=${D} install
 
  	install -d ${D}${CELL_DIR}
  	install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/
@@ -115,8 +124,15 @@ do_install() {
  	fi
  }
 
-PACKAGE_BEFORE_PN = "kernel-module-jailhouse"
+PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools"
  FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot"
+FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
+FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*"
+
+RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression"
+RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell"
+
+RRECCOMMENDS_${PN} = "${PN}-tools"
 
  INSANE_SKIP_${PN} = "ldflags"
 
#3 lore raw

Re: [master/thud][PATCH v2 2/3] jailhouse: provide tools package

Quoted 8 lines · Nikhil Devshatwar
Quoted 7 lines · Jacob Stiffler

Create a package containing the jailhouse tools which are used to work with the cells and inmates. This recipe provides a good example for using the jailhouse-cell-linux tool.

The tools require the pyjailhouse python modules, so package them as well.

Quoted 7 lines
Quoted 1 line

I had to specifically install the pyjailhouse IPK for pyjailhouse. You can add this in the meta-arago packagegroup recipe

Shouldn't be necessary, as jailhouse-tools RDEPENDS on pyjailhouse. So pyjailhouse should be installed automatically when jailhouse-tools gets installed.

Denys

Quoted 59 lines

Nikhil D

Quoted 51 lines
---
 recipes-kernel/jailhouse/jailhouse_git.bb | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +20 -4
index d637d51..5d572d0 100644
@@ -29,7 +29,7 @@ RDEPENDS_${PN} += "\
 S = "${WORKDIR}/git"
 require jailhouse-arch.inc
-inherit module pythonnative bash-completion deploy
+inherit module pythonnative bash-completion deploy setuptools
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 COMPATIBLE_MACHINE = "(ti-soc)"
@@ -78,12 +78,21 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
 TOOLS_SRC_DIR = "${S}/tools"
 TOOLS_OBJ_DIR = "${S}/tools"
+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}"
+
+
 do_compile() {
-	oe_runmake V=1 ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}
+	oe_runmake V=1
 }
 do_install() {
-	oe_runmake ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR} DESTDIR=${D} install
+	# Install pyjailhouse python modules needed by the tools
+	distutils_do_install
+
+	# We want to install the python tools, but we do not want to use pip...
+	# At least with v0.10, we can work around this with
+	# 'PIP=":" PYTHON_PIP_USEABLE=yes'
+	oe_runmake PIP=: PYTHON_PIP_USEABLE=yes DESTDIR=${D} install
 	install -d ${D}${CELL_DIR}
 	install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/
@@ -115,8 +124,15 @@ do_install() {
 	fi
 }
-PACKAGE_BEFORE_PN = "kernel-module-jailhouse"
+PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools"
 FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot"
+FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
+FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*"
+
+RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression"
+RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell"
+
+RRECCOMMENDS_${PN} = "${PN}-tools"
 INSANE_SKIP_${PN} = "ldflags"
 
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#4 lore raw

Re: [master/thud][PATCH v2 2/3] jailhouse: provide tools package

Quoted 11 lines · Denys Dmytriyenko
Quoted 10 lines · Nikhil Devshatwar
Quoted 8 lines · Jacob Stiffler

Create a package containing the jailhouse tools which are used to work with the cells and inmates. This recipe provides a good example for using the jailhouse-cell-linux tool.

The tools require the pyjailhouse python modules, so package them as well.

Quoted 7 lines
Quoted 4 lines

I had to specifically install the pyjailhouse IPK for pyjailhouse. You can add this in the meta-arago packagegroup recipe

Shouldn't be necessary, as jailhouse-tools RDEPENDS on pyjailhouse. So pyjailhouse should be installed automatically when jailhouse-tools gets installed.

Perhaps it was due the the typo below in the RRECEOMMENDS. I fixed that in v3.

Quoted 46 lines

Denys

Quoted 43 lines

Nikhil D

Quoted 41 lines
---
  recipes-kernel/jailhouse/jailhouse_git.bb | 24 ++++++++++++++++++++----
  1 file changed, 20 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +13 -4
index d637d51..5d572d0 100644
@@ -29,7 +29,7 @@ RDEPENDS_${PN} += "\
  S = "${WORKDIR}/git"
  require jailhouse-arch.inc
-inherit module pythonnative bash-completion deploy
+inherit module pythonnative bash-completion deploy setuptools
  PACKAGE_ARCH = "${MACHINE_ARCH}"
  COMPATIBLE_MACHINE = "(ti-soc)"
@@ -78,12 +78,21 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
  TOOLS_SRC_DIR = "${S}/tools"
  TOOLS_OBJ_DIR = "${S}/tools"
+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}"
+
+
  do_compile() {
-	oe_runmake V=1 ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}
+	oe_runmake V=1
  }
  do_install() {
-	oe_runmake ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR} DESTDIR=${D} install
+	# Install pyjailhouse python modules needed by the tools
+	distutils_do_install
+
+	# We want to install the python tools, but we do not want to use pip...
+	# At least with v0.10, we can work around this with
+	# 'PIP=":" PYTHON_PIP_USEABLE=yes'
+	oe_runmake PIP=: PYTHON_PIP_USEABLE=yes DESTDIR=${D} install
  	install -d ${D}${CELL_DIR}
  	install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/
@@ -115,8 +124,15 @@ do_install() {
  	fi
  }
-PACKAGE_BEFORE_PN = "kernel-module-jailhouse"
+PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools"
Quoted 8 lines
Quoted 8 lines

recipes-kernel/jailhouse/jailhouse_git.bb do_install() { · line 135

Quoted 8 lines
recipes-kernel/jailhouse/jailhouse_git.bb +7 -0
  FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot"
+FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
+FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*"
+
+RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression"
+RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell"
+
+RRECCOMMENDS_${PN} = "${PN}-tools"

HERE.

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
recipes-kernel/jailhouse/jailhouse_git.bb +0 -0
  INSANE_SKIP_${PN} = "ldflags"
 
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#5 lore raw

Re: [master/thud][PATCH v2 2/3] jailhouse: provide tools package

In reply to Jacob Stiffler
Quoted 2 lines · Jacob Stiffler

Create a package containing the jailhouse tools which are used to work with the cells and inmates. This recipe provides a good example for

Should it be s/recipe/package/ here ^^^?

Quoted 4 lines

using the jailhouse-cell-linux tool.

The tools require the pyjailhouse python modules, so package them as well.

Any specific reason to package into own "pyjailhouse" package instead of bundling with ${PN}-tools, as it's the only consumer now?

Quoted 67 lines
---
 recipes-kernel/jailhouse/jailhouse_git.bb | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +20 -4
index d637d51..5d572d0 100644
@@ -29,7 +29,7 @@ RDEPENDS_${PN} += "\
 S = "${WORKDIR}/git"
 
 require jailhouse-arch.inc
-inherit module pythonnative bash-completion deploy
+inherit module pythonnative bash-completion deploy setuptools
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 COMPATIBLE_MACHINE = "(ti-soc)"
@@ -78,12 +78,21 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
 TOOLS_SRC_DIR = "${S}/tools"
 TOOLS_OBJ_DIR = "${S}/tools"
 
+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}"
+
+
 do_compile() {
-	oe_runmake V=1 ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}
+	oe_runmake V=1
 }
 
 do_install() {
-	oe_runmake ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR} DESTDIR=${D} install
+	# Install pyjailhouse python modules needed by the tools
+	distutils_do_install
+
+	# We want to install the python tools, but we do not want to use pip...
+	# At least with v0.10, we can work around this with
+	# 'PIP=":" PYTHON_PIP_USEABLE=yes'
+	oe_runmake PIP=: PYTHON_PIP_USEABLE=yes DESTDIR=${D} install
 
 	install -d ${D}${CELL_DIR}
 	install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/
@@ -115,8 +124,15 @@ do_install() {
 	fi
 }
 
-PACKAGE_BEFORE_PN = "kernel-module-jailhouse"
+PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools"
 FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot"
+FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
+FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*"
+
+RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression"
+RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell"
+
+RRECCOMMENDS_${PN} = "${PN}-tools"
 
 INSANE_SKIP_${PN} = "ldflags"
 
Signature · 7 lines
2.7.4

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#6 lore raw

Re: [master/thud][PATCH v2 2/3] jailhouse: provide tools package

Quoted 4 lines · Denys Dmytriyenko
Quoted 2 lines · Jacob Stiffler

Create a package containing the jailhouse tools which are used to work with the cells and inmates. This recipe provides a good example for

Should it be s/recipe/package/ here ^^^?

I did mean recipe as the do_install task show an usage example.

Quoted 7 lines
Quoted 5 lines

using the jailhouse-cell-linux tool.

The tools require the pyjailhouse python modules, so package them as well.

Any specific reason to package into own "pyjailhouse" package instead of bundling with ${PN}-tools, as it's the only consumer now?

It just seemed logical to me. pyjailhouse appears to be a proper python module, so I kept it separate.

Quoted 68 lines
Quoted 68 lines
---
  recipes-kernel/jailhouse/jailhouse_git.bb | 24 ++++++++++++++++++++----
  1 file changed, 20 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +20 -4
index d637d51..5d572d0 100644
@@ -29,7 +29,7 @@ RDEPENDS_${PN} += "\
  S = "${WORKDIR}/git"
 
  require jailhouse-arch.inc
-inherit module pythonnative bash-completion deploy
+inherit module pythonnative bash-completion deploy setuptools
 
  PACKAGE_ARCH = "${MACHINE_ARCH}"
  COMPATIBLE_MACHINE = "(ti-soc)"
@@ -78,12 +78,21 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
  TOOLS_SRC_DIR = "${S}/tools"
  TOOLS_OBJ_DIR = "${S}/tools"
 
+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}"
+
+
  do_compile() {
-	oe_runmake V=1 ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}
+	oe_runmake V=1
  }
 
  do_install() {
-	oe_runmake ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR} DESTDIR=${D} install
+	# Install pyjailhouse python modules needed by the tools
+	distutils_do_install
+
+	# We want to install the python tools, but we do not want to use pip...
+	# At least with v0.10, we can work around this with
+	# 'PIP=":" PYTHON_PIP_USEABLE=yes'
+	oe_runmake PIP=: PYTHON_PIP_USEABLE=yes DESTDIR=${D} install
 
  	install -d ${D}${CELL_DIR}
  	install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/
@@ -115,8 +124,15 @@ do_install() {
  	fi
  }
 
-PACKAGE_BEFORE_PN = "kernel-module-jailhouse"
+PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools"
  FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot"
+FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
+FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*"
+
+RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression"
+RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell"
+
+RRECCOMMENDS_${PN} = "${PN}-tools"
 
  INSANE_SKIP_${PN} = "ldflags"
 
Signature · 7 lines
2.7.4

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#7 lore raw

Re: [master/thud][PATCH v2 2/3] jailhouse: provide tools package

Quoted 9 lines · Jacob Stiffler
Quoted 4 lines · Denys Dmytriyenko
Quoted 2 lines · Jacob Stiffler

Create a package containing the jailhouse tools which are used to work with the cells and inmates. This recipe provides a good example for

Should it be s/recipe/package/ here ^^^?

I did mean recipe as the do_install task show an usage example.

Ah, Ok, now I see what you mean.

Quoted 10 lines
Quoted 6 lines
Quoted 4 lines

using the jailhouse-cell-linux tool.

The tools require the pyjailhouse python modules, so package them as well.

Any specific reason to package into own "pyjailhouse" package instead of bundling with ${PN}-tools, as it's the only consumer now?

It just seemed logical to me. pyjailhouse appears to be a proper python module, so I kept it separate.

Thanks.

Quoted 59 lines
Quoted 59 lines
Quoted 59 lines
---
 recipes-kernel/jailhouse/jailhouse_git.bb | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +20 -4
index d637d51..5d572d0 100644
@@ -29,7 +29,7 @@ RDEPENDS_${PN} += "\
 S = "${WORKDIR}/git"
 require jailhouse-arch.inc
-inherit module pythonnative bash-completion deploy
+inherit module pythonnative bash-completion deploy setuptools
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 COMPATIBLE_MACHINE = "(ti-soc)"
@@ -78,12 +78,21 @@ USER_SPACE_CFLAGS = '${CFLAGS} -DLIBEXECDIR=\\\"${libexecdir}\\\" \
 TOOLS_SRC_DIR = "${S}/tools"
 TOOLS_OBJ_DIR = "${S}/tools"
+EXTRA_OEMAKE = "ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}"
+
+
 do_compile() {
-	oe_runmake V=1 ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR}
+	oe_runmake V=1
 }
 do_install() {
-	oe_runmake ARCH=${JH_ARCH} CROSS_COMPILE=${TARGET_PREFIX} KDIR=${STAGING_KERNEL_BUILDDIR} DESTDIR=${D} install
+	# Install pyjailhouse python modules needed by the tools
+	distutils_do_install
+
+	# We want to install the python tools, but we do not want to use pip...
+	# At least with v0.10, we can work around this with
+	# 'PIP=":" PYTHON_PIP_USEABLE=yes'
+	oe_runmake PIP=: PYTHON_PIP_USEABLE=yes DESTDIR=${D} install
 	install -d ${D}${CELL_DIR}
 	install -m 0644 ${B}/configs/${JH_ARCH}/${JH_CELL_FILES} ${D}${CELL_DIR}/
@@ -115,8 +124,15 @@ do_install() {
 	fi
 }
-PACKAGE_BEFORE_PN = "kernel-module-jailhouse"
+PACKAGE_BEFORE_PN = "kernel-module-jailhouse pyjailhouse ${PN}-tools"
 FILES_${PN} = "${base_libdir}/firmware ${libexecdir} ${sbindir} ${JH_DATADIR} /boot"
+FILES_pyjailhouse = "${PYTHON_SITEPACKAGES_DIR}"
+FILES_${PN}-tools = "${libexecdir}/${BPN}/${BPN}-*"
+
+RDEPENDS_${PN}-tools = "pyjailhouse python-mmap python-math python-argparse python-datetime python-curses python-compression"
+RDEPENDS_pyjailhouse = "python-core python-ctypes python-fcntl python-shell"
+
+RRECCOMMENDS_${PN} = "${PN}-tools"
 INSANE_SKIP_${PN} = "ldflags"
Signature · 7 lines
2.7.4

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#8 lore raw

PATCH v2 3/3 jailhouse: use ramfs for linux-demo

In reply to Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

---
 recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +17 -4
index 5d572d0..ba6772f 100644
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
 JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
 JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
 
+JH_RAMFS_IMAGE ?= "core-image-minimal"
+
 JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
 
 do_configure() {
 	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; 
@@ -101,6 +103,16 @@ do_install() {
 	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
 
 	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
 
 	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
 		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
 		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
 			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
 			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
 			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
 			${DEPLOY_DIR_IMAGE}/Image \
 			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
 
 python __anonymous () {
     d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
 
     # Setup DEPENDS and RDEPENDS to included cells
     cells = d.getVar('CELLS', True) or ""
Signature · 1 line
2.7.4
Tested-by on v2 3/3
#9 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

Quoted 4 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

I manually built the core-image-minimal in cpio format with a bbappend of my own. How is this supposed to be built automatically?

Can you add a depends variable so that the build kicks automatically?

Nikhil D

Quoted 59 lines
---
  recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
  1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +17 -4
index 5d572d0..ba6772f 100644
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
  JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
  JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
 
+JH_RAMFS_IMAGE ?= "core-image-minimal"
+
  JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
 
  do_configure() {
  	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
@@ -101,6 +103,16 @@ do_install() {
  	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
 
  	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
 
  	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
  		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
  		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
  			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
  			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
  			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
  			${DEPLOY_DIR_IMAGE}/Image \
  			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
 
  python __anonymous () {
      d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
 
      # Setup DEPENDS and RDEPENDS to included cells
      cells = d.getVar('CELLS', True) or ""
#10 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

Quoted 4 lines · Nikhil Devshatwar
Quoted 3 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

Quoted 8 lines
Quoted 1 line

I manually built the core-image-minimal in cpio format with a bbappend of my own. How is this supposed to be built automatically?

Can you add a depends variable so that the build kicks automatically?

There's a proper DEPENDS being added in the anonymous function below, so should work automatically.

Denys

Quoted 61 lines

Nikhil D

Quoted 53 lines
---
 recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +17 -4
index 5d572d0..ba6772f 100644
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
 JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
 JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
+JH_RAMFS_IMAGE ?= "core-image-minimal"
+
 JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
 do_configure() {
 	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
@@ -101,6 +103,16 @@ do_install() {
 	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
 	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
 	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
 		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
 		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
 			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
 			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
 			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
 			${DEPLOY_DIR_IMAGE}/Image \
 			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
 python __anonymous () {
     d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
     # Setup DEPENDS and RDEPENDS to included cells
     cells = d.getVar('CELLS', True) or ""
 
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#11 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

Quoted 6 lines · Denys Dmytriyenko
Quoted 5 lines · Nikhil Devshatwar
Quoted 4 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

Quoted 8 lines
Quoted 6 lines

I manually built the core-image-minimal in cpio format with a bbappend of my own. How is this supposed to be built automatically?

Can you add a depends variable so that the build kicks automatically?

There's a proper DEPENDS being added in the anonymous function below, so should work automatically.

We do not have "cpio" in our IMAGE_TYPES, so it needs to be added for JH_RAMFS_IMAGE.

I cannot think of a way to force that IMAGE_TYPE from this recipe, but is there a way?

Quoted 63 lines

Denys

Quoted 60 lines

Nikhil D

Quoted 53 lines
---
  recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
  1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +17 -4
index 5d572d0..ba6772f 100644
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
  JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
  JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
+JH_RAMFS_IMAGE ?= "core-image-minimal"
+
  JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
  do_configure() {
  	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
@@ -101,6 +103,16 @@ do_install() {
  	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
  	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
  	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
  		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
  		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
  			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
  			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
  			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
  			${DEPLOY_DIR_IMAGE}/Image \
  			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
  python __anonymous () {
      d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
      # Setup DEPENDS and RDEPENDS to included cells
      cells = d.getVar('CELLS', True) or ""
 
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#12 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

Quoted 18 lines · Jacob Stiffler
Quoted 6 lines · Denys Dmytriyenko
Quoted 5 lines · Nikhil Devshatwar
Quoted 4 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

Quoted 8 lines
Quoted 6 lines

I manually built the core-image-minimal in cpio format with a bbappend of my own. How is this supposed to be built automatically?

Can you add a depends variable so that the build kicks automatically?

There's a proper DEPENDS being added in the anonymous function below, so should work automatically.

Quoted 5 lines

We do not have "cpio" in our IMAGE_TYPES, so it needs to be added for JH_RAMFS_IMAGE.

I cannot think of a way to force that IMAGE_TYPE from this recipe, but is there a way?

No, the only way is to check that IMAGE_FSTYPES contains "cpio" when JH_RAMFS_IMAGE is set and error out otherwise. Can be done in anonymous function to bail out early and not wait until JH builds.

Quoted 63 lines
Quoted 63 lines

Denys

Quoted 60 lines

Nikhil D

Quoted 53 lines
---
 recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +17 -4
index 5d572d0..ba6772f 100644
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
 JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
 JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
+JH_RAMFS_IMAGE ?= "core-image-minimal"
+
 JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
 do_configure() {
 	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
@@ -101,6 +103,16 @@ do_install() {
 	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
 	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
 	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
 		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
 		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
 			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
 			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
 			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
 			${DEPLOY_DIR_IMAGE}/Image \
 			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
 python __anonymous () {
     d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
     # Setup DEPENDS and RDEPENDS to included cells
     cells = d.getVar('CELLS', True) or ""
 
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#13 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

Quoted 17 lines · Denys Dmytriyenko
Quoted 16 lines · Jacob Stiffler
Quoted 14 lines · Denys Dmytriyenko
Quoted 11 lines · Nikhil Devshatwar
Quoted 4 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

I manually built the core-image-minimal in cpio format with a bbappend of my own. How is this supposed to be built automatically?

Can you add a depends variable so that the build kicks automatically?

There's a proper DEPENDS being added in the anonymous function below, so should work automatically.

Quoted 9 lines
Quoted 5 lines

We do not have "cpio" in our IMAGE_TYPES, so it needs to be added for JH_RAMFS_IMAGE.

I cannot think of a way to force that IMAGE_TYPE from this recipe, but is there a way?

No, the only way is to check that IMAGE_FSTYPES contains "cpio" when JH_RAMFS_IMAGE is set and error out otherwise. Can be done in anonymous function to bail out early and not wait until JH builds.

But cpio can be added as a recipe override, so preemptively detecting this could get tricky.

Quoted 63 lines
Quoted 63 lines
Quoted 63 lines

Denys

Quoted 60 lines

Nikhil D

Quoted 53 lines
---
  recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
  1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +17 -4
index 5d572d0..ba6772f 100644
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
  JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
  JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
+JH_RAMFS_IMAGE ?= "core-image-minimal"
+
  JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
  do_configure() {
  	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
@@ -101,6 +103,16 @@ do_install() {
  	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
  	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
  	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
  		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
  		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
  			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
  			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
  			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
  			${DEPLOY_DIR_IMAGE}/Image \
  			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
  python __anonymous () {
      d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
      # Setup DEPENDS and RDEPENDS to included cells
      cells = d.getVar('CELLS', True) or ""
 
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#14 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

Quoted 24 lines · Jacob Stiffler
Quoted 22 lines · Denys Dmytriyenko
Quoted 21 lines · Jacob Stiffler
Quoted 6 lines · Denys Dmytriyenko
Quoted 5 lines · Nikhil Devshatwar
Quoted 4 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

Quoted 8 lines
Quoted 6 lines

I manually built the core-image-minimal in cpio format with a bbappend of my own. How is this supposed to be built automatically?

Can you add a depends variable so that the build kicks automatically?

There's a proper DEPENDS being added in the anonymous function below, so should work automatically.

We do not have "cpio" in our IMAGE_TYPES, so it needs to be added for JH_RAMFS_IMAGE.

I cannot think of a way to force that IMAGE_TYPE from this recipe, but is there a way?

Quoted 7 lines
Quoted 4 lines

No, the only way is to check that IMAGE_FSTYPES contains "cpio" when JH_RAMFS_IMAGE is set and error out otherwise. Can be done in anonymous function to bail out early and not wait until JH builds.

But cpio can be added as a recipe override, so preemptively detecting this could get tricky.

All the overrides should be parsed and processed by the time anonymous functions are executed... Is there a specific use-case you have that doesn't work?

Quoted 63 lines
Quoted 63 lines
Quoted 63 lines
Quoted 63 lines

Denys

Quoted 60 lines

Nikhil D

Quoted 53 lines
---
 recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +17 -4
index 5d572d0..ba6772f 100644
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
 JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
 JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
+JH_RAMFS_IMAGE ?= "core-image-minimal"
+
 JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
 do_configure() {
 	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
@@ -101,6 +103,16 @@ do_install() {
 	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
 	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
 	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
 		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
 		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
 			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
 			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
 			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
 			${DEPLOY_DIR_IMAGE}/Image \
 			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
 python __anonymous () {
     d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
     # Setup DEPENDS and RDEPENDS to included cells
     cells = d.getVar('CELLS', True) or ""
 
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#15 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

Quoted 27 lines · Denys Dmytriyenko
Quoted 26 lines · Jacob Stiffler
Quoted 25 lines · Denys Dmytriyenko
Quoted 12 lines · Jacob Stiffler
Quoted 11 lines · Denys Dmytriyenko
Quoted 10 lines · Nikhil Devshatwar
Quoted 4 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

I manually built the core-image-minimal in cpio format with a bbappend of my own. How is this supposed to be built automatically?

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Can you add a depends variable so that the build kicks automatically?

There's a proper DEPENDS being added in the anonymous function below, so should work automatically.

We do not have "cpio" in our IMAGE_TYPES, so it needs to be added for JH_RAMFS_IMAGE.

I cannot think of a way to force that IMAGE_TYPE from this recipe, but is there a way?

No, the only way is to check that IMAGE_FSTYPES contains "cpio" when JH_RAMFS_IMAGE is set and error out otherwise. Can be done in anonymous function to bail out early and not wait until JH builds.

Quoted 5 lines
Quoted 2 lines

But cpio can be added as a recipe override, so preemptively detecting this could get tricky.

All the overrides should be parsed and processed by the time anonymous functions are executed... Is there a specific use-case you have that doesn't work?

If you only want cpio for the JH_RAMFS_IMAGE. For example, in some conf file:

IMAGE_FSTYPES = "tar.xz"

IMAGE_FSTYPES_append_pn-${JH_RAMFS_IMAGE} = " cpio"

The jailhouse recipe will incorrectly throw an error.

Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines
Quoted 64 lines

Denys

Quoted 60 lines

Nikhil D

Quoted 53 lines
---
  recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
  1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +17 -4
index 5d572d0..ba6772f 100644
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
  JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
  JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
+JH_RAMFS_IMAGE ?= "core-image-minimal"
+
  JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
  do_configure() {
  	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
@@ -101,6 +103,16 @@ do_install() {
  	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
  	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
  	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
  		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
  		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
  			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
  			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
  			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
  			${DEPLOY_DIR_IMAGE}/Image \
  			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
  python __anonymous () {
      d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
      # Setup DEPENDS and RDEPENDS to included cells
      cells = d.getVar('CELLS', True) or ""
 
Signature · 4 lines
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#16 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

In reply to Jacob Stiffler
Quoted 13 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

---
 recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +0 -0
index 5d572d0..ba6772f 100644

recipes-kernel/jailhouse/jailhouse_git.bb JH_SYSCONFIG_CELL ?= "" · line 61

Quoted 4 lines
recipes-kernel/jailhouse/jailhouse_git.bb +1 -0
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
 JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
 JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
 
+JH_RAMFS_IMAGE ?= "core-image-minimal"

Ok, after thinking about it a bit, I will agree to JH_RAMFS_IMAGE variable, but I don't want to loose the default INITRAMFS_IMAGE usage. So, how about changing the default here to something like this:

JH_RAMFS_IMAGE ?= "${INITRAMFS_IMAGE}"

That way either of the variables can be set my machine config or local.conf and the default use is also preserved. Thoughts?

Quoted 7 lines
recipes-kernel/jailhouse/jailhouse_git.bb +1 -1
 JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
 
 do_configure() {
 	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; 

recipes-kernel/jailhouse/jailhouse_git.bb do_install() { · line 112

Quoted 10 lines
recipes-kernel/jailhouse/jailhouse_git.bb +7 -0
@@ -101,6 +103,16 @@ do_install() {
 	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
 
 	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"

Typo in the message. Also, should it be an error instead of a warning?

Quoted 35 lines
recipes-kernel/jailhouse/jailhouse_git.bb +7 -3
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
 
 	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
 		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
 		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
 			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
 			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
 			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
 			${DEPLOY_DIR_IMAGE}/Image \
 			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
 
 python __anonymous () {
     d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
 
     # Setup DEPENDS and RDEPENDS to included cells
     cells = d.getVar('CELLS', True) or ""
Signature · 7 lines
2.7.4

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#17 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

Quoted 22 lines · Denys Dmytriyenko
Quoted 13 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

---
  recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
  1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +0 -0
index 5d572d0..ba6772f 100644

recipes-kernel/jailhouse/jailhouse_git.bb JH_SYSCONFIG_CELL ?= "" · line 61

Quoted 4 lines
recipes-kernel/jailhouse/jailhouse_git.bb +1 -0
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
  JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
  JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
 
+JH_RAMFS_IMAGE ?= "core-image-minimal"

Ok, after thinking about it a bit, I will agree to JH_RAMFS_IMAGE variable, but I don't want to loose the default INITRAMFS_IMAGE usage. So, how about changing the default here to something like this:

Quoted 4 lines

JH_RAMFS_IMAGE ?= "${INITRAMFS_IMAGE}"

That way either of the variables can be set my machine config or local.conf and the default use is also preserved. Thoughts?

I like that idea better as well.

Quoted 10 lines
Quoted 10 lines
recipes-kernel/jailhouse/jailhouse_git.bb +1 -1
  JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
 
  do_configure() {
  	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];
@@ -101,6 +103,16 @@ do_install() {
  	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
 
Quoted 9 lines

recipes-kernel/jailhouse/jailhouse_git.bb do_install() { · line 112

Quoted 8 lines
recipes-kernel/jailhouse/jailhouse_git.bb +7 -0
  	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"

Typo in the message. Also, should it be an error instead of a warning?

I did not want this recipe to force the requirement for an ramfs. But thinking about it now, making it an error is better in case the linux-demo is desired. If it is not, then JH_RAMFS_IMAGE can be unset in some conf.

Quoted 36 lines
Quoted 36 lines
recipes-kernel/jailhouse/jailhouse_git.bb +7 -3
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
 
  	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
  		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
  		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
  			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
  			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
  			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
  			${DEPLOY_DIR_IMAGE}/Image \
  			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
 
  python __anonymous () {
      d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
 
      # Setup DEPENDS and RDEPENDS to included cells
      cells = d.getVar('CELLS', True) or ""
Signature · 7 lines
2.7.4

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#18 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

Quoted 51 lines · Jacob Stiffler
Quoted 21 lines · Denys Dmytriyenko
Quoted 13 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

---
 recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +0 -0
index 5d572d0..ba6772f 100644

recipes-kernel/jailhouse/jailhouse_git.bb JH_SYSCONFIG_CELL ?= "" · line 60

Quoted 3 lines
recipes-kernel/jailhouse/jailhouse_git.bb +1 -0
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
 JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
 JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
+JH_RAMFS_IMAGE ?= "core-image-minimal"

Ok, after thinking about it a bit, I will agree to JH_RAMFS_IMAGE variable, but I don't want to loose the default INITRAMFS_IMAGE usage. So, how about changing the default here to something like this:

Quoted 4 lines

JH_RAMFS_IMAGE ?= "${INITRAMFS_IMAGE}"

That way either of the variables can be set my machine config or local.conf and the default use is also preserved. Thoughts?

I like that idea better as well.

Quoted 17 lines
Quoted 7 lines
recipes-kernel/jailhouse/jailhouse_git.bb +1 -1
 JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
 do_configure() {
 	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];

recipes-kernel/jailhouse/jailhouse_git.bb do_install() { · line 111

Quoted 9 lines
recipes-kernel/jailhouse/jailhouse_git.bb +7 -0
@@ -101,6 +103,16 @@ do_install() {
 	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
 	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"

Typo in the message. Also, should it be an error instead of a warning?

Quoted 3 lines

I did not want this recipe to force the requirement for an ramfs. But thinking about it now, making it an error is better in case the linux-demo is desired. If it is not, then JH_RAMFS_IMAGE can be unset in some conf.

Thanks. Can you do a v4 of all 3 patches quickly to address the comments in 1/3 and 3/3, so I can merge them in for rc4? Thanks again.

Quoted 32 lines
Quoted 32 lines
Quoted 32 lines
recipes-kernel/jailhouse/jailhouse_git.bb +7 -3
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
 	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
 		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
 		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
 			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
 			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
 			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
 			${DEPLOY_DIR_IMAGE}/Image \
 			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
 python __anonymous () {
     d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
     # Setup DEPENDS and RDEPENDS to included cells
     cells = d.getVar('CELLS', True) or ""
Signature · 7 lines
2.7.4

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#19 lore raw

Re: [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo

Quoted 48 lines · Denys Dmytriyenko
Quoted 47 lines · Jacob Stiffler
Quoted 21 lines · Denys Dmytriyenko
Quoted 13 lines · Jacob Stiffler

* Configure the linux-demo to use a ramfs for the linux inmate.
* Using JH_RAMFS_IMAGE, this can be set in some global conf.

---
  recipes-kernel/jailhouse/jailhouse_git.bb | 21 +++++++++++++++++----
  1 file changed, 17 insertions(+), 4 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +0 -0
index 5d572d0..ba6772f 100644

recipes-kernel/jailhouse/jailhouse_git.bb JH_SYSCONFIG_CELL ?= "" · line 60

Quoted 3 lines
recipes-kernel/jailhouse/jailhouse_git.bb +1 -0
@@ -58,8 +58,10 @@ JH_SYSCONFIG_CELL ?= ""
  JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
  JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
+JH_RAMFS_IMAGE ?= "core-image-minimal"

Ok, after thinking about it a bit, I will agree to JH_RAMFS_IMAGE variable, but I don't want to loose the default INITRAMFS_IMAGE usage. So, how about changing the default here to something like this:

Quoted 4 lines

JH_RAMFS_IMAGE ?= "${INITRAMFS_IMAGE}"

That way either of the variables can be set my machine config or local.conf and the default use is also preserved. Thoughts?

I like that idea better as well.

Quoted 16 lines
Quoted 6 lines
recipes-kernel/jailhouse/jailhouse_git.bb +1 -1
  JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8"
  do_configure() {
  	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ];

recipes-kernel/jailhouse/jailhouse_git.bb do_install() { · line 111

Quoted 9 lines
recipes-kernel/jailhouse/jailhouse_git.bb +7 -0
@@ -101,6 +103,16 @@ do_install() {
  	install -m 0644 ${B}/inmates/demos/${JH_ARCH}/*.bin ${D}${INMATES_DIR}
  	install -d ${D}/boot
+	if [ -n "${JH_RAMFS_IMAGE}" ]
+	then
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		then
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+		else
+			bbwarn "Could find find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"

Typo in the message. Also, should it be an error instead of a warning?

Quoted 5 lines
Quoted 3 lines

I did not want this recipe to force the requirement for an ramfs. But thinking about it now, making it an error is better in case the linux-demo is desired. If it is not, then JH_RAMFS_IMAGE can be unset in some conf.

Thanks. Can you do a v4 of all 3 patches quickly to address the comments in 1/3 and 3/3, so I can merge them in for rc4? Thanks again.

Sure. Just got to make sure they still build.

Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
recipes-kernel/jailhouse/jailhouse_git.bb +7 -3
+			bbwarn "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
+		fi
+	fi
  	if [ -n "${JH_INMATE_DTB}" -a -n "${JH_LINUX_DEMO_CELL}" ]; then
  		cd ${TOOLS_SRC_DIR}
@@ -110,6 +122,7 @@ do_install() {
  		./jailhouse-cell-linux -w ${D}${JH_DATADIR}/${JH_INMATE_DTB} \
  			-a ${JH_ARCH} -c "${JH_CMDLINE}" \
  			-d ../configs/${JH_ARCH}/dts/${JH_INMATE_DTB} \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}-${MACHINE}.cpio \
  			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
  			${DEPLOY_DIR_IMAGE}/Image \
  			| tr -cd '\11\12\15\40-\176' \
@@ -143,9 +156,9 @@ CELLS = ""
  python __anonymous () {
      d.appendVarFlag('do_install', 'depends', ' virtual/kernel:do_deploy')
-    initrd = d.getVar('INITRAMFS_IMAGE', True)
-    if initrd:
-        d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
+    ramfs = d.getVar('JH_RAMFS_IMAGE', True)
+    if ramfs:
+        d.appendVarFlag('do_install', 'depends', ' ${JH_RAMFS_IMAGE}:do_image_complete')
      # Setup DEPENDS and RDEPENDS to included cells
      cells = d.getVar('CELLS', True) or ""
Signature · 7 lines
2.7.4

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti
#20 lore raw
In reply to Jacob Stiffler

This won't apply, as v1 was already merged prior to v2:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/commit/?h=thud&id=ee2665f793d3280b67e82bc4fba4b538a9647912

Moreover, can you update to ti2019.03-rc4 tag - there were several commits since rc2:
http://git.ti.com/gitweb/?p=jailhouse/ti-jailhouse.git;a=shortlog;h=refs/heads/ti-jailhouse-0.10

Thanks.

Denys

Quoted 57 lines · Jacob Stiffler

* extend to am65xx family
* and correct am65xx cell and inmate filenames.
* remove earlycon bootargs for am65xx

---
v2 changes:
* Remove earlycon args for all k3

 recipes-kernel/jailhouse/jailhouse_git.bb | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
recipes-kernel/jailhouse/jailhouse_git.bb +5 -5
index 5e2c71b..d637d51 100644
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = " \
 "
 
 PV = "0.10+git${SRCPV}"
-SRCREV = "e71fd2dc7e8494a44cc3c762a24824532a412807"
+SRCREV = "96329f098e655cd42d7d0dbb3cd2cc7c3492d633"
 BRANCH = "ti-jailhouse-0.10"
 
 SRC_URI = " \
@@ -47,19 +47,19 @@ JH_CELL_FILES ?= "*.cell"
 JH_CELL_FILES_k3 ?= "k3-*.cell"
 
 JH_INMATE_DTB ?= ""
-JH_INMATE_DTB_am65xx-evm ?= "inmate-k3-am654.dtb"
+JH_INMATE_DTB_am65xx ?= "inmate-k3-am654-idk.dtb"
 JH_INMATE_DTB_j7-evm ?= "inmate-k3-j721e-evm.dtb"
 
 JH_LINUX_DEMO_CELL ?= ""
-JH_LINUX_DEMO_CELL_am65xx-evm ?= "k3-am654-linux-demo.cell"
+JH_LINUX_DEMO_CELL_am65xx ?= "k3-am654-idk-linux-demo.cell"
 JH_LINUX_DEMO_CELL_j7-evm ?= "k3-j721e-evm-linux-demo.cell"
 
 JH_SYSCONFIG_CELL ?= ""
-JH_SYSCONFIG_CELL_am65xx-evm ?= "k3-am654.cell"
+JH_SYSCONFIG_CELL_am65xx ?= "k3-am654-idk.cell"
 JH_SYSCONFIG_CELL_j7-evm ?= "k3-j721e-evm.cell"
 
 JH_CMDLINE ?= ""
-JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait earlycon=ns16550a,mmio32,0x2810000"
+JH_CMDLINE_k3 ?= "console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootfstype=ext4 rootwait"
 
 do_configure() {
 	if [ -d ${STAGING_DIR_HOST}/${CELLCONF_DIR} ]; 
Signature · 7 lines
2.7.4

-- 
_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti