What's new

CFE bootloader update

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
no.
You have right version. differences betwen eu and us is only in setting saved in nvram. Script copy your settings to new cfe, so if You have old cfe EU, then now You have new cfe EU .
 
Last edited:
no.
You have right version. differences betwen eu and us is only in setting saved in nvram. Script copy your settings to new cfe, so if You have old cfe EU, then now You have new cfe EU .

Great thanks, I have noticed a reduction in download speed since updating, should I do a factory reset after updating cfe?

Edit: it may be coincidentally a isp thing, I will see what its like tomorrow.
 
Last edited:
Still getting only 130Mbps should be getting 150 since upgrading CFE. I might try and restore my CFE backup and see if the speed goes backup.
Edit: it was a modem issue, all sorted now.
 
Last edited:
Fixed. It's spell checker's fault:)

It's Ok. You are dumping a some region on flash, but not whole 256kB is used by CFE. You may look into cfe.original with any HEX viewer, there is only "FF FF FF .." in the second half of dump which means it's part is unused.
AC87U brush CFE how?
 
How to backup firmware on rt-ac66u?
I have a Sprint rt-ac66u and want to backup the original firmware before applying any mods, e.g. CFE
I searched and could not find the original firmware to download.
 
i have bootloader version 1.0.2 in my ac68u....what is previously version? is possible to downgrade bootloader?
 
i need merlin firmware 380.59 or 380.57 with 1.0.1.8 bootloader for my ac68u? i didn`t got any errors or problems with previously bootloader.....is this possible to get it somehow?
 
What is CFE and why do i need to upgrade it?

CFE, the Common Firmware Environment, is similar to a bootloader and BIOS - what folks refer to as CFE files are actually configuration files that the CFE uses when the device boots up...

CFE, like UEFI, can contain applications, for example, the built-in HTTP server that can be used to flash firmware/configs into a CFE device.
 
This may be of help for people with broken firmware.

I had problems with my router after doing a factory reset. Turns out some of the CFE default NVRAM parameters were corrupt and the firmware would no longer boot. CFE version is 1.0.1.2. The corrupted CFE parameters prevented recovery mode.

To recover I used the internal serial port using a 3.3V USB to TTL, connecting RX to TX and TX to RX and GND to GND. Hitting Ctl-C very quickly on power up can catch the CFE> prompt. From there the 'nvram show' command revealed some corrupt values and different values from the stock CFE. They were fixed in NVRAM with the following:

Code:
CFE>nvram show
...
lan_b!tmask=255.255.255.0 <---- prevents CFE recovery mode connection
pci/2/1/pa5gw0a1=0XFEAC
pci/2/1/pa5gw1a1=0X1776 <----- not sure if this was changed from an aborted firmware upgrade
pci/2/1/pa5gw2a1=0XFA58

CFE>nvram unset lan_b!tmask
CFE>nvram set lan_netmask=255.255.255.0
CFE>nvram set pci/2/1/pa5gw0a1=0xFEA
CFE>nvram set pci/2/1/pa5gw1a1=0x1676
CFE>nvram set pci/2/1/pa5gw2a1=0xFA82
CFE>nvram commit

It is important NOT to factory reset the NVRAM parameters after this. The CFE boot prompt will still be using the corrupted values but booting other firmware will use the NVRAM adjusted parameters.

The procedure outlined in this CFE bootloader update topic will not help recover CFE with corrupted values. My procedure was to follow some of the steps in the update script, but first I needed some version of firmware that would boot. I tried OpenWrt, which uploaded and booted. It is possible that an older version of askuswrt-merlin may also work, such as RT-N66U_3.0.0.3_162.trx but this version does not have SSH.

To be able to upload firmware with tftp I restored the ifconfig at the CFE> prompt, set laptop IP to 192.168.1.2. Check the connection. Set up TFTPD32 to work on 192.168.1.2 after network is up. Put firmware in the tftp directory.

Code:
CFE>ifconfig -addr=192.168.1.1 -mask=255.255.255.0 -gw=192.168.1.2 eth0
CFE>ping 192.168.1.2
CFE>flash -noheader 192.168.1.2:openwrt-15.05.1-brcm47xx-mips74k-asus-rt-n66u-squashfs.trx flash1.trx
Rebooting and with OpenWrt running I setup SSH connection from laptop using putty to test SSH. I then used WinSCP to also connect to the router. I obtained 1.0.1.2 version of the CFE firmware from the CFE Dumps Collection. I also downloaded ryzhov_al's update script and tools.

Unpacking into the tftp directory I copied the new 1.0.1.2 CFE firmware and the nvsimple-mipsel utility with WinSCP. Then:
Code:
root@OpenWrt:~# cp rt-n66u_b1_1.0.1.2_us.bin cfe.new
root@OpenWrt:~# ./nvsimple-mipsel -e cfe.new -o 1024 | sort > nvram_updated.txt
root@OpenWrt:~# cat /dev/mtd0 > cfe.old
root@OpenWrt:~# ./nvsimple-mipsel -e /dev/mtd0ro -v -o 1024 | sort > nvram_orig.txt
root@OpenWrt:~# cat nvram_orig.txt | grep -v ^odmpid > nvram.txt
Using WinScp I copied the nvram_updated.txt and nvram.txt files to the laptop. Using WinMerge I merged the MAC addresses but not the corrupted parameters. I copied nvram_updated.txt to cfe_new.txt and back to the RT-N66U. I generated new CFE firmware from the patched text.
Code:
root@OpenWrt:~# ./nvsimple-mipsel -i cfe_new.txt cfe.new -v -o 1024 -l 4092

I then attempted to use OpenWrt mtd unlock and mtd write commands, but write permission was not enabled in the partition and I received:
Could not open mtd device: mtd0

I copied the patched cfe.new firmware back to laptop and installed an old version of asuswrt-merlin. Back at the CFE prompt:
Code:
CFE>ifconfig -addr=192.168.1.1 -mask=255.255.255.0 -gw=192.168.1.2 eth0
CFE>ping 192.168.1.2
CFE>flash -noheader 192.168.1.2:RT-N66U_3.0.0.3_162.trx flash1.trx
This version of asuswrt-merlin does not have SSH so I used a USB stick to copy the new firmware to the router. Using the serial port command line I wrote the new CFE.
Code:
mtd-write -i cfe.new -d pmon
Rebooted and tested it works. I then uploaded a more recent version of asuswrt-merlin, but one before 3.0.0.4.380_300, which prevents reverting to previous versions .

Code:
CFE>ping 192.168.1.2
CFE>flash -noheader 192.168.1.2:RT-N66U_380.58_0.trx flash1.trx
Router is now working. I am probably done mucking with this router.
 
Last edited:
Spasibo Al! :) Flashed with 1.0.1.9 (had 1.0.1.3 from beginning), works like charm!
got 330.95 BogoMIPS
 
One question though:
nvram get clkfreq
600,300,150

cat /proc/cpuinfo | grep Bogo
BogoMIPS : 330.95

strings /dev/mtd0ro | grep bl_ver
bl_version=1.0.1.9

According to BogoMIPS, router is overclocked.
According to "nvram get clkfreq" it is not. Should it be like that?

I did set it using "nvram set clkfreq=662,331,165 && nvram commit && reboot".
 
Last edited:
One question though:
nvram get clkfreq
600,300,150

cat /proc/cpuinfo | grep Bogo
BogoMIPS : 330.95

According to BogoMIPS, router is accelerated.
According to "nvram get clkfreq" it is not. Should be like that?
Hi,

Over Clocking (OC) is reset by the actual firmware to the CFE defaults.

To have the OC and NVRAM settings sticky, you need to run "nvram set clkfreq=662,331,165 && nvram commit" on every reboot.
You can achieve this by Merlin's firmware with a custom user script called "service-stop" - as I do on my N66U. :rolleyes:

With kind regards
Joe :cool:
 
Status
Not open for further replies.

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top