Jump to content

Recommended Posts

Posted

Thanks to g4751 for doing the tests for Odroid-HC4. The tests for the Odroid-C2 were performed by myself. Tests were performed on Armbian 24.08 Official releases.

 

Fix is to add a section to the DTB to enable a recently (last year) added kernel driver "meson64-reboot" that is an updated version of the "odroid-reboot" in older kernels.

 

For Odroid-C2:

 

- save your existing DTB

- use DTC to convert DTB->DTS

- modify the DTS with the code below

- use DTC to convert DTS->DTB

- reboot (will fail because new DTB not loaded yet)

- POR (will now load the new DTB)

- log-in

- reboot should now work.

 

 

Quote

Add the following under the stock "gpio-regulator-tf_io {....}":

 

meson64-reboot {
    compatible = "meson64,reboot";
    sys_reset = <0x84000009>;
    sys_poweroff = <0x84000008>;
    sd-vqsw = <0x39 0x03 0x00>;
    sd-vmmc = <0x23 0x57 0x00>;
};

 

 

 For Odroid-HC4:

 

- save your existing DTB

- use DTC to convert DTB->DTS

- modify the DTS with the code below

- use DTC to convert DTS->DTB

- reboot (will fail because new DTB not loaded yet)

- POR (will now load the new DTB)

- log-in

- reboot should now work.

 

 

Quote

Add the following under the stock "gpio-regulator-tf_io {....}":

 

meson64-reboot {
    compatible = "meson64,reboot";
    sys_reset = <0x84000009>;
    sys_poweroff = <0x84000008>;

    sd-vqen = <0x44 0x0e 0x00>;
    sd-vqsw = <0x44 0x06 0x00>;
    sd-vmmc = <0x44 0x03 0x00>;
};

 

 

Notes:

- As far as I know, only the Odroid -C4 has an Armbian patch to do the above automatically for each release.

- For others, updates may overwrite the DTB and you'll need to perform this fix again. In theory, DTB changes are fairly rare.

 

 

 

 

 

Posted

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

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines