Updating u-boot on wrt1200ac / Overclocking cpu

I've invited @nitroshift & @chadster766 to the thread since they're the only two users I know of who have compiled uboot images for the WRT AC Series.

Thank you very much JW0914.

I think an overclock mite work for the wrt1200ac, but I don't think it would be safe to do it for any of the other wrt xx routers as they run hot. If you ever get this working pleas let us know how it gos.

Not true at all... @nitroshift work with Stefan Roese (one of the authors of Uboot) back in 2016 to compile a new bootloader image for a corrupted bootloader on the Armada XP, with @chadster766 improving on the process to make it simpler across both the Armada XP (WRT1900AC v1) and Armada 385 (all others) devices.

The instructions for how to fix a corrupted bootloader has existed in the WRT AC Series wiki since 2016, and is currently located under Corrupt Bootloader Recovery.

Since the WRT1900AC v1 came with a fan, the PWM fan script and kernel mod is possible to use on all WRT AC Series routers, however a custom fan setup would have to be constructed.

Thank you for pointing this out.

A few ways here

1 Like

Thank you =)

Interesting idea overclocking the WRT.

The file cpu.c you mention doesn't seem to exist in the Linux kernel.

Yes.
I already checked that too.
It only exist in u-boot.
I also couldn't find any equivalent file in the linux source.
Maybe someone else knows a bit more?

Have not played with it myself but:

build_dir/target-arm_cortex-a9+vfpv3_musl_eabi/linux-mvebu_cortexa9/linux-4.14.82/drivers/cpufreq

with things patched up in the:

target/linux/mvebu/patches-4.14

directory.

The driver is in /drivers/clk/mvebu/armada-38x.c

It almost has the same frequency table.
I changed 1332 to 1600

cat /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 1600.00
Features        : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x4
CPU part        : 0xc09
CPU revision    : 1

Does it now actually run with 1600Mhz?

Hmm what was the correct path for the cpu temperature ?

cat /sys/class/hwmon/hwmon1/temp1_input
79879

~ 80 degrees on idle
~ 85 degrees Celsius on load.

I think it is ~5 degress hotter than before but i'm not sure.

If someone read my other thread about sqm.
Actually raised my cpu idle value from ~50% to 60%

How to disable all meltdown/spectre fixes ?
So far i have found these options:
MEMORY_ISOLATION (not sure about this one)
PAGE_TABLE_ISOLATION
HARDEN_BRANCH_PREDICTOR
CPU_SPECTRE
Did i miss some?

And what is the difference between
Global Build Options -> User space ASLR PIE compilation
and
Advanced configuration options -> Toolchain Options -> Build executable with PIE enabled by default
?
There is also: "User space Stack-Smashing Protection" (max to regular) in Global Build Options
and
"Build executable with Stack-Smashing Protection enabled by default" (detail says uses strong setting) in Tool Options

And would it possible to dump the current u-boot config directly from the u-boot partition?

Check the system time with disabled NTP

I think -mfpu=neon-vfpv3 might be better..

?

GCC doc:
-mfpu=name
..........................
Note that ‘neon’ is an alias for ‘neon-vfpv3’ and ‘vfp’ is an alias for ‘vfpv2’.
.........................

If the selected floating-point hardware includes the NEON extension (e.g. -mfpu=‘neon’), note that floating-point operations are not generated by GCC’s auto-vectorization pass unless -funsafe-math-optimizations is also specified.

But when i add the auto vectorize option (to make a more system wide use of neon?) and the fastmath/unsafemath option the compile fails.
Because of "broken" fpu.
I had no time the last days to figure out where this check is done and then remove it.

You're going to want to run a small fan, as that's way too hot for a processor, and provides way too little room for CPU intensive tasks. A CPU not under load should sit ~45C, and under load should stay within the ~<70C:

  • 45C: 113F
  • 70C: 158F
  • 80C: 176F
  • 85C: 185F
  • 100C: 212F (boiling point of water)

Running a CPU at a conistent temperature of ~80C> will shorten the lifetime of the CPU and PCB, components, and the CPU will go into thermal protect mode ~95C - 100C.

This device has no fan.
Without overclock it is at 75C.
I think its normal for this device.
No one knows how accurate the sensor is.
The case is not hot.
Maybe i will add a fan later.

The cpu idle and frequency scaling is also not working.

You can add a fan, as all WRT AC Series routers after the 1900AC v1 retained PWM fan support, however depending on the current draw of the fan, you may need to up the power adapter to 4A output.

  • Noctua makes really quiet small diameter fans, and I utilize one of their 40mm fans on an 8C 2.4GHz Atom CPU that wasn't receiving enough CFMs of airflow to be passively cooled.

I would try the patch in @hnyman's post I linked to below before adding a fan.

It's not normal and if it was running at 75C before the overclock, it's likely either because of the lack of an upstream driver in Linux (which @hnyman talks about in his thread linked to below), and/or it's in a location with inadaequate CFM airflow.

  • Passively cooled ARM and ATOM CPUs require a minimum CFM airflow of ~2.5cfm - 3cfm for adequate passive cooling, and IIRC, the normal operating temp should be in he 40C - 55C range.

See this thread by @hnyman. It's for the WRT3200ACM, but all WRT AC Series routers, except for the 1900AC v1, utilize the Armada 385.

I changed that to 1866Mhz, hers's the result.
cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 1 (v7l)
BogoMIPS : 1866.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x4
CPU part : 0xc09
CPU revision : 1

I can confirm that with Openssl benchmarking.
However,after changing the clock,system time gone haywire.How am I supposed to fix that?

It's probably because your clock has gone haywire that the benchmarks think they do more stuff in less time.

Ah,that never came across my mind.You're probably right.And it may also explain why the performance of shadowsocks did not increase.Thanks.