Skip to content
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

Smashed the stack! But can't get switch to boot.. #6

Open
shawly opened this issue Aug 17, 2018 · 5 comments
Open

Smashed the stack! But can't get switch to boot.. #6

shawly opened this issue Aug 17, 2018 · 5 comments

Comments

@shawly
Copy link

shawly commented Aug 17, 2018

So I've built a new LEDE image for my GL-MT300N-V2 (mt7628 based) with the ehci patch.
I've added some logging to the 20-tegra_rcm script, and it seems that the script is executed twice, also it seems that the first time, the payload seems to get injected, but the Switch won't boot the payload. Furthermore the Switch won't get recognized anymore, not even my PC, I have to hold down the power button until the Switch turns off and then start it again, to get it back into RCM.

I've tried both, the standard Fusee payload that get's installed and I've also replaced it with the SX OS payload, but to no avail. On PC with TegraRcmGUI it works fine, so seem to be no apparent issues with the Switch itself.

Here is the syslog, as you can see, the script gets executed two times, but the second time it gets fired, it seems that an error occurs which doesn't get logged.

Fri Aug 17 08:26:48 2018 user.notice USB: Device: / Action: remove / ID: 955/7321/102
Fri Aug 17 08:26:48 2018 user.notice USB: Device: / Action: remove / ID: 955/7321/102
Fri Aug 17 08:27:14 2018 user.notice USB: Device: / Action: add / ID: 955/7321/102
Fri Aug 17 08:27:14 2018 user.notice APX: Starting fusee-nano...
Fri Aug 17 08:27:14 2018 user.notice APX: [*] device id: 000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2
Fri Aug 17 08:27:14 2018 user.notice APX: [*] Read 124 bytes from /usr/share/fusee-nano/intermezzo.bin
Fri Aug 17 08:27:14 2018 user.notice APX: [*] Read 27748 bytes from /usr/share/fusee-nano/payload.bin
Fri Aug 17 08:27:14 2018 user.notice APX: [+] Sent 0x17000 bytes
Fri Aug 17 08:27:14 2018 user.notice APX: [+] Smashed the stack: -1
Fri Aug 17 08:27:14 2018 user.notice APX: Switch should now boot...
Fri Aug 17 08:27:14 2018 user.notice USB: Device: / Action: add / ID: 955/7321/102
Fri Aug 17 08:27:14 2018 user.notice APX: Starting fusee-nano...
Fri Aug 17 08:27:15 2018 user.notice APX: Switch should now boot...

When removing the hotplug.d script and executing fusee-nano manually, the same thing occurs, it shows Smashed the stack: -1, nothing happens and if I execute it the second time [-] Failed to read device ID: Operation timed out is shown, which is the error message that wasn't logged before.

So is there any way to get this to work? As it seems the Switch at least gets recognized by my device.

@DavidBuchanan314
Copy link
Owner

The [-] Failed to read device ID: Operation timed out on second run is normal - you will have to reboot the switch on every failed attempt.

I'm not sure why it's failing for you though. I was actually having similar issues when I was first trying to get this to work. For some reason, adding in a strategic usleep made things work, and I'm not really sure why... https://github.com/DavidBuchanan314/fusee-nano/blob/master/src/usb.c#L168

Perhaps you could try increasing the delay, or maybe removing it entirely? Other than that, I have no idea...

@DavidBuchanan314
Copy link
Owner

Seems to be the same issue as here: #3

@DavidBuchanan314
Copy link
Owner

If your router is running in big-endian mode, please try building the latest commit, it might have fixed this.

@shawly
Copy link
Author

shawly commented Sep 26, 2018

Awesome, I'll try it out this weekend!

@shawly
Copy link
Author

shawly commented Sep 28, 2018

Nope, still the same behavior, shows smashed the stack on the first execution and if I try a second time, the Switch won't get detected anymore and I have to force restart it.

Edit: I also tried removing the usleep or extending it to 1sec but it still won't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants