Manipulate Tezi metadata in Yocto

Hello,

I would like to customise the meta data from the Tezi image in Yocto as follows:

TEZI_AUTO_INSTALL ?= "true"
TEZI_EULA_FILE ?= "general license"
TEZI_EULA_FILE:ti-soc ?= "general license"

I already have a bbappend file for tezi-metadata and would like to set the variables there. However, I get a rather long Python error. Before I fight my way through it, is this the right approach?

Greetings
Philipp

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Yes, you are on the right track by using a .bbappend file to customize the Tezi metadata in Yocto. The variables you mentioned (TEZI_AUTO_INSTALL, TEZI_EULA_FILE, etc.) are indeed the correct ones to set for customizing the Toradex Easy Installer (Tezi) behavior.

However, encountering a Python error suggests there might be an issue with how the variables are being set or with the syntax in your .bbappend file. Here are a few steps to help you troubleshoot:

  1. Check Syntax: Ensure that the syntax in your .bbappend file is correct. For example:

    TEZI_AUTO_INSTALL = "true"
    TEZI_EULA_FILE = "general license"
    TEZI_EULA_FILE:ti-soc = "general license"
    
  2. Variable Scope: Make sure that the variables are being set in the correct scope. If you are setting these variables conditionally, ensure that the conditions are correctly defined.

  3. Layer Dependencies: Ensure that your layer dependencies are correctly set up. The tezi-metadata recipe should be available and correctly included in your build.

  4. Debugging: Use the bitbake -e <recipe> command to inspect the environment and see how the variables are being set. This can help identify if there are any conflicts or overrides happening.

If the error persists, it might be helpful to look at the specific Python error message to understand what part of the build process is failing. This can provide more insight into whether the issue is with the variable setting or something else in the build process.

Best regards,
Toradex AI Assistant

Hi @philipp1 !

To be honest I have never modified the TEZI_EULA_FILE.

But from the source code in tezi-metadata.bb, it is clear to me that having a string with spaces in there will cause issues.

https://git.toradex.com/cgit/meta-toradex-bsp-common.git/tree/recipes-bsp/tezi-metadata/tezi-metadata_0.3.bb?h=kirkstone-6.x.y#n13

SRC_URI = " \
    file://prepare.sh \
    file://wrapup.sh \
    file://toradexlinux.png \
    file://marketing.tar;unpack=false \
    file://${TEZI_EULA_FILE} \
"

Is the issue you are seeing related to this?

Would you be able to share more details about your use-case around modifying TEZI_EULA_FILE?

Knowing what is your end goal might help us to give you a suitable recommendation for your use case :slight_smile:

Best regards,

Hello @henrique.tx

Thanks for the answer. Yes, the issu is related to this file name.

I would like to update my Tezi image automatically and also create a 3rd partition in the json file.

Best regards,
philipp

Hi @philipp1 !

Thanks for the information.

My curiosity was on why you would need to modify specifically TEZI_EULA_FILE. Could you elaborate on that?

Also, regarding the issue you were having, is it now solved?

Best regards,

Hello @henrique.tx

I got this information from the following article https://developer.toradex.com/easy-installer/toradex-easy-installer/production-programming-for-linux#automatic-installation

I initially did it by changing the tezi class, but it is not a good solution in my opinion. Is there a possibility to realise the automatic installation and the extension of a 3rd partition via a bappend recipe?

Hi @philipp1 !

Now I got it :slight_smile:
According to that documentation, you should remove the license line:

  1. Remove the license property to bypass the acceptance check. Note: This will automatically accept all licenses in the image.

You can also see that there is a minus before the "license":"general license" and the line is read, just like in a git diff :slight_smile:

(TBH, I didn’t quickly get it at first :sweat_smile:, but it is there.)

So, seems like that you need:

  1. TEZI_EULA_FILE = ""
    1.1. maybe this is not mandatory… I am not currently sure
  2. TEZI_EULA_URL = ""
    2.1. so you have no issues with image_type_tezi.bbclass trying to download it
  3. TEZI_SHOW_EULA_LICENSE = 0
    3.1. so the license: "something" line won’t be in your resulting image.json
    3.2. this variable is defined in tdx-base.inc, which is used by the distro conf files (e.g. tdx-xwayland.conf), so it is possible that you need to “create” your own distro (based on the distro that you are already using) for your redefinition of this variable to be picked up.

I came up with this just by looking at the layers/recipes. In other words, I didn’t try it myself yet. Kindly try this on your side and let me know how it goes.


Looking further, seems like the way to do it is by creating your own image_type_tezi.bbclass, based on Toradex’s.

This other thread might be useful for you:

Best regards,

Hi @philipp1 !

Do you have any updates here? Were you able to implement it?

Best regards,

Hello @henrique.tx,

the way via a bbappend file did not work. But we use the way via a separate class. That works.

Best regards
Philipp

Hi @philipp1 !

Thanks for the feedback.

I marked your last message as the solution :slight_smile:

Best regards,