How do I rebuild Coral mendel with a devicetree modification?

973 views Asked by At

I'm trying to modify the devicetree on my Coral SoM to support a different DSI display, and could use some pointers.

I edited arch/arm64/boot/dts/freescale/fsl-imx8mq-phanbell.dts then used 'm' to make all

Question:

  1. What is the correct way to modify the devicetree, build and load it to the board!?

Thanks!

2

There are 2 answers

0
Nam Vu On BEST ANSWER

can you give a little more details on the changes? You can definitely do it that way, and I believe you don't need to rebuilt the entire OS, just the kernel is fine:

$ m docker-linux-imx
$ cd ./out/product/packages/bsp
$ scp ./linux-image-4.14.98-imx_11–4_arm64.deb mendel@board-ip
$ ssh mendel@board-ip
$ sudo dpkg -i ./linux-image-4.14.98-imx_11–4_arm64.deb

Another way is to create a device tree overlays. For instance here is a dts for disabling the hdmi: https://gist.github.com/Namburger/f700eb6b18bd1e3697638088d5995c8b

You can then compile it and move it to /boot:

$ dtc -@ -I dts -O dtb -o disable-hdmi.dtbo disable_hdmi.dts
$ sudo mv disable-hdmi.dtbo /boot

Then add the file to /boot/overlays.txt to apply it:

$ cat /boot/overlays.txt 
# List of device tree overlays to load. Format: overlay=<dtbo name, no extenstion> <dtbo2> ...
overlay= disable-hdmi
0
et0 On

Thank you very much Nam.
The first option I think was already working, but I was not sure how to check. It appears that the devicetree can be examined by looking in /proc/device-tree/ for example cat hdmi@32c00000/status gives 'disabled' after doing the modification above, and the HDMI can be verified not working.