@henrique.tx Thank you for the resources. I was able to create an overlay such as:
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
* Copyright 2023 Your Company Name
*/
/dts-v1/;
/plugin/;
/ {
compatible = "toradex,verdin-imx8mm";
};
&i2c1 {
status = "okay";
pca953x: gpio@21 {
compatible = "nxp,pca953x";
reg = <0x21>;
gpio-controller;
#gpio-cells = <2>;
};
};
and include it in the image using:
device-tree:
# >> Directories where to look for include files.
# include-dirs:
# - device-trees/include/
# >> Custom device tree source:
# custom: device-trees/dts-arm32/imx6ull-colibri-eval-v3.dts
# >> Device-tree overlays configuration:
overlays:
# >> Whether to ignore all overlays from the base image (or ostree
# >> archive in the future).
# clear: false
# >> Specific overlays not to use from base image (useful only when
# >> clear is false and not DT has been selected).
# remove:
# - apalis-imx8_hdmi_overlay.dtbo
# >> Overlays to add to output image.
add:
# - device-trees/overlays/display-edt7_overlay.dts
- device-trees/overlays/verdin-imx8mm_pca953x_overlay.dts
after deployment, I get the following msg in dmesg:
torizon@verdin-imx8mm-14756428:~$ dmesg | grep pca953x
[ 1.253226] pca953x 3-0021: using no AI
[ 1.253484] pca953x 3-0021: failed writing register
now since that device is not actually connected to the i2c, this is expected. But does this mean I was able to successfully create the image and the overlay was loaded or is it just a msg from the driver being autoloaded?
I noted the following messages during image build process:
=> Adding device-tree overlay 'device-trees/overlays/verdin-imx8mm_pca953x_overlay.dts'
2023-09-28 13:35:23,334 - torizon.tcbuilder.backend.dt - INFO - 'verdin-imx8mm_pca953x_overlay.dts' compiles successfully.
2023-09-28 13:35:23,388 - torizon.tcbuilder.cli.dto - INFO - Overlay verdin-imx8mm_pca953x_overlay.dtbo successfully applied.
2023-09-28 13:35:23,388 - torizon.tcbuilder.cli.build - INFO -
After this, I unpacked and deployed the image as follows:
ha-01@HA-01-PC:~/tcbdir$ torizoncore-builder images unpack output/torizon-core-docker-verdin-imx8mm-Tezi_6.3.0+build.4.CUSTOM/
Storage not empty. Delete current image before continuing? [y/N] y
Copying Toradex Easy Installer image.
Unpacking TorizonCore Toradex Easy Installer image.
Importing OSTree revision 8ea413da688e7e496937a04d5d217e13a7a3656251808d5fbf0be71b6c363b33 from local repository...
964 metadata, 9255 content objects imported; 588.4 MB content written
0 metadata, 0 content objects imported; 0 bytes content written
Unpacked OSTree from Toradex Easy Installer image:
Commit checksum: 8ea413da688e7e496937a04d5d217e13a7a3656251808d5fbf0be71b6c363b33
TorizonCore Version: 6.3.0+build.4-tcbuilder.20230928133540
ha-01@HA-01-PC:~/tcbdir$ torizoncore-builder deploy --remote-host 192.168.0.158 --remote-username torizon --remote-password hasann99 --reboot
Pulling OSTree with ref base (checksum 8ea413da688e7e496937a04d5d217e13a7a3656251808d5fbf0be71b6c363b33) from local archive repository...
Starting http server to serve OSTree.
OSTree server listening on "localhost:44279".
Starting OSTree pull on the device...
Deploying new OSTree on the device...
Deploying successfully finished.
Device reboot initiated...
But after the deployment, all my previously running application containers were still running as well.