Javelin Posted March 11, 2023 Share Posted March 11, 2023 (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 March 12, 2023 by javelin Correction to procedure 0 Quote Link to comment Share on other sites More sharing options...
dev001 Posted March 12, 2023 Share Posted March 12, 2023 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 clear 0 Quote Link to comment Share on other sites More sharing options...
Javelin Posted March 12, 2023 Author Share Posted March 12, 2023 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; 0 Quote Link to comment Share on other sites More sharing options...
dev001 Posted March 12, 2023 Share Posted March 12, 2023 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. 0 Quote Link to comment Share on other sites More sharing options...
dev001 Posted March 13, 2023 Share Posted March 13, 2023 If my odroid-c2 keeps rebooting, where do I look for log info? 0 Quote Link to comment Share on other sites More sharing options...
Javelin Posted March 13, 2023 Author Share Posted March 13, 2023 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. 0 Quote Link to comment Share on other sites More sharing options...
technik007_cz Posted May 29 Share Posted May 29 (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 June 5 by technik007_cz 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.