Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can customize and test new dtb/dtbo file 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).

...

  • 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_sourcesources:

    • cd /data/seco/dts_sourcesources

  • 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 adding or changing sections add or change dts code in the source files.

    • Example command for editing devicetree dts file on C43 board:

      Code Block
      vi seco/seco-imx8qm-c43.dts
    • Example command for editing overlays dts file on C43 board:

      Code Block
      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_compied>compiled>:

    Code Block
    ./dtscompile.sh  seco/overlays/seco-imx8qm-c43-lvds-GENERIC-single-channel-overlay.dts
  • or:

    Code Block
    ./dtscompile.sh  seco/seco-imx8qm-c43.dts
  • Results will be copied in /data/seco/ folder:

    • /data/seco/overlay.dtbo

    • /data/seco/devicetree.dtb

  • You can edit /data/seco/android_seco.conf:

    Code Block
    vi /data/seco/android_seco.conf
  • and add in it the following definitions:

    Code Block
    ### Enable dtb customization
    #
    enablecustomization=true
    
    ### Definitions for dtb custom file
    customdtb=devicetree.dtb
    
    ### Definitions for device tree overlay custom file
    customdtbo=overlay.dtbo
    
  • N.B. If you are defining a new video output you need also to unconfigure any defined video:

    Code Block
    ### Force video selection. 
    # Posible values are: NONE, LVD0, ... LVD6, HDM0, HIN0, EDP0, HLV0, ELV0, LEH0, EHD0
    videosel=NONE
    
  • The changes will be applied starting from the next reboot.

  • At startup pay attention to the following messages for verifying the new setup:

    Code Block
    switch to partitions #0, OK
    mmc0(part 0) is current device
    587 bytes read in 11 ms (51.8 KiB/s)
     verify OK, boot 'boot_a'
    Found custom dtb of size 165905 in path /misc/seco/devicetree.dtb  <----
    165905 bytes read in 13 ms (12.2 MiB/s)       <---------- size
    Found custom dtbo of size 3147 in path /misc/seco/overlay.dtbo    <-----
    3147 bytes read in 12 ms (255.9 KiB/s)        <---------- size
    Warn! Can't find videoselection NONE in dtbo image.    <-------
    Kernel load addr 0x80280000 size 43283 KiB
    kernel   @ 80280000 (44321280)
    ramdisk  @ 86400000 (8505136)
    fdt       @ 83e80000 (165905)       <----------  size
    ## Flattened Device Tree blob at 83e80000
       Booting using the fdt blob at 0x83e80000
       Using Device Tree in place at 0000000083e80000, end 0000000083f2bfff
    
    
  • P.S. If you prefer you can edit dts files on your Desktop PC, and copy them using adb push command:

    Code Block
    adb push seco-imx8qm-c43.dts /data/seco/seco/seco-imx8qm-c43.dts
    adb push test.dtb /data/seco/overlays/seco-imx8qm-c43-lvds-GENERIC-single-channel-overlay.dts
    
  • 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.