Jump to content

If you have an Odroid C2 (and possibly others) that fails to reboot - here's your fix.


Recommended Posts

Posted (edited)

EDIT: After discussion with a few users, to avoid the issue of having this modification wiped out by a future DTB update and create the unfortunate scenario where the /boot/armbianEnv.txt requests to load a DTB which no longer exists, it's a lot simpler to overwrite the original DTB thus keeping the naming identical. If the DTB gets overwritten by an update then the reboot functionality may just revert to the no-reboot behavior until the fix is re-applied to the newer DTB.

 

The problem lies in the SDCARD signals not being in the right state for a reboot. To solve this we will de-compile the DTB in /boot/dtb/amlogic/meson-gxbb-odroidc2.dtb to create a source version (DTS), modify it, and re-generate the new DTB with the same name. The board will need to be re-started to load-in the new DTB after which the following reboots should be automatic.

 

1) Back-Up everything - if the DTB is somehow not at the right place or the 1 character editing goings wrong there's probably a way to recover from the u-boot console but I haven't explored that.

 

2) Go To:

  • /boot/dtb/amlogic
  • ls -al  (you will see your meson-gxbb-odroidc2.dtb which is hardcoded in the bootloader as the DTB to load)

 

3) Convert to a source file by doing:

  • dtc -I dtb -O dts -o meson-gxbb-odroidc2.dts meson-gxbb-odroidc2.dtb  (you will now have a new DT Source file meson-gxbb-odroidc2.dts)

 

4) Edit:

  • vi meson-gxbb-odroidc2.dts
  • find the entry TF_IO
  • look for the line gpios = <0x38 0x03 0x00>;
  • the hex number in red is to be changed from 0x00 to 0x06 (what this does is set the SDCARD in a mode to be ready to boot by allowing the resistor pull-down to enable the VDDIO Regulator to go to 3.3V which is the proper boot voltage)
  • save, exit

 

5) Return the DTS file to a new DTB file (which is the only format accepted by the bootloader). We will copy the original DTB to another name and overwrite the original:

  • cp meson-gxbb-odroidc2.dtb meson-gxbb-odroidc2-ORIGINAL.dtb
  • dtc -O dtb -o meson-gxbb-odroidc2.dtb meson-gxbb-odroidc2.dts
  • many warnings will be emitted, they can be safely ignored

 

6) No changes need be performed to /boot/armbianEnv.txt (ie. the 'fdtfile=' directive) as the DTB file with the expected naming will be loaded except now it has the TF_IO mod.

 

7) Now you will reboot - THIS WILL SHUTDOWN BUT WILL NOT REBOOT AUTOMATICALLY BECAUSE THE NEW DTB IS NOT ACTIVE YET.

 

8 ) Do a Power Reset to bring-up the board and load the new DTB.

 

9) Now if you do a reboot you will finally get a proper reboot sequence.

 

 

Edited by javelin
Correction to procedure
Posted

I'm using Armbian_23.02.1_Odroidc2_jammy_current_6.1.14_xfce_desktop. I followed you instructions and the system keeps continuously rebooting. Unfortunately the photo is not very clearodroid-c2_startup.png.838eec1fdbec39c3abdffec04953afcb.png

Posted

I'll download your OS and give it a try to see if I can reproduce.

 

- this is off an sdcard?

- a better log would be great

- to be sure, when your board doesn't reboot you would get this continuously?

bl31 reb▒GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:800;USB:8;LOOP:1;EMMC:800;NAND:81;SD:800;USB:8;LOOP:2;EMMC:800;NAND:81;SD:800;USB:8;LOOP:3;EMMC:800;NAND:81;SD:800;USB:8;LOOP:4;EMMC:800;NAND:81;SD:800;USB:8;GXBB:BL1:08dafd:0a8993;FEAT:EDFC318C;POC:3;RCY:0;EMMC:800;NAND:81;SD:0;READ:0;CHK:0;

 

Posted

The armbian image was written to an eMMC card. Now that I read your posting more closely, you were using an SDCARD. I'm assuming that would not be the same.

Posted
Quote

If my odroid-c2 keeps rebooting, where do I look for log info?

 

You'd need to use a USB serial (TTL) board and connect the serial console connector on the board, then use Putty as a terminal and capture there. Unfortunately I don't have an eMMC, also this kind of storage boots slightly differently and these low-level changes would probably need to be done differently.

Posted (edited)

Thanfully to @Javelin, I can confirm reboots working fine now with kernels 6.6.16-current-meson64 and 6.8.11-edge-meson64 on (custom) Armbian system flashed to microSD.

 

This is how updated section of dts file looks like:

 

 gpio-regulator-tf_io {
                compatible = "regulator-gpio";
                regulator-name = "TF_IO";
                regulator-min-microvolt = <0x1b7740>;
                regulator-max-microvolt = <0x325aa0>;
                gpios = <0x39 0x03 0x06>;
                gpios-states = <0x00>;
                states = <0x325aa0 0x00 0x1b7740 0x01>;
                vin-supply = <0x3a>;
                phandle = <0x28>;
        };

Edited by technik007_cz
Posted (edited)

I am rebuilding my armbian+OMV on Odroid HC4 and now I am facing the issue with the hot reboot as well. I am on Armbian v24.8.4 running Armbian Linux 6.6.47-current-meson64 using Sandisk Ultra 64GB A1 class 10 XC-I.

 

Can you advise, what value I should use in meson-sm1-odroid-hc4.dts?

 

gpio-regulator-tf_io {
	compatible = "regulator-gpio";
	regulator-name = "TF_IO";
	regulator-min-microvolt = <0x1b7740>;
	regulator-max-microvolt = <0x325aa0>;
	vin-supply = <0x0e>;
	enable-gpios = <0x44 0x0e 0x06>;
	enable-active-high;
	regulator-always-on;
	gpios = <0x44 0x06 0x02>;
	gpios-states = <0x00>;
	states = <0x325aa0 0x00 0x1b7740 0x01>;
	phandle = <0x29>;
};

 

I am attaching the full file for the reference as well.

 

By the way, I am not facing this issue with my older SD card Transcend Premium 400X 16GB class 10 HC-I  (6.6.47-current-meson64).

meson-sm1-odroid-hc4.dts

Edited by g4715
Posted (edited)

@g4715, I am in the exact same situation. Hardware and software identical to yours. If you find a solution, please post it here.

 

But I don't have SD cards old enough to see if one with the older specs works. I want use my HC4 as a disk copy / maintenance station, and the lack of hot boot is severely limiting.

Edited by emk2203
additions
Posted

Unfortunately, I have no updates on this. I keep using my old Transcend 16GB SDHC 400x card, although it is painfully slow. I have bought Transcend 16GB SDHC Ultimate 600x SD card as a replacement, but it is also having issues the same issues with the reboot.

Posted
On 10/20/2024 at 3:09 AM, g4715 said:
gpios = <0x44 0x06 0x02>;

 

gpios = <0x44 0x06 0x06>;

 

HC4 has a different pin assignment for the TF_IO and a simpler circuit but the control logic is identical. The 0x06 should work fine.

Posted

Hi Javelin,

Thanks for the reply. I have updated meson-sm1-odroid-hc4.dts and now I am not able to boot at all (not just after the soft reset)

 

IMG_5965.thumb.jpg.a60aed66cafcd557291dbf1e0864b264.jpg

 

 

IMG_5966.thumb.jpg.0b884c7795cbc11520778da88def80ca.jpg

Posted

I can boot now, but the soft reboot is still not working due to similar reasons as earlier (apologies for the quality of this screenshot) :

IMG_5979.thumb.jpg.ee7685f98e0d334b54dd686631ae7e7a.jpg

Posted (edited)

Yes, I have downloaded Armbian from this page and then ran apt update & apt upgrade. Can you elaborate more on this: capture the boot sequence. Do you mean to film it/record it or to provide some logs?

Edited by g4715
Posted

1) It would be good if you could reload an earlier version of Armbian (incorporating the fixes for gpios = <0x44 0x06 0x06> and then with gpios = <0x44 0x06 0x03>) until the soft-reset works.

 

2) Using a second computer with a terminal program you could capture a text version of the boot log. If you're not comfortable with that then nvm.

Posted
Quote

 

Host Device Requirements: Paving the Way for Optimal Performance

To fully harness the capabilities of SD card XC II cards, your host device must support the UHS-II interface. This advanced interface enables the faster data transfer rates offered by SDXC II cards. If your device lacks UHS-II support, you can still use SDXC II cards, but the data transfer speeds will be limited to the capabilities of the UHS-I interface.

 

https://vtechinsider.com/sd-card-xc-i-vs-xc-ii/

 

 

 

Quote

 

HC4: Storage 1x Micro SD slot (DS/HS mode up to UHS-I SDR104)

https://wiki.odroid.com/odroid-hc4/hardware/hardware

 

 

Choosing the XC-I card won't increase the transfer speed on an HC4.

 

Does the soft-reset work with the HC-I cards?

Posted

I have the reboot issue with the newer SDHC or SDXC. Those are the cards that I have tested:

 

cards.thumb.jpg.ca9b08ddd7e58c023e5ff89c82f1c915.jpg

 

All the recent tests I was doing were performed on the second card (Transcend Ultimate).

 

I will try to complete the tests with the older Armbians, as per your previous post, I just need some quiet time :) 

Posted

Hi Javelin, below are some of the tests I completed yesterday, but I could not capture the logs. It seems that this was working on the (very) old armbian version :)

 

Armbian_24.8.1_Odroidhc4_bookworm_current_6.6.47.img

·        No changes - starts, soft reboot is not working – voltage issue

·        <0x44 0x06 0x03> - starts, soft reboot is not working – voltage issue

·        <0x44 0x06 0x06> - does not boot

 

Armbian_23.8.1_Odroidhc4_bookworm_current_6.1.50_minimal.img

·        No changes - starts, soft reboot is not working – voltage issue

·        <0x43 0x06 0x03> - starts, soft reboot is not working – voltage issue

·        <0x43 0x06 0x06> - does not boot

Note, that the first value differs (by default) comparing to the latest version. 

 

Armbian_23.02.2_Odroidhc4_bullseye_current_6.1.11_minimal.img

·        No changes - starts, soft reboot is not working - black screen

·        <0x42 0x06 0x03> - starts, soft reboot is not working - kernel panic

·        <0x42 0x06 0x06> - does not boot

Note, that the first value differs (by default) comparing to the latest version.

 

Armbian_22.08.7_Odroidhc4_bullseye_current_5.19.17_minimal.img

·        No changes – starts, soft reboot is not working - blank screen

 

Armbian_21.02.4_Odroidhc4_buster_current_5.10.27.img

·        No changes – starts, reboots w/o issues

Posted (edited)

Hi, I just want to remind you this topic is for Odroid C2 which does not have nothing in common with HC4.

Also original question for this one is answered and tested working.

It would be much better to open separate one with reference to this one but like I posted before this boards have in common just only "Odroid" and more likely low level changes needs more knowledge about certain hardware.

Edited by technik007_cz

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