Overclocking router devices

@peppeve How to install breed boot (Hackpascal) from uboot mod (peke2k) ?. they are different (88kb vs 123kb). Please, help me! . My router is wr841n v11.

I install direct from orginal bootloader.
Before you must use mtd-rw package to unlock the bootloader partition after use
mtd -r write breed-xxxxxxx.bin Bootloader

1 Like

@peppeve Thanks!

Hello,
I'm trying to overclock my TP-Link TL-WDR4300 v1.
I've dumped mtd0 and opened it with a hex editor.
The WDR4300 CPU is clocked 560Mhz so I'v searched โ€œ3C 0C 29 C0" and replaced it with "3C 0C 2A 30".

Then, I've flashed the new U-BOOT using "insmod mtd-rw i_want_i_brick=1" to enable RW on u-boot partition, then "mtd unlock u-boot" and finally "mtd -r write /tmp/uboot_new.bin u-boot".
No errors, router reboot but no change in kern.info that still says 560Mhz.

am I doing anything wrong?

thanks

I think you should use breed uboot by hackpascal to overclock as easy. it has overclock function

Thank you! flash, access and use breed uboot is a little confusing... but works very good!

Last question i'm trying 720/500, where i can find memtester for testing stability? opkg can't find it in the repo.

I don't know testing. Sorry. But, if you want to overclock, you will apply heatsink on CPU.

1 Like

I would prefer pepe2k/u-boot_mod from pepe2k for wdr4300

With this mod oc till 650 mhz is possible, if you use my modified fork of his great u-boot_mod you could also set until 750 mhz... juppin/u-boot_mod

1 Like

It seems some folks have had success trying breed on the Archer C7 V2 but I see nothing on the V4.
The Breed site http://www.right.com.cn/forum/forum.php?mod=viewthread&tid=161906&page=1&extra=#pid1168172
Shows a bootloader exists for the wndr4500v3 which uses the same SOC as the V4 (QCA9563)

So I was about to overwrite my boot-loader with it. But it turns out the V4 has two!

root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "factory-uboot"
mtd1: 00020000 00010000 "u-boot"
mtd2: 00180000 00010000 "kernel"
mtd3: 00d40000 00010000 "rootfs"
mtd4: 00b10000 00010000 "rootfs_data"
mtd5: 000f0000 00010000 "config"
mtd6: 00010000 00010000 "art"
mtd7: 00ec0000 00010000 "firmware"

And when looking at the logs from a UART port. The V4 boots into the factory one first and then into the second one before going into the OS.

I"m pretty confused now.
Not sure if it's safe to just flash Breed onto either (Breed seems to be the wrong size also 95k vs 131k for the two bootloaders)

Has anyone seen these double bootloader going on? Which is the CPU frequency set on?

Last, @gwlim how did you figure out what the registers for the clock frequency were in your examples?
There is nothing that matches those lines on the Archer V4 I'm looking at. I can't think of a way to do this other than reading the SOC datasheet (aaand we know how easy it's to get those from qualcomm... )

It seems i'm stuck on something trivial. How do I unlock the uboot mtds so they are read-write?

I was able to get the u-boot source code for the Archer C7 V4 from:
https://www.tp-link.com/en/gpl-code.html
Then, it was easy to compile uboot with a faster clock. It was just a parameter on the MakeFile

But now I don't know how to flash it:

mtd -r write uboot.backup.bin u-boot
Could not open mtd device: u-boot
Can't open device for writing!

Also, it turns out, it's the "factory-uboot" bootloader the one that sets the frequency, not "u-boot"
Both are compiled from the same source so I think I can use the factory version to recover my router if I brick the u-boot partition.

Figured it out!!
it was the file tp-link.mk

The new temporary solution:

opkg update
opkg install kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1

Always backup your mtd partitions and note your mtd layout.
So in worst case you can programm it with an external pregrammer...

Thanks @juppin I like that better.
Is there a better way to verify I'm actually overclocked other than the kernel log?
I'm not 100% convinced it's running faster. Processor feels a bit warmer but then that could be my own bias.

[    0.000000] Clocks: CPU:1000.002MHz, DDR:650.002MHz, AHB:333.334MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 3822511567 ns
[    0.000005] sched_clock: 32 bits at 500MHz, resolution 1ns, wraps every 4294957055ns
[    0.008274] Calibrating delay loop... 497.66 BogoMIPS (lpj=995328)
[    0.043063] pid_max: default: 32768 minimum: 301

@JochiPochi I would say a benchmark is the best way to check the performance gain...

coremark, linpack or whetstone are simple benchmarks for cpu testing.

You should also do a memory test... memtester

I have some precompiled binaries for mips32r2 if you want...

Are you able to share your changes for the V4?

@neheb. yeah, let me clean up and I can share something.
I'll make a post with detailed instructions on how I overclocked the V4 later also.

Hi.
I have overclocked my router tp-link wrd 3600 with method installing firmware BB from pepe2k.
This version was 64k (gwlim) more 64k from original router.
I want to flash u-boot with new pepe2k's u-boot with 123kb. It would to be the BEST.

I have a question.
I would modify with HEX editor u-boot (with 123kb) CPU clock and before add 5 kb from my u-boot with command dd?
I don't know if new pepe2k's u-boot have CRC.
I supose than not.

Excuse me english. I don't use Google's translate.

Regards.

pepe2kยดs bl has oc included with command "setclk"... You could use this safe method with serial console or with netconsole... No need to modify with hexeditor...

Or you can modify default clock to your needs...
Look at the bottom for "CONFIG_QCA_PLL" in this file:
https://github.com/pepe2k/u-boot_mod/blob/master/u-boot/include/configs/db12x.h

1 Like

I bricked my new Netgear R6100 / Atheros AR9344 rev 2 with

root@LEDE:~# mtd -r write uboot-570.bin u-boot
Unlocking u-boot ...

Writing from uboot-570.bin to u-boot ...     
Rebooting ...

It just doesn't boot - both LEDs stays amber, no Ethernet links on ports, no WiFi signal.

The only uboot modification was replacing c0 with c8 at the 3c0c 29c0 3c0d 2a80 sequence which supposed to increase original 560MHz CPU clock by 10MHz. I checked the diff - only one byte was changed.

Any thoughts why it bricked?

Am I correct assuming only JTAG will handle boot loader corruption (not serial)?

Due to your device has nand, it is not easy to reprogramm it with an programmer... But not impossible... If it's a bga nand you should by a new one and programm this, because if you desolder your current, it might be happen that the nand did brick due to heat.

So jtag would be the easiest. I'm not sure if your device has jtag, wiki doesn't say anything about that an no board pictures available.

You shouldn't use the -r option for autoreboot.
Always verify a correct write after programming and do only a reboot if you are absolutely sure all is right.

Not sure if it is needed on nand, but on nor flash you always do a erase before write...

1 Like