Hi Denys,

On 07/06/23 04:00, Denys Dmytriyenko wrote:
On Tue, Jun 06, 2023 at 07:32:37PM +0530, Paresh Bhagat via 
lists.yoctoproject.org wrote:
Add a recipe to build and package jailhouse image for am62xx-evm. new image will
be named as tisdk-jailhouse-image. jailhouse recipe will also package overlay
used for jailhouse.

Add functionality to change kernel and u-boot source via MACHINE_FEATURES for
jailhouse. so if MACHINE_FEATURES:append = " jailhouse" is added to local.conf
different recipe for kernel (linux-ti-extras) and u-boot (u-boot-ti-extras) will
be used.

So for jailhouse build for am62xx-evm user will have to add
MACHINE_FEATURES:append = " jailhouse" to local.conf and then start a jailhouse
build with MACHINE=am62xx-evm bitbake -k tisdk-jailhouse-image.

Signed-off-by: Paresh Bhagat <[email protected]>
---
  .../conf/distro/include/arago-prefs.inc            |  7 +++++++
  .../recipes-core/images/tisdk-jailhouse-image.bb   | 14 ++++++++++++++
  2 files changed, 21 insertions(+)
  create mode 100644 
meta-arago-distro/recipes-core/images/tisdk-jailhouse-image.bb

diff --git a/meta-arago-distro/conf/distro/include/arago-prefs.inc 
b/meta-arago-distro/conf/distro/include/arago-prefs.inc
index 34c3c539..40269b56 100644
--- a/meta-arago-distro/conf/distro/include/arago-prefs.inc
+++ b/meta-arago-distro/conf/distro/include/arago-prefs.inc
@@ -19,3 +19,10 @@ PREFERRED_PROVIDER_wpa-supplicant = "wpa-supplicant"
  #PREFERRED_PROVIDER_wpa-supplicant:ti33x = "wpa-supplicant-wl18xx"
  #PREFERRED_PROVIDER_wpa-supplicant:ti43x = "wpa-supplicant-wl18xx"
  #PREFERRED_PROVIDER_wpa-supplicant:omap-a15 = "wpa-supplicant-wl18xx"
+
+# change kernel when jailhouse image is build
+PREFERRED_PROVIDER_virtual/kernel = 
"${@bb.utils.contains('MACHINE_FEATURES','jailhouse','linux-ti-extras','linux-ti-staging',d)}"
+
+#Change uboot source when jailhouse image is build
+PREFERRED_PROVIDER_virtual/bootloader = 
"${@bb.utils.contains('MACHINE_FEATURES','jailhouse','u-boot-ti-extras','u-boot-ti-staging',d)}"
+PREFERRED_PROVIDER_u-boot = 
"${@bb.utils.contains('MACHINE_FEATURES','jailhouse','u-boot-ti-extras','u-boot-ti-staging',d)}"
This would conflict with all the other places PREFERRED_PROVIDERs are being
set. In other words, if "jailhouse" in MACHINE_FEATURES is not set, you are
forcing everyone into "ti-staging" trees, which is not always the case!
What about "bb.org" trees, or "next", or "mainline" or any downstream ones?

based on your review, i tried changing PREFERRED_PROVIDERs in tisdk-jailhouse-image.bb using:

if 'jailhouse' in d.getVar('MACHINE_FEATURES',True).split():
    d.setVar('PREFERRED_PROVIDER_virtual/kernel', 'linux-ti-extras')
    d.setVar('PREFERRED_PROVIDER_virtual/bootloader', 'u-boot-ti-extras')
    d.setVar('PREFERRED_PROVIDER_u-boot', 'u-boot-ti-extras')

i added above code to do_configure:append() . also tried adding above code inside a custom function "do_change_provider()" and used "addtask do_change_provider" inside tisdk-jailhouse-image recipe. but either the build failed or the preferred_providers didn't change. can you help with this or suggest any alternate method we can use? We want to change preferred_providers if MACHINE_FEATURES has jailhouse and not have a conflict with other places as you mentioned.

Thanks

diff --git a/meta-arago-distro/recipes-core/images/tisdk-jailhouse-image.bb 
b/meta-arago-distro/recipes-core/images/tisdk-jailhouse-image.bb
new file mode 100644
index 00000000..af880d30
--- /dev/null
+++ b/meta-arago-distro/recipes-core/images/tisdk-jailhouse-image.bb
@@ -0,0 +1,14 @@
+# Produces wic image for jailhouse
+
+require recipes-core/images/tisdk-default-image.bb
+
+COMPATIBLE_MACHINE = "am62xx-evm"
+
+IMAGE_INSTALL:append:am62xx-evm = " jailhouse"
+
+# Package overlay for jailhouse
+KERNEL_DEVICETREE:append:am62xx-evm = " ti/k3-am625-base-board-jailhouse.dtbo"
+
+export IMAGE_BASENAME = "tisdk-jailhouse-image"
+
+WIC_CREATE_EXTRA_ARGS:append = " --no-fstab-update"
--
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14519): 
https://lists.yoctoproject.org/g/meta-arago/message/14519
Mute This Topic: https://lists.yoctoproject.org/mt/99363698/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to