diff mbox series

[master/scarthgap] recipes-ti: jailhouse: Update jailhouse for scarthgap

Message ID 20240709123359.3086351-1-p-bhagat@ti.com
State Superseded
Delegated to: Ryan Eatmon
Headers show
Series [master/scarthgap] recipes-ti: jailhouse: Update jailhouse for scarthgap | expand

Commit Message

Paresh Bhagat July 9, 2024, 12:33 p.m. UTC
Update SRCREV for jailhouse which incorporates makefile changes for
scarthgap.
Add ${ARAGO_IMAGE_SUFFIX} so that jailhouse can pick correct inmate
image for RT build.
Skip QA checks for usrmerge and buildpath. This is required to package
jailhouse in image.
Update FILES:${PN}.

Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
---
 .../recipes-ti/jailhouse/jailhouse_git.bb     | 20 +++++++++----------
 .../recipes-ti/jailhouse/ti-jailhouse.inc     |  2 +-
 2 files changed, 10 insertions(+), 12 deletions(-)

Comments

Denys Dmytriyenko July 9, 2024, 3:06 p.m. UTC | #1
On Tue, Jul 09, 2024 at 06:03:59PM +0530, Paresh Bhagat via lists.yoctoproject.org wrote:
> Update SRCREV for jailhouse which incorporates makefile changes for
> scarthgap.
> Add ${ARAGO_IMAGE_SUFFIX} so that jailhouse can pick correct inmate

NAK - this is meta-ti, no Arago specifics here.


> image for RT build.
> Skip QA checks for usrmerge and buildpath. This is required to package
> jailhouse in image.
> Update FILES:${PN}.
> 
> Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
> ---
>  .../recipes-ti/jailhouse/jailhouse_git.bb     | 20 +++++++++----------
>  .../recipes-ti/jailhouse/ti-jailhouse.inc     |  2 +-
>  2 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
> index 98ec0e9e..32e94dd0 100644
> --- a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
> +++ b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
> @@ -51,11 +51,11 @@ do_install() {
>  	install -d ${D}/boot
>  	if [ -n "${JH_RAMFS_IMAGE}" ]
>  	then
> -		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
> +		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio ]
>  		then
> -			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
> +			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio ${D}/boot
>  		else
> -			bberror "Could not find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
> +			bberror "Could not find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio)!"
>  			bberror "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
>  		fi
>  	fi
> @@ -68,7 +68,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 \
> +			-i ${D}/boot/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio \
>  			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
>  			${DEPLOY_DIR_IMAGE}/Image \
>  			| tr -cd '\11\12\15\40-\176' \
> @@ -96,7 +96,8 @@ RDEPENDS:pyjailhouse = "python3-core python3-ctypes python3-fcntl python3-shell"
>  
>  RRECOMMENDS:${PN} = "${PN}-tools"
>  
> -INSANE_SKIP:${PN} = "ldflags"
> +INSANE_SKIP:${PN} = "ldflags usrmerge"
> +INSANE_SKIP:${PN}-dbg = "usrmerge buildpaths"
>  
>  KERNEL_MODULE_AUTOLOAD += "jailhouse"
>  
> @@ -117,10 +118,7 @@ python __anonymous () {
>  }
>  
>  FILES:${PN} = " \
> -    /boot/* \
> -    /usr/libexec \
> -    /usr/sbin/* \
> -    /usr/libexec/* \
> -    /usr/share/* \
> -    /lib/firmware/* \
> +    /boot \
> +    /usr \
> +    /lib \
>  "
> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> index 6faf16b8..2831e560 100644
> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
>  COMPATIBLE_MACHINE = "am62xx|am62pxx"
>  TARGET_CC_ARCH += "${LDFLAGS}"
>  PV = "0.12+git"
> -SRCREV = "603819ef9a771a3c253a141220daab8e61751a43"
> +SRCREV = "9b494ddf4bd8845a2c1063352d08a274ef61777b"
>  BRANCH = "master"
>  SRC_URI = " \
>      git://git.ti.com/git/jailhouse/ti-jailhouse.git;protocol=https;branch=${BRANCH} \
> -- 
> 2.34.1
Ryan Eatmon July 9, 2024, 3:36 p.m. UTC | #2
On 7/9/2024 10:06 AM, Denys Dmytriyenko wrote:
> On Tue, Jul 09, 2024 at 06:03:59PM +0530, Paresh Bhagat via lists.yoctoproject.org wrote:
>> Update SRCREV for jailhouse which incorporates makefile changes for
>> scarthgap.
>> Add ${ARAGO_IMAGE_SUFFIX} so that jailhouse can pick correct inmate
> 
> NAK - this is meta-ti, no Arago specifics here.

Good catch.  I missed that.


> 
>> image for RT build.
>> Skip QA checks for usrmerge and buildpath. This is required to package
>> jailhouse in image.
>> Update FILES:${PN}.
>>
>> Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
>> ---
>>   .../recipes-ti/jailhouse/jailhouse_git.bb     | 20 +++++++++----------
>>   .../recipes-ti/jailhouse/ti-jailhouse.inc     |  2 +-
>>   2 files changed, 10 insertions(+), 12 deletions(-)
>>
>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
>> index 98ec0e9e..32e94dd0 100644
>> --- a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
>> +++ b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
>> @@ -51,11 +51,11 @@ do_install() {
>>   	install -d ${D}/boot
>>   	if [ -n "${JH_RAMFS_IMAGE}" ]
>>   	then
>> -		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
>> +		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio ]
>>   		then
>> -			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
>> +			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio ${D}/boot
>>   		else
>> -			bberror "Could not find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
>> +			bberror "Could not find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio)!"
>>   			bberror "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
>>   		fi
>>   	fi
>> @@ -68,7 +68,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 \
>> +			-i ${D}/boot/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio \
>>   			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
>>   			${DEPLOY_DIR_IMAGE}/Image \
>>   			| tr -cd '\11\12\15\40-\176' \
>> @@ -96,7 +96,8 @@ RDEPENDS:pyjailhouse = "python3-core python3-ctypes python3-fcntl python3-shell"
>>   
>>   RRECOMMENDS:${PN} = "${PN}-tools"
>>   
>> -INSANE_SKIP:${PN} = "ldflags"
>> +INSANE_SKIP:${PN} = "ldflags usrmerge"
>> +INSANE_SKIP:${PN}-dbg = "usrmerge buildpaths"
>>   
>>   KERNEL_MODULE_AUTOLOAD += "jailhouse"
>>   
>> @@ -117,10 +118,7 @@ python __anonymous () {
>>   }
>>   
>>   FILES:${PN} = " \
>> -    /boot/* \
>> -    /usr/libexec \
>> -    /usr/sbin/* \
>> -    /usr/libexec/* \
>> -    /usr/share/* \
>> -    /lib/firmware/* \
>> +    /boot \
>> +    /usr \
>> +    /lib \
>>   "
>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>> index 6faf16b8..2831e560 100644
>> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>> @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
>>   COMPATIBLE_MACHINE = "am62xx|am62pxx"
>>   TARGET_CC_ARCH += "${LDFLAGS}"
>>   PV = "0.12+git"
>> -SRCREV = "603819ef9a771a3c253a141220daab8e61751a43"
>> +SRCREV = "9b494ddf4bd8845a2c1063352d08a274ef61777b"
>>   BRANCH = "master"
>>   SRC_URI = " \
>>       git://git.ti.com/git/jailhouse/ti-jailhouse.git;protocol=https;branch=${BRANCH} \
>> -- 
>> 2.34.1
Ryan Eatmon July 9, 2024, 3:40 p.m. UTC | #3
On 7/9/2024 7:33 AM, Paresh Bhagat wrote:
> Update SRCREV for jailhouse which incorporates makefile changes for
> scarthgap.
> Add ${ARAGO_IMAGE_SUFFIX} so that jailhouse can pick correct inmate
> image for RT build.
> Skip QA checks for usrmerge and buildpath. This is required to package
> jailhouse in image.
> Update FILES:${PN}.
> 
> Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
> ---
>   .../recipes-ti/jailhouse/jailhouse_git.bb     | 20 +++++++++----------
>   .../recipes-ti/jailhouse/ti-jailhouse.inc     |  2 +-
>   2 files changed, 10 insertions(+), 12 deletions(-)
> 
> diff --git a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
> index 98ec0e9e..32e94dd0 100644
> --- a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
> +++ b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
> @@ -51,11 +51,11 @@ do_install() {
>   	install -d ${D}/boot
>   	if [ -n "${JH_RAMFS_IMAGE}" ]
>   	then
> -		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
> +		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio ]


Rather than referencing ARAGO_IMAGE_SUFFIX here, you need to modify the 
JH_RAMFS_IMAGE variable in meta-arago to include the ARAGO_IMAGE_SUFFIX.


>   		then
> -			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
> +			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio ${D}/boot
>   		else
> -			bberror "Could not find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
> +			bberror "Could not find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio)!"
>   			bberror "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
>   		fi
>   	fi
> @@ -68,7 +68,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 \
> +			-i ${D}/boot/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio \
>   			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
>   			${DEPLOY_DIR_IMAGE}/Image \
>   			| tr -cd '\11\12\15\40-\176' \
> @@ -96,7 +96,8 @@ RDEPENDS:pyjailhouse = "python3-core python3-ctypes python3-fcntl python3-shell"
>   
>   RRECOMMENDS:${PN} = "${PN}-tools"
>   
> -INSANE_SKIP:${PN} = "ldflags"
> +INSANE_SKIP:${PN} = "ldflags usrmerge"
> +INSANE_SKIP:${PN}-dbg = "usrmerge buildpaths"
>   
>   KERNEL_MODULE_AUTOLOAD += "jailhouse"
>   
> @@ -117,10 +118,7 @@ python __anonymous () {
>   }
>   
>   FILES:${PN} = " \
> -    /boot/* \
> -    /usr/libexec \
> -    /usr/sbin/* \
> -    /usr/libexec/* \
> -    /usr/share/* \
> -    /lib/firmware/* \
> +    /boot \
> +    /usr \
> +    /lib \
>   "
> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> index 6faf16b8..2831e560 100644
> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
> @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
>   COMPATIBLE_MACHINE = "am62xx|am62pxx"
>   TARGET_CC_ARCH += "${LDFLAGS}"
>   PV = "0.12+git"
> -SRCREV = "603819ef9a771a3c253a141220daab8e61751a43"
> +SRCREV = "9b494ddf4bd8845a2c1063352d08a274ef61777b"
>   BRANCH = "master"
>   SRC_URI = " \
>       git://git.ti.com/git/jailhouse/ti-jailhouse.git;protocol=https;branch=${BRANCH} \
Chirag Shilwant July 10, 2024, 2:35 p.m. UTC | #4
Hi Denys,
On 09/07/24 21:06, Ryan Eatmon wrote:
>
>
> On 7/9/2024 10:06 AM, Denys Dmytriyenko wrote:
>> On Tue, Jul 09, 2024 at 06:03:59PM +0530, Paresh Bhagat via 
>> lists.yoctoproject.org wrote:
>>> Update SRCREV for jailhouse which incorporates makefile changes for
>>> scarthgap.
>>> Add ${ARAGO_IMAGE_SUFFIX} so that jailhouse can pick correct inmate
>>
>> NAK - this is meta-ti, no Arago specifics here.
>
> Good catch.  I missed that.





That's a good point.

Meanwhile, I see an update is needed in same patch post we modify 
JH_RAMFS_IMAGE in meta-arago
to add ${ARAGO_IMAGE_SUFFIX}.

If we see [1], we are making do_install depend on 
|${JH_RAMFS_IMAGE}:do_image_complete.|
|So if ||${JH_RAMFS_IMAGE} has the RT suffix by default, the RT builds 
are failing with|
||
```

ERROR: Nothing PROVIDES 'tisdk-jailhouse-inmate-rt'

```

So, we need an update in |python __anonymous to not use 
||||${JH_RAMFS_IMAGE} in-order to avoid -rt suffix adding incase of RT 
builds.|
|What will be the ideal way to handle & fix the above issue?|

[1]: 
https://git.ti.com/cgit/arago-project/meta-ti/tree/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb?h=scarthgap#n110




>
>
>>
>>> image for RT build.
>>> Skip QA checks for usrmerge and buildpath. This is required to package
>>> jailhouse in image.
>>> Update FILES:${PN}.
>>>
>>> Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
>>> ---
>>>   .../recipes-ti/jailhouse/jailhouse_git.bb     | 20 
>>> +++++++++----------
>>>   .../recipes-ti/jailhouse/ti-jailhouse.inc     |  2 +-
>>>   2 files changed, 10 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb 
>>> b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
>>> index 98ec0e9e..32e94dd0 100644
>>> --- a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
>>> +++ b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
>>> @@ -51,11 +51,11 @@ do_install() {
>>>       install -d ${D}/boot
>>>       if [ -n "${JH_RAMFS_IMAGE}" ]
>>>       then
>>> -        if [ -f 
>>> ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
>>> +        if [ -f 
>>> ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio 
>>> ]
>>>           then
>>> -            install -m 0644 
>>> ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
>>> +            install -m 0644 
>>> ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio 
>>> ${D}/boot
>>>           else
>>> -            bberror "Could not find JH_RAMFS_IMAGE 
>>> (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
>>> +            bberror "Could not find JH_RAMFS_IMAGE 
>>> (${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio)!"
>>>               bberror "Please make sure that \"cpio\" is in 
>>> IMAGE_FSTYPES."
>>>           fi
>>>       fi
>>> @@ -68,7 +68,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 \
>>> +            -i 
>>> ${D}/boot/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio 
>>> \
>>>               ${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
>>>               ${DEPLOY_DIR_IMAGE}/Image \
>>>               | tr -cd '\11\12\15\40-\176' \
>>> @@ -96,7 +96,8 @@ RDEPENDS:pyjailhouse = "python3-core 
>>> python3-ctypes python3-fcntl python3-shell"
>>>     RRECOMMENDS:${PN} = "${PN}-tools"
>>>   -INSANE_SKIP:${PN} = "ldflags"
>>> +INSANE_SKIP:${PN} = "ldflags usrmerge"
>>> +INSANE_SKIP:${PN}-dbg = "usrmerge buildpaths"
>>>     KERNEL_MODULE_AUTOLOAD += "jailhouse"
>>>   @@ -117,10 +118,7 @@ python __anonymous () {
>>>   }
>>>     FILES:${PN} = " \
>>> -    /boot/* \
>>> -    /usr/libexec \
>>> -    /usr/sbin/* \
>>> -    /usr/libexec/* \
>>> -    /usr/share/* \
>>> -    /lib/firmware/* \
>>> +    /boot \
>>> +    /usr \
>>> +    /lib \
>>>   "
>>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc 
>>> b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>> index 6faf16b8..2831e560 100644
>>> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>> @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
>>>   COMPATIBLE_MACHINE = "am62xx|am62pxx"
>>>   TARGET_CC_ARCH += "${LDFLAGS}"
>>>   PV = "0.12+git"
>>> -SRCREV = "603819ef9a771a3c253a141220daab8e61751a43"
>>> +SRCREV = "9b494ddf4bd8845a2c1063352d08a274ef61777b"
>>>   BRANCH = "master"
>>>   SRC_URI = " \
>>> git://git.ti.com/git/jailhouse/ti-jailhouse.git;protocol=https;branch=${BRANCH} 
>>> \
>>> -- 
>>> 2.34.1
>
Paresh Bhagat July 11, 2024, 9:28 a.m. UTC | #5
Hi all,

On 10/07/24 20:05, Chirag Shilwant wrote:
> Hi Denys,
> On 09/07/24 21:06, Ryan Eatmon wrote:
>>
>>
>> On 7/9/2024 10:06 AM, Denys Dmytriyenko wrote:
>>> On Tue, Jul 09, 2024 at 06:03:59PM +0530, Paresh Bhagat via 
>>> lists.yoctoproject.org wrote:
>>>> Update SRCREV for jailhouse which incorporates makefile changes for
>>>> scarthgap.
>>>> Add ${ARAGO_IMAGE_SUFFIX} so that jailhouse can pick correct inmate
>>>
>>> NAK - this is meta-ti, no Arago specifics here.
>>
>> Good catch.  I missed that.
Will update this. Thanks
>
>
>
>
>
> That's a good point.
>
> Meanwhile, I see an update is needed in same patch post we modify 
> JH_RAMFS_IMAGE in meta-arago
> to add ${ARAGO_IMAGE_SUFFIX}.
>
> If we see [1], we are making do_install depend on 
> |${JH_RAMFS_IMAGE}:do_image_complete.|
> |So if ||${JH_RAMFS_IMAGE} has the RT suffix by default, the RT builds 
> are failing with|
> ||
> ```
>
> ERROR: Nothing PROVIDES 'tisdk-jailhouse-inmate-rt'
>
> ```
>
> So, we need an update in |python __anonymous to not use 
> ||||${JH_RAMFS_IMAGE} in-order to avoid -rt suffix adding incase of RT 
> builds.|
> |What will be the ideal way to handle & fix the above issue?|
>
> [1]: 
> https://git.ti.com/cgit/arago-project/meta-ti/tree/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb?h=scarthgap#n110
>
>
Yep i tried to update JH_RAMFS_IMAGE in meta-arago but the build failed 
as it adds tisdk-jailhouse-inmate-rt as a dependency for RT build 
instead of tisdk-jailhouse-inmate.
The JH_RAMFS_IMAGE is only to provide name of the inmate image recipe 
which will be build and packaged in tisdk-jailhouse-image. Instead of 
modifying this variable or adding a new variable for RT build, we can 
use * in do_install when the image is being packaged or referenced. This 
should work for both RT and non RT builds. I will send v2 for your review.
>
>
>>
>>
>>>
>>>> image for RT build.
>>>> Skip QA checks for usrmerge and buildpath. This is required to package
>>>> jailhouse in image.
>>>> Update FILES:${PN}.
>>>>
>>>> Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
>>>> ---
>>>>   .../recipes-ti/jailhouse/jailhouse_git.bb     | 20 
>>>> +++++++++----------
>>>>   .../recipes-ti/jailhouse/ti-jailhouse.inc     |  2 +-
>>>>   2 files changed, 10 insertions(+), 12 deletions(-)
>>>>
>>>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb 
>>>> b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
>>>> index 98ec0e9e..32e94dd0 100644
>>>> --- a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
>>>> +++ b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
>>>> @@ -51,11 +51,11 @@ do_install() {
>>>>       install -d ${D}/boot
>>>>       if [ -n "${JH_RAMFS_IMAGE}" ]
>>>>       then
>>>> -        if [ -f 
>>>> ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
>>>> +        if [ -f 
>>>> ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio 
>>>> ]
>>>>           then
>>>> -            install -m 0644 
>>>> ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
>>>> +            install -m 0644 
>>>> ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio 
>>>> ${D}/boot
>>>>           else
>>>> -            bberror "Could not find JH_RAMFS_IMAGE 
>>>> (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
>>>> +            bberror "Could not find JH_RAMFS_IMAGE 
>>>> (${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio)!"
>>>>               bberror "Please make sure that \"cpio\" is in 
>>>> IMAGE_FSTYPES."
>>>>           fi
>>>>       fi
>>>> @@ -68,7 +68,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 \
>>>> +            -i 
>>>> ${D}/boot/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio 
>>>> \
>>>>               ${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
>>>>               ${DEPLOY_DIR_IMAGE}/Image \
>>>>               | tr -cd '\11\12\15\40-\176' \
>>>> @@ -96,7 +96,8 @@ RDEPENDS:pyjailhouse = "python3-core 
>>>> python3-ctypes python3-fcntl python3-shell"
>>>>     RRECOMMENDS:${PN} = "${PN}-tools"
>>>>   -INSANE_SKIP:${PN} = "ldflags"
>>>> +INSANE_SKIP:${PN} = "ldflags usrmerge"
>>>> +INSANE_SKIP:${PN}-dbg = "usrmerge buildpaths"
>>>>     KERNEL_MODULE_AUTOLOAD += "jailhouse"
>>>>   @@ -117,10 +118,7 @@ python __anonymous () {
>>>>   }
>>>>     FILES:${PN} = " \
>>>> -    /boot/* \
>>>> -    /usr/libexec \
>>>> -    /usr/sbin/* \
>>>> -    /usr/libexec/* \
>>>> -    /usr/share/* \
>>>> -    /lib/firmware/* \
>>>> +    /boot \
>>>> +    /usr \
>>>> +    /lib \
>>>>   "
>>>> diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc 
>>>> b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>> index 6faf16b8..2831e560 100644
>>>> --- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>> +++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
>>>> @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = " \
>>>>   COMPATIBLE_MACHINE = "am62xx|am62pxx"
>>>>   TARGET_CC_ARCH += "${LDFLAGS}"
>>>>   PV = "0.12+git"
>>>> -SRCREV = "603819ef9a771a3c253a141220daab8e61751a43"
>>>> +SRCREV = "9b494ddf4bd8845a2c1063352d08a274ef61777b"
>>>>   BRANCH = "master"
>>>>   SRC_URI = " \
>>>> git://git.ti.com/git/jailhouse/ti-jailhouse.git;protocol=https;branch=${BRANCH} 
>>>> \
>>>> -- 
>>>> 2.34.1
>>
diff mbox series

Patch

diff --git a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
index 98ec0e9e..32e94dd0 100644
--- a/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
+++ b/meta-ti-extras/recipes-ti/jailhouse/jailhouse_git.bb
@@ -51,11 +51,11 @@  do_install() {
 	install -d ${D}/boot
 	if [ -n "${JH_RAMFS_IMAGE}" ]
 	then
-		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ]
+		if [ -f ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio ]
 		then
-			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}-${MACHINE}.cpio ${D}/boot
+			install -m 0644 ${DEPLOY_DIR_IMAGE}/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio ${D}/boot
 		else
-			bberror "Could not find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}-${MACHINE}.cpio)!"
+			bberror "Could not find JH_RAMFS_IMAGE (${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio)!"
 			bberror "Please make sure that \"cpio\" is in IMAGE_FSTYPES."
 		fi
 	fi
@@ -68,7 +68,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 \
+			-i ${D}/boot/${JH_RAMFS_IMAGE}${ARAGO_IMAGE_SUFFIX}-${MACHINE}.rootfs.cpio \
 			${D}${CELL_DIR}/${JH_LINUX_DEMO_CELL} \
 			${DEPLOY_DIR_IMAGE}/Image \
 			| tr -cd '\11\12\15\40-\176' \
@@ -96,7 +96,8 @@  RDEPENDS:pyjailhouse = "python3-core python3-ctypes python3-fcntl python3-shell"
 
 RRECOMMENDS:${PN} = "${PN}-tools"
 
-INSANE_SKIP:${PN} = "ldflags"
+INSANE_SKIP:${PN} = "ldflags usrmerge"
+INSANE_SKIP:${PN}-dbg = "usrmerge buildpaths"
 
 KERNEL_MODULE_AUTOLOAD += "jailhouse"
 
@@ -117,10 +118,7 @@  python __anonymous () {
 }
 
 FILES:${PN} = " \
-    /boot/* \
-    /usr/libexec \
-    /usr/sbin/* \
-    /usr/libexec/* \
-    /usr/share/* \
-    /lib/firmware/* \
+    /boot \
+    /usr \
+    /lib \
 "
diff --git a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
index 6faf16b8..2831e560 100644
--- a/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
+++ b/meta-ti-extras/recipes-ti/jailhouse/ti-jailhouse.inc
@@ -14,7 +14,7 @@  LIC_FILES_CHKSUM = " \
 COMPATIBLE_MACHINE = "am62xx|am62pxx"
 TARGET_CC_ARCH += "${LDFLAGS}"
 PV = "0.12+git"
-SRCREV = "603819ef9a771a3c253a141220daab8e61751a43"
+SRCREV = "9b494ddf4bd8845a2c1063352d08a274ef61777b"
 BRANCH = "master"
 SRC_URI = " \
     git://git.ti.com/git/jailhouse/ti-jailhouse.git;protocol=https;branch=${BRANCH} \