Android 11 dtb and dtbo customization
On SECO Android 11 BSP it is possible to create and test custom “devicetree.dtb” and “overlay.dtbo” files for implementing and validating custom DISPLAY configuration or peripherals.
You can customize and test new dtb/dtbo files without using external resources, you just need the SECO board, and a PC (Windows or Linux) for connecting to it with ADB protocol (via USB cable or over IP).
Please refer to Connecting via ADB for detailed instructions on HOW TO connect the board via ADB.
Procedure
Connect to the board via ADB protocol (ref to Connecting via ADB for details) or via Serial cable
Enter in the folder /data/seco/dts_sources:
cd /data/seco/dts_sources
Inside “seco/” folder you will find the dts sources files you can modify and compile for changing default dtb or dtbo
Here is an example from c43 board:
You can edit .dts files using the vi editor included in our Android distribution and add or change dts code in the source files.
Example command for editing devicetree dts file on C43 board:
vi seco/seco-imx8qm-c43.dts
Example command for editing overlays dts file on C43 board:
vi seco/overlays/seco-imx8qm-c43-lvds-GENERIC-single-channel-overlay.dts
After having changed the sources file with the right setup, it is possible to compile dtb and dtbo binary files with the script ./dtscompile.sh <file_to_be_compiled>:
./dtscompile.sh seco/overlays/seco-imx8qm-c43-lvds-GENERIC-single-channel-overlay.dts
or:
Results will be copied in /data/seco/ folder:
/data/seco/overlay.dtbo
/data/seco/devicetree.dtb
You can edit /data/seco/android_seco.conf:
and add in it the following definitions:
N.B. If you are defining a new video output you need also to unconfigure any defined video:
The changes will be applied starting from the next reboot.
At startup pay attention to the following messages for verifying the new setup:
P.S. If you prefer you can edit dts files on your Desktop PC, and copy them using adb push command:
P.P.S. It is also possible to customize only the dtb or only the dtbo file. If only one of these files has been found, the default configuration will be used instead of the missing one.