Chadster766 / McDebian

Linksys WRT3200ACM, WRT1900AC, WRT1900ACS, WRT1200AC and WRT32X Router Debian Implementation
98 stars 14 forks source link

Segmentation fault using kwboot and kwboot-patched #66

Closed lefuglyduck closed 4 years ago

lefuglyduck commented 4 years ago

sudo ./kwboot -t /dev/ttyUSB0 -b WRT1200AC_uboot_v2.0.13.bin -B 115200 -p Segmentation fault

Chadster766 commented 4 years ago

Must be a compiled mismatch.

You can also install u-boot-tools to get kwboot instead.

https://github.com/Chadster766/McDebian/wiki/C.-U%E2%80%90Boot-Recovery#you-can-also-install-u-boot-tools-to-get-kwboot

lefuglyduck commented 4 years ago

Yup, tried that and it just kept asking me to reboot my router (didn't get a segfault though). Endlessly. On Ubuntu 18.04 in case that matters.

Chadster766 commented 4 years ago

Did kwboot load your WRT u-boot image via TFTP?

lefuglyduck commented 4 years ago

No, how do I do that? I just followed the instructions that you provided (and the instructions here: https://openwrt.org/toh/linksys/wrt_ac_series#corrupt_bootloader_recovery). BTW the instructions on openwrt.og are slightly different than the ones you provided.

Chadster766 commented 4 years ago

I recommend trying to follow my instructions.

Sorry I gave you bad info kwboot doesn't load via TFTP only by Serial TTL.

What kwboot does is connect to the WRT via TTL upon power up (boot) and then transfer the WRT u-boot image via serial to the WRT memory and then run it on the WRT.

After kwboot runs instructs the WRT to run u-boot on the WRT it stays connected to the WRT which allows to interrupt the u-boot boot so you can get a u-boot prompt on the WRT. From there you can load the same u-boot image to the WRT via TFTP to mtd0 and then reboot the router. After the reboot the WRT will boot u-boot from mtd0 and you will be able to the WRT u-boot prompt normally and load whatever firmware you want.

lefuglyduck commented 4 years ago

If I actually followed your instructions (and not the ones on the openwrt site) then I would even be able to execute kwboot, because you didn't include the instruction to chmod 755 kwboot. Also the instructions on the website also say to chmod 666 /dev/ttyUSB# (I'm not sure if that is necessary or not).

Chadster766 commented 4 years ago

If you install u-boot-tools kwboot you don't need to change permissions. Regardless changing the permission is fine. It doesn't effect the end result of the process.

Chadster766 commented 4 years ago

Thank you,

I've changed the Wiki instructions and removed unnecessary the download links for the kwboot executables.