Hello All!
I have a Vontar X3 TV box and when installing CE I used the standard sml_s905x3_4g_1gbit.dtb file and everything works fine except for the system LED. It is swapped: when CE is runnijg, ir is OFF, and after the shutdown from CE menu it becomes ON.
But the android firmware lights this LED correctly.
I’ve looked over .dtb files from Android and CE and that is what I’ve seen:
Android:
As you can see, the last number in gpios section differ: in Android it is 0x00 (GPIO_ACTIVE_HIGH) while in CoreELEC it is 0x01 (GPO_ACTIVE_LOW).
So my assumption is I have to change it somehow. I’ve tried to change it in CoreELEC->Hardware menu but it seems that setting changes only linux,defaultrigger entry, which is not what I need.
So my question is: What is my best strategy to change the .dtb?
I tried to dump and compile .dtb file from my running instance of CE, but .dts file I got differs absolutely from the stock sml_s905x3_4g_1gbit.dtb, and bescides dtc compiler gives too much warning when compiling my decompiled .dts file. So I am afraid it will not work.
So what should I do to change only one entry in .dtb?
Yes, something like this, you need to test.
Best is to make the script more smart and check if it’s already modified.
If not, modify and reboot device. If yes, do nothing and continue booting.
I am not too much experienced with bash, so it may look a little awkward, but anyway here is the script.
#!/bin/bash
GPIO=`fdtget -t x /flash/dtb.img /gpioleds/sys_led gpios`
GPIO_ACTIVE_FLAG=`echo $GPIO| awk 'END {print $NF}'`
if [[ "$GPIO_ACTIVE_FLAG" == "0" ]]; then
echo "SYSTEM LED GPIO IS CORRECT"
exit 0
else
echo "Changing System Led GPIO_ACTIVE flag"
GP=`echo $GPIO | sed '$s/\w*$//'`
GPIO=$GP"0"
mount -o remount,rw /flash
fdtput -t x /flash/dtb.img /gpioleds/sys_led gpios $GPIO
sync
mount -o remount,ro /flash
fi
Good morning, regarding this post Vontar X3 TV box LED DTB fix in which dredkin was able to solve the problem. I would really appreciate it if dredkin could send me the modified file for the vontar x3 in order to solve the problem with the led on. I have tried to modify the file but I don’t have the necessary knowledge. Thank you.
Would it be possible for you to somehow pass me the modified file for vontar x3? I have tried but I have no knowledge to modify it. Thank you very much
Glad to see you’ve solved it!
Also I have to say that on every upgrade CoreELEC overwrites the .dtb file so anyway sending a modified one wouldn’t be an answer.
Also different versions of CE could have different .dtb files so it might become incompatible.
Ofc the best solution would be to have a special .dtb for Vontar X3 in the CE repository so we could select it on the initial install, but the script works too…