Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On 8/30/2019 12:50 PM, Denys Dmytriyenko wrote: On Fri, Aug 30, 2019 at 12:42:32PM -0400, Jacob Stiffler wrote: On 8/30/2019 12:31 PM, Denys Dmytriyenko wrote: On Fri, Aug 30, 2019 at 12:26:51PM -0400, Jacob Stiffler wrote: On 8/30/2019 12:23 PM, Denys Dmytriyenko wrote: On Thu, Aug 29, 2019 at 02:21:51PM +0530, Nikhil Devshatwar wrote: On 20/08/19 11:41 PM, Jacob Stiffler wrote: * Configure the linux-demo to use a ramfs for the linux inmate. * Using JH_RAMFS_IMAGE, this can be set in some global conf. Signed-off-by: Jacob Stiffler Tested-by: Nikhil Devshatwar 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? 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? 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. Denys Nikhil D --- recipes-kernel/jailhouse/jailhouse_git.bb | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb b/recipes-kernel/jailhouse/jailhouse_git.bb index 5d572d0..ba6772f 100644 --- a/recipes-kernel/jailhouse/jailhouse_git.bb +++ b/recipes-kernel/jailhouse/jailhouse_git.bb @@ -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 "" -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti
Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On Fri, Aug 30, 2019 at 12:42:32PM -0400, Jacob Stiffler wrote: > > On 8/30/2019 12:31 PM, Denys Dmytriyenko wrote: > >On Fri, Aug 30, 2019 at 12:26:51PM -0400, Jacob Stiffler wrote: > >>On 8/30/2019 12:23 PM, Denys Dmytriyenko wrote: > >>>On Thu, Aug 29, 2019 at 02:21:51PM +0530, Nikhil Devshatwar wrote: > On 20/08/19 11:41 PM, Jacob Stiffler wrote: > >* Configure the linux-demo to use a ramfs for the linux inmate. > >* Using JH_RAMFS_IMAGE, this can be set in some global conf. > > > >Signed-off-by: Jacob Stiffler > Tested-by: Nikhil Devshatwar > > 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? > >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? > >>>Denys > >>> > >>> > Nikhil D > > >--- > > recipes-kernel/jailhouse/jailhouse_git.bb | 21 + > > 1 file changed, 17 insertions(+), 4 deletions(-) > > > >diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb > >b/recipes-kernel/jailhouse/jailhouse_git.bb > >index 5d572d0..ba6772f 100644 > >--- a/recipes-kernel/jailhouse/jailhouse_git.bb > >+++ b/recipes-kernel/jailhouse/jailhouse_git.bb > >@@ -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 "" > > > -- > ___ > meta-ti mailing list > meta-ti@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-ti -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti
Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On 8/30/2019 12:31 PM, Denys Dmytriyenko wrote: On Fri, Aug 30, 2019 at 12:26:51PM -0400, Jacob Stiffler wrote: On 8/30/2019 12:23 PM, Denys Dmytriyenko wrote: On Thu, Aug 29, 2019 at 02:21:51PM +0530, Nikhil Devshatwar wrote: On 20/08/19 11:41 PM, Jacob Stiffler wrote: * Configure the linux-demo to use a ramfs for the linux inmate. * Using JH_RAMFS_IMAGE, this can be set in some global conf. Signed-off-by: Jacob Stiffler Tested-by: Nikhil Devshatwar 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? 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. Denys Nikhil D --- recipes-kernel/jailhouse/jailhouse_git.bb | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb b/recipes-kernel/jailhouse/jailhouse_git.bb index 5d572d0..ba6772f 100644 --- a/recipes-kernel/jailhouse/jailhouse_git.bb +++ b/recipes-kernel/jailhouse/jailhouse_git.bb @@ -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 "" -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti
Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On 8/30/2019 12:29 PM, Denys Dmytriyenko wrote: On Fri, Aug 30, 2019 at 12:23:43PM -0400, Jacob Stiffler wrote: On 8/30/2019 12:13 PM, Denys Dmytriyenko wrote: On Tue, Aug 20, 2019 at 02:11:12PM -0400, Jacob Stiffler wrote: * Configure the linux-demo to use a ramfs for the linux inmate. * Using JH_RAMFS_IMAGE, this can be set in some global conf. Signed-off-by: Jacob Stiffler --- recipes-kernel/jailhouse/jailhouse_git.bb | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb b/recipes-kernel/jailhouse/jailhouse_git.bb index 5d572d0..ba6772f 100644 --- a/recipes-kernel/jailhouse/jailhouse_git.bb +++ b/recipes-kernel/jailhouse/jailhouse_git.bb @@ -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? I like that idea better as well. 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)!" 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. 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. + 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 "" -- 2.7.4 -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti
Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On Fri, Aug 30, 2019 at 12:26:51PM -0400, Jacob Stiffler wrote: > > On 8/30/2019 12:23 PM, Denys Dmytriyenko wrote: > >On Thu, Aug 29, 2019 at 02:21:51PM +0530, Nikhil Devshatwar wrote: > >>On 20/08/19 11:41 PM, Jacob Stiffler wrote: > >>>* Configure the linux-demo to use a ramfs for the linux inmate. > >>>* Using JH_RAMFS_IMAGE, this can be set in some global conf. > >>> > >>>Signed-off-by: Jacob Stiffler > >>Tested-by: Nikhil Devshatwar > >> > >>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? 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. > >Denys > > > > > >>Nikhil D > >> > >>>--- > >>> recipes-kernel/jailhouse/jailhouse_git.bb | 21 + > >>> 1 file changed, 17 insertions(+), 4 deletions(-) > >>> > >>>diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb > >>>b/recipes-kernel/jailhouse/jailhouse_git.bb > >>>index 5d572d0..ba6772f 100644 > >>>--- a/recipes-kernel/jailhouse/jailhouse_git.bb > >>>+++ b/recipes-kernel/jailhouse/jailhouse_git.bb > >>>@@ -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 "" > >>> > >>-- > >>___ > >>meta-ti mailing list > >>meta-ti@yoctoproject.org > >>https://lists.yoctoproject.org/listinfo/meta-ti -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti
Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On Fri, Aug 30, 2019 at 12:23:43PM -0400, Jacob Stiffler wrote: > > On 8/30/2019 12:13 PM, Denys Dmytriyenko wrote: > >On Tue, Aug 20, 2019 at 02:11:12PM -0400, Jacob Stiffler wrote: > >>* Configure the linux-demo to use a ramfs for the linux inmate. > >>* Using JH_RAMFS_IMAGE, this can be set in some global conf. > >> > >>Signed-off-by: Jacob Stiffler > >>--- > >> recipes-kernel/jailhouse/jailhouse_git.bb | 21 + > >> 1 file changed, 17 insertions(+), 4 deletions(-) > >> > >>diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb > >>b/recipes-kernel/jailhouse/jailhouse_git.bb > >>index 5d572d0..ba6772f 100644 > >>--- a/recipes-kernel/jailhouse/jailhouse_git.bb > >>+++ b/recipes-kernel/jailhouse/jailhouse_git.bb > >>@@ -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? > > > I like that idea better as well. > > > > > >> 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)!" > >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. 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. > >>+ 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 "" > >>-- > >>2.7.4 > >> > >>-- > >>___ > >>meta-ti mailing list > >>meta-ti@yoctoproject.org > >>https://lists.yoctoproject.org/listinfo/meta-ti -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti
Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On 8/30/2019 12:23 PM, Denys Dmytriyenko wrote: On Thu, Aug 29, 2019 at 02:21:51PM +0530, Nikhil Devshatwar wrote: On 20/08/19 11:41 PM, Jacob Stiffler wrote: * Configure the linux-demo to use a ramfs for the linux inmate. * Using JH_RAMFS_IMAGE, this can be set in some global conf. Signed-off-by: Jacob Stiffler Tested-by: Nikhil Devshatwar 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? Denys Nikhil D --- recipes-kernel/jailhouse/jailhouse_git.bb | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb b/recipes-kernel/jailhouse/jailhouse_git.bb index 5d572d0..ba6772f 100644 --- a/recipes-kernel/jailhouse/jailhouse_git.bb +++ b/recipes-kernel/jailhouse/jailhouse_git.bb @@ -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 "" -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti
Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On Thu, Aug 29, 2019 at 02:21:51PM +0530, Nikhil Devshatwar wrote: > On 20/08/19 11:41 PM, Jacob Stiffler wrote: > >* Configure the linux-demo to use a ramfs for the linux inmate. > >* Using JH_RAMFS_IMAGE, this can be set in some global conf. > > > >Signed-off-by: Jacob Stiffler > > Tested-by: Nikhil Devshatwar > > 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 > Nikhil D > > >--- > > recipes-kernel/jailhouse/jailhouse_git.bb | 21 + > > 1 file changed, 17 insertions(+), 4 deletions(-) > > > >diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb > >b/recipes-kernel/jailhouse/jailhouse_git.bb > >index 5d572d0..ba6772f 100644 > >--- a/recipes-kernel/jailhouse/jailhouse_git.bb > >+++ b/recipes-kernel/jailhouse/jailhouse_git.bb > >@@ -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 "" > > > > -- > ___ > meta-ti mailing list > meta-ti@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-ti -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti
Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On 8/30/2019 12:13 PM, Denys Dmytriyenko wrote: On Tue, Aug 20, 2019 at 02:11:12PM -0400, Jacob Stiffler wrote: * Configure the linux-demo to use a ramfs for the linux inmate. * Using JH_RAMFS_IMAGE, this can be set in some global conf. Signed-off-by: Jacob Stiffler --- recipes-kernel/jailhouse/jailhouse_git.bb | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb b/recipes-kernel/jailhouse/jailhouse_git.bb index 5d572d0..ba6772f 100644 --- a/recipes-kernel/jailhouse/jailhouse_git.bb +++ b/recipes-kernel/jailhouse/jailhouse_git.bb @@ -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? I like that idea better as well. 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)!" 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. + 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 "" -- 2.7.4 -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti
Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On Tue, Aug 20, 2019 at 02:11:12PM -0400, Jacob Stiffler wrote: > * Configure the linux-demo to use a ramfs for the linux inmate. > * Using JH_RAMFS_IMAGE, this can be set in some global conf. > > Signed-off-by: Jacob Stiffler > --- > recipes-kernel/jailhouse/jailhouse_git.bb | 21 + > 1 file changed, 17 insertions(+), 4 deletions(-) > > diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb > b/recipes-kernel/jailhouse/jailhouse_git.bb > index 5d572d0..ba6772f 100644 > --- a/recipes-kernel/jailhouse/jailhouse_git.bb > +++ b/recipes-kernel/jailhouse/jailhouse_git.bb > @@ -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? > 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)!" Typo in the message. Also, should it be an error instead of a warning? > + 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 "" > -- > 2.7.4 > > -- > ___ > meta-ti mailing list > meta-ti@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-ti -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti
Re: [meta-ti] [master/thud][PATCH v2 3/3] jailhouse: use ramfs for linux-demo
On 20/08/19 11:41 PM, Jacob Stiffler wrote: * Configure the linux-demo to use a ramfs for the linux inmate. * Using JH_RAMFS_IMAGE, this can be set in some global conf. Signed-off-by: Jacob Stiffler Tested-by: Nikhil Devshatwar 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 --- recipes-kernel/jailhouse/jailhouse_git.bb | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/recipes-kernel/jailhouse/jailhouse_git.bb b/recipes-kernel/jailhouse/jailhouse_git.bb index 5d572d0..ba6772f 100644 --- a/recipes-kernel/jailhouse/jailhouse_git.bb +++ b/recipes-kernel/jailhouse/jailhouse_git.bb @@ -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 "" -- ___ meta-ti mailing list meta-ti@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-ti