New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.12.0-rc4 Kernel: Reboot does not work #8
Comments
Alright, I'll see if I can find the main reason of this issue and resolve it. |
I catched that in rockchip's kernel miniarm DTS file :
This might be related to the reboot bug. |
I didn't get your point? can you explain please? At the moment yous rk3288-miniarm.dtsi file has a same code. |
The supplies are separated on later boards, although you may be correct in a way, power cycling the SD card on shutdown kills it, something that wasn't an issue on 1.0 boards. Also, the system does not bring the SD card back to 3.3V despite returning to the lower speed operating point. |
So, @sghazagh , the reason it works on the official image and the Armbian 4.4 is due to a straight up hack of the driver code. I attempted to do the same thing on 4.11 and it did nothing. |
Why this Tinker Board has this much issue then???! ASUS had to provide a better alternative to RPi3 if they really were looking to hit the market!!! Disappointing! |
Hmm, @wzyy2 and @hizukiayaka might have a clue about how to handle power cycle issues. I'll try to ping them in IRC. |
That would be good if that can be fixed first as it's very annoying when you're working remotely and you cannot reboot due to this issue! |
00:22 That issue in tinker board will happend in warm rest. |
Alright, most of these patches look small enough to give them a try. I'll try to add all these patches this evening, see if that resolve the reboot issue on 4.12 kernels. |
New release integrates TinkerBoard/debian_kernel@5883709 patch. The DTS patches were already added previously. See if that resolves the issue. I don't think this will be enough, as @Tonymac32 already tried that. |
No, the reboot issue hasn't resolved!!! |
I'm somewhat at a loss on this one, is this due to the tinker board hardware, or is it something driver related? I would have assumed the option was there to keep the vmmc active (device tree or otherwise), also shouldn't switching vqmmc back to 3.3 V from 1.8 be standard? I just want to make sure some funny joke isn't being played on everyone involved... ;-) |
"I'm somewhat at a loss on this one, is this due to the tinker board hardware, or is it something driver related? " Rockchip bootrom code only allow normal sd mode, so if the vqmmc is 1.8v, it will failed to load firmware from sd-card. |
Thanks for the reply, and that I completely understand the mechanism of failure. I'm just surprised to see it show up as a bug that is only addressed via a "hack" or two. The power supply is also apparently switched off before the warm reset. Is there a bootrom fix, or an expected bugfix to the driver? As for the patch, I think the patch to restart the vmmc is also very important, however it has a delay built into it which appear to break compilation on 4.12. I don't have time tonight to dig into that one. |
OK, put the hack inplace, can verify it is being executed, but it is not having the desired effect. Not having appropriate schematics or documentation for this board I'm having a near-impossible time checking physical voltages. |
Did it still fail to boot? |
I'll try to remove it today for the next release, see if that changes anything. |
I was hoping to not have to disable one of the more attractive features of the board, Obviously that's the trigger to drop to 1.8V. Perhaps now it needs a delay after telling it to set, the delay position in the code was somewhat of a mystery to me from the beginning, it's the first thing done in the subroutine rather than the last. I would have thought you'd need to restart vmmc, set vqmmc back to 3.3V, then wait for it to stabilize before triggering the SoC to reset. I compiled a test of that last night, but had to get to sleep before it was finished compiling for test. I'll check it later today. |
No Dice, removed the uhs props from it to no effect. Also added delay after setting supplies, also no effect. |
So it might be another reason make it failed to boot. If "lsusb" in host PC show maskrom device, then it means bootrom failed to load firmware from SD-Card. |
Alright, so, the MMC hack introduced reboot issues with the MiQi so I removed these hacks for now. I've commented 'uhs' references in the sdmmc driver. Meanwhile, another way to test if the machine reboot or not is to ping the device. If the device still answers a few seconds after closing the SSH session, it means that it could not reboot and is still running... |
* The Tinkerboard MMC hack was removed as it made MiQi boards unable to reboot while not resolving the reboot issue on Tinkerboards. * UHS references in the SDMMC section were commented instead, following @wzyy2 test advice here : #8 * More USB multimedia and gadget drivers modules were added, due to a few demands. Now, The 'firmware' folder might be moved to lib/firmware in next release since, well, it's the one used by all the drivers, it seems. Signed-off-by: Myy <myy@miouyouyou.fr>
Meanwhile if you can:
If that's the case, paste these messages there. |
I'm afraid I almost work exclusively though the serial output on the board, there are no messages, it successfully shuts down, and simply does not restart. This is definitely related to the SoC bootloader (not U-boot). I will plug in a USB cable to see if I can see the maskrom device or not. I will have to check with the team to make sure the Armbian MiQi build is still rebooting properly. Is it possible supply assignments in the kernel changes between 4.4 and 4.12? |
It's entirely possible. Meanwhile, it might be interesting to open a thread in mainling list consulted by Rockchip enthusiasts. I'll try find the URL on this mailing list again. |
I'm still surprised that regulator_get_voltage would generate a NULL dereference kernel panic. But whatever. Removed the logs in the patch, just in case sending printk with an error level in the logs fucked up the reboot on the ASUS SugarBoard. Redefined the variables outside the if branches when possible and added a printk during the emergency reboot, just in case the Out-Of-Order execution model of the ARM processors might have generated issues. (And also to see if the issue comes from the printk call). Still, just to give you an idea, this is the Armbian patch, this is my last rework of the reboot patch. You can compare them with meld if you want. Here's a comparison anyway. This patch is known to work. I compared the DTS too, there's no differences beside indentation and nodes relative position. So, yeah, if that does not work, just create a service that does |
I just see your difference and I see that there are couple of things are not same. Does this something you should know about? |
"ASUS-Expertise.service" 🤣 Honestly this and the Bluetooth shenanigans nearly had me considering pulling the plug on my support for this board, and since I'm the only contributor to it on Armbian... Add the completely unnecessary Audio Codec and the fact you cannot power it over microUSB without a brownout if anything is plugged into the USB ports... Beautiful board with exceptional build quality. But it ends there. Now off to look at my new shiny RK3328 and A905X boards for a while and cool down on the Tinker Toy before I do something rash. I bought it to be a media center/gaming box, wound up buying a Ugoos UT3S instead... |
the line 77 will crash any board that could not set the mSdhost value, with a NULL dereference. The unsigned int id is actually removed in 4.13 kernel |
Oops, I should probably switch that then, although the flood of RK3288 boards hasn't happened, has it? Probably the 32-bitness, even if it is very powerful. |
@Tonymac32 , I understand your frustration as there is no documentation for this board after all this times! |
Well, if you can try to set the value inside the if branch and see if it changes anything when you do an emergency reboot, I'd appreciate that. That said, it only concerns the emergency reboot system, which @sghazagh said was working so... |
@Miouyouyou , |
Well, first give a try to the latest zImage here https://github.com/Miouyouyou/RockMyy-Build . Just grab the zImage in /boot and the rk3288-tinker.dtb too. Boot them, try a reboot and if that does not work, try an emergency one. Meanwhile, I'll try to see what are the major differences between the emergency reboot and the standard one. |
@elar-systems I'm an electrical engineer, I actually did a write-up specifically concerning powering this board, measuring the voltage drops/etc. If your supply is a 5.25 Volt unit and your usb peripherals are comfortable at 4.5 V you can get away with it, assuming 18 AWG and a shorter cable. The amp rating is irrelevant if the series resistance causes too large a voltage drop. The "factory" failed reboot causes the light to stay on, so the mmc supply is being disabled, but not re-enabled. Why the light is affected I actually don't know... |
Sure you know better mate, just was saying... ;) |
Well, the difference between simple restart and SysRQ restart seems blurry. That's the kind of code where I'll need some ways to get call graphs of any code that can call the machine_restart function. Now, for the record, here's how emergency_restart is implemented #ifndef _ASM_GENERIC_EMERGENCY_RESTART_H
#define _ASM_GENERIC_EMERGENCY_RESTART_H
static inline void machine_emergency_restart(void)
{
machine_restart(NULL);
}
#endif /* _ASM_GENERIC_EMERGENCY_RESTART_H */ There's a special version of emergency_machine_restart, but only on X86 systems it seems. That said, it seems that any driver can set up special callbacks when SysRQ mechanisms are triggered, so that mean that drivers could behave completely differently when calling the SysRQ reboot mechanism. The Rockchip systems seem to register at least 2 reboot handlers in : That said, that does not clearly tell me why the LEDS are shut off during simple reboot, and why they're not with the SysRQ one. Also, machine_restart can be called with a special command. It might be the case here, I don't know. |
I tried it, nothing changed... :-/ |
Thought so. Well, at least RK3288 boards that doesn't have a support-sd property on the SDMMC node won't panic on emergency reboot at least. Anyway, I'll leave this bug opened for a week, just in case someone either :
And then, I'll close this bug if that's not the case. The patch has been applied. If that doesn't work for you, I don't know what will. I mean, really ! It's not a patch issue. ARMbian users got it working, so try ARMbian. Maybe they applied additional power supply fixes in their distro that make this patch work fine. They've been fed up of power supply issues on their forum so it's highly possible they did things to lower the probability of such problems occurring. If their kernel work, try this one just in case. If it works too, leave a comment ! Re-open the bug if needed ! You got the compilation script here. You got the patches. The script prefers local patches over net patches anyway, so just clone the repo and get to work ! If the emergency reboot works, meaning You can try various reboot=X arguments, as specified in an earlier post, and see if that works. Maybe Soft Reboot might work, even though they're extremely ill advised on SMP. You could also try to get kexec working on your board, this will avoid doing a power cycle and just load up a new kernel directly, by-passing the whole boot cycle. Good luck though, as this is the most untested way of loading up kernels. At last, if you really want to get this bug fixed, and all the alternatives failed, either : |
As a last thought, I have CONFIG_SYSCON_REBOOT_MODE=m as the system is supposed to support it according to the dtsi, no idea if that would have an impact. ASUS never got armbian any boards to my knowledge, despite promising them. |
@Miouyouyou I think you got it. The reboot works. Attached the logfile. Great work! |
Congratulation everyone! Well done Miouyouyou.
We are waiting for merging this to master and adding a new fresh branch. |
Well, I'll port the patch to the 4.12, so that it's also usable on MyyQi. Then I'll close this bug. Thank you everyone for your efforts. Glad this bug is solved. |
Got sick of this one. But at least it's solved in RockMyy... Signed-off-by: Myy <myy@miouyouyou.fr>
Patch backported on MyyQi. If you really want to use a 4.12 for some reasons, give it a try. In any case, I'll close this bug tomorrow if I don't have any more reports. |
@Miouyouyou , I personally will stick to 4.12.3 as 4.13 is release candidate and is not stable. |
I'll see if I sync with yet another kernel Git repository. Remember that the 4.12.3 does not exist in Torvalds GIT repository, it's maintained in yet another repo, which I don't the address of currently. I'll look around. |
No, You can also find it here: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git |
Alright, I'll try with this one, see if the patches apply. But I'm not going to maintain two kernel branches. The script will modified once to use the stable git repository, then I'll wait until it breaks. |
Here's the https://github.com/Miouyouyou/MyyQi/tree/stable . I won't maintain this branch though, unless I'm rolling in cash. So if it breaks, it breaks. |
@Miouyouyou, the second one did not work, but the first one, "rk3288-tinker.dtb", was ok and "reboot" was working fine. I think, as the official ASUS DTB file named "rk3288-miniarm.dtb", keep the file name consistence or somewhere in README file, explain which DTB file is for Tinker Board. Anyway... |
Thanks. Glad to know that the DTB was essential to get this fix working. Now, again, as stated before, the official Tinkerboard DTS used in the official kernel (the one hosted and maintained by Linus Torvalds) is named rk3288-tinker.dts and will stay like that until the maintainer of that file think it should change. Seriously, it's there : https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/rk3288-tinker.dts The rk3288-miniarm.dts I provided during the 4.12 version was an improved version of the rk3288-tinker.dts provided by @Tonymac32 . @Tonymac32 called it like this because during the 4.11 there were no Tinkerboard DTS mainlined, so he took the name used in the semi-official Rockchip linux tree on github.com. However, the improvements added to rk3288-miniarm.dts have now been ported to the official rk3288-tinker.dts. So, yes, it's VERY confusing, and thus the unofficial rk3288-miniarm.dts have been removed in the new kernels scripts. So, forget about rk3288-miniarm.dtb. It never was official. It's not available anymore on 4.13.x kernels. And no, I don't consider the semi-official Rockchip kernel tree on GitHub an official source for that matter. Conclusion : use the rk3288-tinker.dtb Now, the reboot issue is solved on MyyQi and RockMyy. YAY ! So I'm closing this issue. If you get this issue again on future versions :
Alright. Thank you everyone for your participation and efforts. This issue is now closed. You can now reboot mainline kernels on your Tinkerboard. Congratulations. |
Ok, that make sense. Meanwhile, that's really good you see the latest kernel is loading and wifi is working as well. I am sure you will fix that too. |
Kernel 4.12.0-RC4 is compiled successfully and boots the Tinker Board just fine.
Thank you for adding WIFI to, so WIFI is working just fine as well.
However, REBOOT does not restart the board and after turning off the device, cannot get it up again!
I have a same issue if I use "echo b > /proc/sysrq-trigger" as well.
The text was updated successfully, but these errors were encountered: