Hi, I found this by chance.. and because I didn't know how to do it, I will post ChatGPT answer, also when doing the conversion, I get a lot of warnings, is that normal?
1. Save the existing DTB file
Locate your system's DTB file. It is usually located in /boot or a subfolder like /boot/dtb/.
cp /path/to/existing/dtb /backup/path/dtb_backup.dtb
Example:
cp /boot/dtb/amlogic/meson-sm1-odroid-hc4.dtb ~/dtb_backup.dtb
2. Convert the DTB to DTS (readable text)
Use the dtc (Device Tree Compiler) tool to convert the binary DTB file to a DTS file (readable text).
dtc -I dtb -O dts -o converted_file.dts original_file.dtb
Example:
dtc -I dtb -O dts -o meson-sm1-odroid-hc4.dts /boot/dtb/amlogic/meson-sm1-odroid-hc4.dtb
3. Modify the DTS file
Open the .dts file in a text editor (such as nano, vim, or another editor) and insert or modify the required code.
nano meson-sm1-odroid-hc4.dts
Make the necessary changes and save the file.
4. Convert the DTS back to DTB
Use dtc to convert the modified DTS file back into a DTB file.
dtc -I dts -O dtb -o new_file.dtb modified_file.dts
Example:
dtc -I dts -O dtb -o /boot/dtb/amlogic/meson-sm1-odroid-hc4.dtb meson-sm1-odroid-hc4_modified.dts
Ensure that the new DTB file is placed in the correct location (usually /boot/dtb/...).
5. Reboot (this will initially fail)
Execute the reboot command:
reboot
As the guide notes, this reboot will fail because the system has not yet loaded the new DTB.
6. Perform a Power-On Reset (POR)
Turn off the ODROID HC4 completely and then power it back on. This will load the new DTB file.
7. Log in and test the reboot
Once the device successfully reboots with the new DTB, log in to your system and test if the reboot command works now:
reboot
Required Tools
dtc: If you don’t have the dtc compiler installed, you can install it with:
sudo apt install device-tree-compiler