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.
Wait, something wrong. New CFE must be 132Kb.

There is no EU or US specific code in CFE, only different NVRAM settings. My script used to take NVRAM from old CFE and "implant" it into new ONE. With all given region codes and unique MAC addresses.

Did you unpack archive on Linux?

It was already unpacked when i downloaded it with my windows pc i will unpack on the ubutnu mashine now to see what happens.
Maybe it was just a stupid mistake

* Unpacked it with ubuntu keep getting the message cant find

[1/4] Dumping default NVRAM settings from your CFE...
./cfe_update.sh: 9: ./cfe_update.sh: ./nvsimple: not found
[2/4] Modifying NVRAM settings (silent step)...
[3/4] Creating new CFE...
dd: opening `cfe.new': Permission denied
./cfe_update.sh: 19: ./cfe_update.sh: ./nvserial: not found
[4/4] Checking differences between NVRAM from old and new CFE's
If you see only two differences: one is for 'bl_version' and second is a new 'odmpid=ASUS' variable then all step are done! New CFE image 'cfe.new' is prepared for flash.
 
Last edited:
Just to let you know that I did a full reset and config from scratch and the router is working wonderfully.
 
Could you do the procedure again and post the entire terminal-"log"?

EDIT: For me it worked "out of the box" on my virtual Ubuntu installation (as soon as Ryzhov compiled the binaries for i386), no root needed

Yes but i run ubuntu x64 does that make a diffrence ?
 
Yes but i run ubuntu x64 does that make a diffrence ?

No it should not, as someone stated before the binaries compiled for i386 will vork in both x86 and x64 enviroment.

After you have extracted the downloaded archive use a terminal and navigate to that folder and type:
$ ls -l

Make sure it your list is the same as this:

-rw-rw-rw- 1 koenig koenig 133428 okt 2 15:30 cfe_n66u-1.0.1.3.empty.bin
-rwxrwxr-x 1 koenig koenig 922 okt 2 20:40 cfe_update.sh
-rwxrwxr-x 1 koenig koenig 78399 sep 30 20:46 nvserial
-rwxrwxr-x 1 koenig koenig 5552 okt 15 20:50 nvsimple
-rw-rw-r-- 1 koenig koenig 2718 sep 30 17:31 nvsimple.c
-rw-r--r-- 1 koenig koenig 2445 okt 14 20:24 README

except for the "koenig" part, that should instead state your username.

Then make sure you have your cfe in the same folder and then:
$ ./cfe_update.sh cfe.original cfe.new

Then post what happens here.

EDIT: Beeing a little bored I decided to flash the new cfe anway.
It worked, did a 30/30/30-reset afterwards and the router booted just fine.
 
Last edited:
No it should not, as someone stated before the binaries compiled for i386 will vork in both x86 and x64 enviroment.

After you have extracted the downloaded archive use a terminal and navigate to that folder and type:
$ ls -l

Make sure it your list is the same as this:

-rw-rw-rw- 1 koenig koenig 133428 okt 2 15:30 cfe_n66u-1.0.1.3.empty.bin
-rwxrwxr-x 1 koenig koenig 922 okt 2 20:40 cfe_update.sh
-rwxrwxr-x 1 koenig koenig 78399 sep 30 20:46 nvserial
-rwxrwxr-x 1 koenig koenig 5552 okt 15 20:50 nvsimple
-rw-rw-r-- 1 koenig koenig 2718 sep 30 17:31 nvsimple.c
-rw-r--r-- 1 koenig koenig 2445 okt 14 20:24 README

except for the "koenig" part, that should instead state your username.

Then make sure you have your cfe in the same folder and then:
$ ./cfe_update.sh cfe.original cfe.new

Then post what happens here.

EDIT: Beeing a little bored I decided to flash the new cfe anway.
It worked, did a 30/30/30-reset afterwards and the router booted just fine.

router@ubuntu:~/n66u$ ls -l
total 496
-rwxrwxrwx 1 router router 133428 Oct 2 06:30 cfe_n66u-1.0.1.3.empty.bin
-rwxrwxrwx 1 router router 5116 Oct 16 08:49 cfe.new
-rwxrwxrwx 1 router router 262144 Oct 16 04:39 cfe.original
-rwxrwxrwx 1 router router 922 Oct 2 11:40 cfe_update.sh
-rwxrwxrwx 1 router router 78399 Sep 30 11:46 nvserial
-rwxrwxrwx 1 router router 5552 Oct 15 11:50 nvsimple
-rwxrwxrwx 1 router router 2718 Sep 30 08:31 nvsimple.c
-rw-r--r-- 1 router router 2445 Oct 14 11:24 README
router@ubuntu:~/n66u$ ./cfe_update.sh cfe.original cfe.new
[1/4] Dumping default NVRAM settings from your CFE...
./cfe_update.sh: 9: ./cfe_update.sh: ./nvsimple: not found
[2/4] Modifying NVRAM settings (silent step)...
[3/4] Creating new CFE...
4092+0 records in
4092+0 records out
4092 bytes (4.1 kB) copied, 0.0138105 s, 296 kB/s
./cfe_update.sh: 19: ./cfe_update.sh: ./nvserial: not found
[4/4] Checking differences between NVRAM from old and new CFE's
If you see only two differences: one is for 'bl_version' and second is a new 'odmpid=ASUS' variable then all step are done! New CFE image 'cfe.new' is prepared for flash.

it has all rights so what would not be the problem i think, im no linux expert but i did something wrong thats for sure
 
You can see that the permission to the files are different.

Did you unpack the files to a folder with a linux filesystem?

EDIT:

same for me as for Gingernut:

$ nvram get bl_version

gives me: 1.0.1.2

shouldn't that have been reset during the 30/30/30?


How is it for you now Gingernut, after your reset?
 
Last edited:
You can see that the permission to the files are different.

Did you unpack the files to a folder with a linux filesystem?

Downloaded them in virtualbox, unpacked them in /home/user/

used the ''tar -xzf'' command to unpack it

is see the permissions are different but it seems to me that it you gave it all permissions it cannot go wrong either way but yeah i am not a linux expert just want the CFE and learn a bit about linux

EDIT*

router@ubuntu:~/n66u$ ./cfe_update.sh cfe.original cfe.new
[1/4] Dumping default NVRAM settings from your CFE...
nvram start 0x400
nvram end 0x13d8
nvram len 4036
nvram crc 0xfe
nvram ver 0x01
[2/4] Modifying NVRAM settings (silent step)...
[3/4] Creating new CFE...
4092+0 records in
4092+0 records out
4092 bytes (4.1 kB) copied, 0.0163493 s, 250 kB/s
[4/4] Checking differences between NVRAM from old and new CFE's
4c4
< bl_version=1.0.1.2
---
> bl_version=1.0.1.3
19a20
> odmpid=ASUS
If you see only two differences: one is for 'bl_version' and second is a new 'odmpid=ASUS' variable then all step are done! New CFE image 'cfe.new' is prepared for flash.


This is the new output seems that i didnt had the right packages installed but how do i know if i did it the right way now ?

The new CFE is 133.4 kB (133,428 bytes)
 
Last edited:
This is the new output seems that i didnt had the right packages installed but how do i know if i did it the right way now ?

The new CFE is 133.4 kB (133,428 bytes)

As far as I know everything is OK now, the same size as I got.
That was the part that poses no danger to the router itself.

Now you should really consider if you need this fix before continuing.
 
$ nvram get bl_version

gives me: 1.0.1.2

shouldn't that have been reset during the 30/30/30?


How is it for you now Gingernut, after your reset?

Out of curiosity, can one of you try to physically erase the nvram instead of resetting through WPS/Reset buttons?

mtd-erase -d nvram
reboot

Or even better, instead of running "reboot", physically turn off your router. I don't know if during a reboot the firmware might not end up re-writing the nvram content to the mtd block.
 
As far as I know everything is OK now, the same size as I got.
That was the part that poses no danger to the router itself.

Now you should really consider if you need this fix before continuing.

Now i have 2 points , I learned a bit about linux CFE ,compiling, binary packages.

Thats the part that i needed.

As for do i need the 64k fix, i am not really sure no one really answerd my question about will i now be able to run native 64k.
Like can i install DDWRT without a problem now does it see the full 64k ?


I am going to keep the CFE i created for now until i get some answers because what am i really fixing by flashing this CFE ?
 
This is the new output seems that i didnt had the right packages installed but how do i know if i did it the right way now ?
Last step is a checking: script extracts and compares NVRAM areas from old and new CFE binaries. Then script tell what you will see in case of success:
[4/4] Checking differences between NVRAM from old and new CFE's
4c4
< bl_version=1.0.1.2
---
> bl_version=1.0.1.3
19a20
> odmpid=ASUS
If you see only two differences: one is for 'bl_version' and second is a new 'odmpid=ASUS' variable then all step are done! New CFE image 'cfe.new' is prepared for flash.
...which means all done well.
The new CFE is 133.4 kB (133,428 bytes)
It's Ok.

As for do i need the 64k fix, i am not really sure no one really answerd my question about will i now be able to run native 64k.
What?:)
 
Last edited:
Last step is a checking: script extracts and compares NVRAM areas from old and new CFE binaries. Then script tell what you will see in case of success:
...which means all done well.
It's Ok.

What?:)

Well so it seems DDWRT must update, thats fine by me im gonna stay with merlin wrt so.

I am going to flash my router out of curiosity because i know if i dont i am not going to sleep tonight.

Anybody some clean tips i can run or check before i will flash the CFE ?
I will report back if it was a success or a fail.

EDIT*

I just flashed it i think

I copy the new cfe to tmp/home/root
Then i commanded mtd-write -i cfe.new -d pmon

But .......... how will i know if it worked haha ?
al least i did not brick the unit that the upside of the story
 
Last edited:
Well so it seems DDWRT must update, thats fine by me im gonna stay with merlin wrt so.

I am going to flash my router out of curiosity because i know if i dont i am not going to sleep tonight.

Anybody some clean tips i can run or check before i will flash the CFE ?
I will report back if it was a success or a fail.

DD-WRT have builds for 64kB NVRAM, but I do not know if it is OK to use them with this router though.

@Ryzhov:

Thank you for this.

You say you got this from a new N66U, that must then mean that new shipments from Asus have 64kB NVRAM then?

I would like to know some more about where this originated from.

@RMerlin:
I could try to erase the NVRAM in a couple of hours.

EDIT: What should actually happen when the NVRAM partition is deleted?
 
Last edited:
How do i check that i flashed it the right way?
Tried the bogo mips value it stays the same is this right or wrong ?
 
@RMerlin:
I could try to erase the NVRAM in a couple of hours.

EDIT: What should actually happen when the NVRAM partition is deleted?

On the next boot, CFE should write a fresh set of default values.

Just curious to see if it will fix the issue where people report that the new bootloader version isn't set to nvram after they do a factory default reset through the WPS button.
 
You say you got this from a new N66U, that must then mean that new shipments from Asus have 64kB NVRAM then?
I don't know Asus's plans, sorry.

EDIT: What should actually happen when the NVRAM partition is deleted?
It reverts router to factory settings, nothing more.

How do i check that i flashed it the right way?
Well, you may set any NVRAM variable used by CFE and see how CFE reacts. For example:

$ nvram set wait_time=20 && nvram commit && reboot

forces router to stay in recovery mode for 20 seconds on every boot (3 secs is default value).
Tried the bogo mips value it stays the same is this right or wrong ?
Router's CPU frequency not changes smoothly. Here is a table for hint.

And, by the way, overclocking in N66U is blocked, but on AC66U is not. Here is a rating table to imaging how overclocking is use(full/less).
 
Last edited:
On the next boot, CFE should write a fresh set of default values.

Just curious to see if it will fix the issue where people report that the new bootloader version isn't set to nvram after they do a factory default reset through the WPS button.

I erased the NVRAM, first it was showing nothing when i entered nvram get bl_version.
But after i erased the NVRAM and rebooted the unit it now shows 1.0.1.3
 
I don't know Asus's plans, sorry.

It reverts router to factory settings, nothing more.

Well, you may set any NVRAM variable used by CFE and see how CFE reacts. For example:

$ nvram set wait_time=20 && nvram commit && reboot

forces router to stay in recovery mode for 20 seconds on every boot (3 secs is default value).
Router's CPU frequency not changes smoothly. Here is a table for hint.

And, by the way, overclocking in N66U is blocked, but on AC66U is not. Here is a rating table to imaging how overclocking is use(full/less).

$ nvram set wait_time=20 && nvram commit && reboot

Did that i do not see any difference but it reports that it has new CFE when i command nvram get bl_version it says 1.0.1.3
 
Status
Not open for further replies.

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!
Top