Add own dts and add it in the update.sh script

Hi
I managed to have my own dts specific for my board. I’m able to generate a .dtb, is available in the deploy/images/colibri-imx6 and even in the image_*_.tar.bz2. So far so good.
With the last step I’m struggling. What is the preferred way to add the new dtb file in the update.sh script?

I did not found a way to teach the script from outside.
The only way I see is to make a copy of the script and add it in my own image layer.
But how to add it in the Image? In the tdx-image-fstype.inc, image_deploy_arm() the source directory
for all burn tools is specified in ${BURNFLASH}. When I change this, then I have to move all tools.
There must be a better way…

Thanks for your help
Stefan

Hi,

In order to make it clean dtb from start to finish you need to alter 2 things:

  1. machine.conf - add new dtb to the list of current dtb’s or substitute one of them - your choice
  2. update.sh (located in meta-toradex-demos/recipes-images/images/files/library/imx6) and in your device (colibri-imx6) add your device tree to KERNEL_DEVICETREE variable

Regards,

Joao

Hi
thanks for the answer.

  1. Step done
    The machine.conf is defined in meta-freescale-3rdparty/conf/machine/colibri-imx6.conf
    so I added my dtb in a own linux-toradex_4.9-1.0.x.bbappend
  • KERNEL_DEVICETREE += " imx6dl-colibri-xyx-v1.dtb"
    I expect that is correct.
  1. Step
    I made a copy of update.sh, add add my dtb in KERNEL_DEVICETREE and save it in my image-layer.
    How can I tune the image building image_deploy_arm() from tdx-image-fstype.inc to include my modified update.sh

Regards Stefan

If you change the update.sh in the directory I mentioned, the next image you build should have your updated update.sh

You basically modify the default update.sh to suit your needs

EDIT: Don’t forget to change the fdt_file uboot environmental variable for your device tree to take effect!

Regards

Ah sorry I did not understand that.

That’s the method I used to mod some files or recipes that are not created by me.

I create patches for sources but I keep a record of the files I change inside other repos…

Can’t help you with that, sorry!

  1. You can also add KERNEL_DEVICETREE += " imx6dl-colibri-xyx-v1.dtb" to your local.conf file. That way you don’t need to create additional .bbappend.

  2. Use image created for Toradex Easy Installer which has everything in place for you.

Regards, Sandi Mlinar

Hi Joao
Yes I can do this, BUT where should I git-push the modification?
So I have to maintain a own repo with my modifications of your meta-toradex-demos.
This is NOT how I learnt we should deal with modification within Yocto.
Regards Stefan

Hi Joao
Yes I can do this, BUT where should I git-push the modification?
So I have to maintain a own repo with my modifications of your meta-toradex-demos.
This is NOT how I learnt we should deal with modification within Yocto.
Regards Stefan

Hi Joao
Thanks for your help, I’ll find a solution.
Regards Stefan

For 2) I guess the only way to properly overwrite this in your own layer is to create your own image, include tdx-image-fstype.inc and overwrite imagedeploy_arm. Alternatively, just copy through the complete file tdx-image-fstype.inc.

Note that we are aware that the image generation process is not entirely ideal as it is now. It should be an image class. That is why we are using a custom image class for Toradex Easy Installer images (see meta-toradex-bsp-common/classes/image_type_tezi.bbclass).

Thanks a lot for your help. Over the long run, we plan to write our own image creation class to sign our images.
Meanwhile I can work copy the imagedeploy_arm()