ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

caeci11ius
Posts: 77
Joined: Fri Dec 03, 2010 5:47 am
Location: Canberra, Australia

ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Post by caeci11ius »

Hi everyone,

Before reading further, I am not gonna be held responsible if you brick your router with these. Before you use them, you should be able to say yes to the following statements:

1 - I can afford a new router.
2 - I don't want to buy a new router right now and a little extra speed (12-18%) will help me avoid doing that.
3 - I need more speed (e.g. routing isn't quite fast enough to max out my new VDSL2 connection, I want my VPN faster etc) and am not just doing this for fun.
4 - My router can be flashed using TFTP from the bootloader (before the OS boots) AND I know how to do this.

OK, so assuming you agree to those, there are plenty of reasons you might want more performance out of your existing router. For me, mine (WNDR3700v1) wasn't going quite fast enough to max out my new VDSL2, and I don't really feel like replacing it quite yet. An extra 12-18% (what you can expect with 680 -> 760/800MHz respectively) performance got me pretty much all the way to where I needed to be.

What these patches do is patch a core linux file to run the CPU faster than it would otherwise do. It's not the safest way to do overclocking as there's no way to turn it back down if you go too high UNLESS you can flash your router using TFTP from the bootloader (before the OS loads). Mine can do this. If yours can't and/or you don't know how to do it, then I'd advise against using these patches. That said, I haven't seen anyone out there saying that 800MHz wouldn't boot on these chips (though I have seen people saying it's unstable under max load...seems to work OK on mine).

There are patches out there to do this on standard OpenWRT, but applying them to Gargoyle is a bit fiddly (particularly if you need to clean your compile DIR) as the source for OpenWRT is only unzipped during compile. Using my modified patches makes it easy as you can just drop them into the root Gargoyle patches directory. Took me a while to work out how to do this as while I have an IT background, I'm not a programmer by occupation and so was not familiar with patch etc. Hopefully I can save some other enthusiasts some time here by posting these.

Once you've compiled Gargoyle and installed on your router, you can confirm the patch worked by using the command 'dmesg | grep "MHz" ' in an SSH terminal. Default speed is 680MHz, and you should now see 760/800 depending on the patch you used. Obviously, use only one at a time.

Original patches come from http://luci.subsignal.org/~trondah/stuff/ . I take no credit for those, just for making them easy to apply to Gargoyle. I've tested these only on WNDR3700v1, but they should work on other AR7161 based routers. If you're switching between the two, don't forget to 'make clean' your build dir in between (EDIT 3/1/16: Or use FULL_BUILD=true to save yourself the trouble of the slow source downloads again - but you must do a full build). Doesn't seem to rebuild the necessary components if you don't do this.

Once again, you're applying these patches at your own risk.
Attachments
AR7161 Overclock 760 and 800 MHz Tested WNDR3700v1 ONLY use at your own risk.zip
760MHz overclock for AR7161. Tested on WNDR3700v1 ONLY. Use at your own risk.
(1.01 KiB) Downloaded 536 times
Last edited by caeci11ius on Sat Jan 02, 2016 8:05 pm, edited 1 time in total.

Lantis
Moderator
Posts: 5624
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Post by Lantis »

You're a legend mate. I've always wondered about a way of applying these as a gargoyle patch.

I'll try these soon.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

caeci11ius
Posts: 77
Joined: Fri Dec 03, 2010 5:47 am
Location: Canberra, Australia

Re: ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Post by caeci11ius »

You have any luck Lantis?

Lantis
Moderator
Posts: 5624
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Post by Lantis »

Soon probably means 2-3 weeks for me at the moment. Need a stable internet connection for exams and my thesis/seminar. ;)

I will certainly give this a go and report back. :)
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

caeci11ius
Posts: 77
Joined: Fri Dec 03, 2010 5:47 am
Location: Canberra, Australia

Re: ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Post by caeci11ius »

Haha all good, I was just starting to think my patch must have killed your only router ;-). Very wise to wait until reliability isn't such an issue!

mredi
Posts: 1
Joined: Mon Feb 01, 2016 11:30 pm

Re: ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Post by mredi »

Sorry for the necro but is there any more guidance on how to do this exactly? I'm not super familiar on where I have to apply the patches. Clarifications? I am running 1.8.1 right now and trying to squeeze 15% more more bandwidth so I can saturate my line. Running a WNDRMACV2

caeci11ius
Posts: 77
Joined: Fri Dec 03, 2010 5:47 am
Location: Canberra, Australia

Re: ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Post by caeci11ius »

Don't have my build machine handy at the moment, but it goes in the patches directory under the root gargoyle directory once you clone the repo. If memory serves, it's called "patches-generic" or something similar to that. Once you put it in there, you simply make the image as normal.

Don't forget to come back and post how you went :-D.

robnitro
Posts: 84
Joined: Sat Feb 26, 2011 4:50 pm

Re: ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Post by robnitro »

Thank you so much for fixing the path!
I had been manually editing the file every build, and it was a pain to compile, edit and build again!

800 mhz works great on wndr3800ch.

On my buddies buffalo ag300nh with same cpu 760 was stable.

Both I tested with a lot of heat... I purposely wrapped the router in a towel to keep the heat in. Every OC I run, CPU, GPU, ram is done at extreme conditions to guarantee stability. I recommend same for yall!

For stability testing, search for "openwrt_cpu_bench_v06_ar71xx"
I can't attach the file , says quota reached for the board.
I ran the script in a loop for hours at nice 20 (to not lag the internet/etc)

robnitro
Posts: 84
Joined: Sat Feb 26, 2011 4:50 pm

Re: ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Post by robnitro »

Ahh damn, it didn't apply the patch!
I put the 800 mhz one into patches-generic, exactly as the filename you had in the zip.

Go back when done, checked build-dir:
/home/user/gargoyle/ar71xx-src/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.18.23/arch/mips/include/asm/mach-ath79
kernel-entry-init.h still stock

O well, I guess as they change the linux versions it gets messed up?

caeci11ius
Posts: 77
Joined: Fri Dec 03, 2010 5:47 am
Location: Canberra, Australia

Re: ar7161 (WNDR3700 etc.) Overclock Patches for Gargoyle

Post by caeci11ius »

You're quite right, it needs the linux version updated to 3.18 for v1.9. Will see if I can make a generic one that doesn't care about the version, but you can fix it by changing the path at the beginning if you like...

Post Reply