Posted: Fri Sep 03, 2021 22:40 Post subject: U-boot on r7000?
Hello Guru,
I am little new in this forum as you can see on post count . I want to know can I port U-boot (Das U-boot) on r7000.
Like there is asus router with same specs using U-boot for antenna but I want to use U-boot as main bootloader. Is this possible if not can you please give some reasons.
Posted: Mon Sep 06, 2021 14:49 Post subject: Re: U-boot on r7000?
ciggi wrote:
Hello Guru,
I am little new in this forum as you can see on post count . I want to know can I port U-boot (Das U-boot) on r7000.
Like there is asus router with same specs using U-boot for antenna but I want to use U-boot as main bootloader. Is this possible if not can you please give some reasons.
You should be able to compile a different bootloader and have it run on the R7000. The problem is that the R7000 ships with a Broadcom CFE bootloader and DD-WRT piggy backs that with a newer CFE bootloader to do it's thing; making the core bootloader irrelevant for the most part. If the core bootloader is corrupt you end up with a irrecoverable door stop that will require a chip programmer to fix. The "Stock" bootloader is really old and both Netgear and Broadcom don't care. Switching to U-Boot could make DD-WRT and other firmwares including "Stock" not work at all. The other problem is the hardware has to match exactly or it wont work. The ASUS RT-AC68P/ASUS RT-AC68U firmware is compatible with the core hardware with some modification. The TP-LINK C9 V5 shares common hardware as well, I believe it uses a U-Boot bootloader, you might have to dig through the source code.
Joined: 08 May 2018 Posts: 14221 Location: Texas, USA
Posted: Mon Sep 06, 2021 15:10 Post subject:
twindragon6 wrote:
The problem is that the R7000 ships with a Broadcom CFE bootloader and DD-WRT piggy backs that with a newer CFE bootloader to do it's thing; making the core bootloader irrelevant for the most part.....The TP-LINK C9 V5 shares common hardware as well, I believe it uses a U-Boot bootloader.
There are only certain devices where the bootloader is replaced (i.e. VxWorks WRT54* Linksys devices), AFAIK. Otherwise, all the how-tos would tell us to back up the CFE via serial console before loading DD-WRT. There is so much confused misinformation on this forum that continuing to purvey an across-the-board statement based on some posts or blog articles or someone's "expert" opinion without proof is what gets folks in trouble. If you can show picture proof that your R7000 CFE was one version before flashing DD-WRT and is a completely different version now, then that is one thing. I don't know of any in-firmware updates to the CFE nor have seen any code in the write mechanism that even touches that part of the flash as best I can tell. I could be wrong, but I would prefer proof of concept if you state something like that. Also, I do not know where the heck you go the info on the C9v5, but it doesn't use U-Boot , lol. WOW.
The problem is that the R7000 ships with a Broadcom CFE bootloader and DD-WRT piggy backs that with a newer CFE bootloader to do it's thing; making the core bootloader irrelevant for the most part.....The TP-LINK C9 V5 shares common hardware as well, I believe it uses a U-Boot bootloader.
There are only certain devices where the bootloader is replaced (i.e. VxWorks WRT54* Linksys devices), AFAIK. Otherwise, all the how-tos would tell us to back up the CFE via serial console before loading DD-WRT. There is so much confused misinformation on this forum that continuing to purvey an across-the-board statement based on some posts or blog articles or someone's "expert" opinion without proof is what gets folks in trouble. If you can show picture proof that your R7000 CFE was one version before flashing DD-WRT and is a completely different version now, then that is one thing. I don't know of any in-firmware updates to the CFE nor have seen any code in the write mechanism that even touches that part of the flash as best I can tell. I could be wrong, but I would prefer proof of concept if you state something like that. Also, I do not know where the heck you go the info on the C9v5, but it doesn't use U-Boot , lol. WOW.
I understand that, he's talking about replacing the bootloader altogether with U-Boot. It's not a good idea but is possible. Maybe he has a specific reason for doing it. It generally will break all compatibility with any firmware thereafter. As far as CFE replacement; people do it all the time, I just did! Here, see for yourself!
Checking your current version:
nvram show | grep version
CFEEdit instructions:
Don't touch advanced!!!
Change your MAC!
ETH MAC Address = Address from sticker
WL1 MAC Address = ETH MAC Address + 2
WL2 MAC Address = ETH MAC Address + 7
Save, Overwrite, Flash!
cfe_r7000_MOD.bin
Description:
ASUS RT-AC68U C0 CFE V1.3.0.7 Configured as a Stock R7000
Now, from what I understand, it has a weird flash layout that one bootloader loads a jffs image:
BrainSlayer wrote:
since the beginning. the firmware format is different from all others.
it contains a signature. and the rest is just a jffs file. within the
jffs file there is a ram cfe. the original bootloader loads this
bootloader from this
So, it's possible that the main bootloader is u-boot, considering your edited post; so in that respect, I stand partially corrected. You don't seem to understand that I was directly involved in trying to get that device supported and that BS and I are in constant email contact.
Again, making a blanket statement that flashing DD-WRT automagically replaces the bootloader on all routers is not correct and your extra posts were unnecessary. _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Now, from what I understand, it has a weird flash layout that one bootloader loads a jffs image:
BrainSlayer wrote:
since the beginning. the firmware format is different from all others.
it contains a signature. and the rest is just a jffs file. within the
jffs file there is a ram cfe. the original bootloader loads this
bootloader from this
So, it's possible that the main bootloader is u-boot, considering your edited post; so in that respect, I stand partially corrected. You don't seem to understand that I was directly involved in trying to get that device supported and that BS and I are in constant email contact.
Again, making a blanket statement that flashing DD-WRT automagically replaces the bootloader on all routers is not correct and your extra posts were unnecessary.
I never said it does! I said it chainloads another CFE! DD-WRT is one of the relatively safe firmwares to flash because of this. BS was tired of hitting the CFE wall.
It's based on XWRT-VORTEX/OpenWRT toolchain and source but instead of trying to make the R7000 into a Asus RT-AC68U;
I modified the CFE to be as close to a stock R7000 as possible without breaking compatibility with "Stock" and other firmwares.
I'll write something up in a new post.
Joined: 08 May 2018 Posts: 14221 Location: Texas, USA
Posted: Tue Sep 07, 2021 19:08 Post subject:
Okay, because I am painfully anal about specifics: What method did you use to extract the CFE_600.bin? Binwalk? You have to realize that people reading along are not inside your head and don't know exactly what process(es) you're using. _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Okay, because I am painfully anal about specifics: What method did you use to extract the CFE_600.bin? Binwalk? You have to realize that people reading along are not inside your head and don't know exactly what process(es) you're using.
Oops! Sorry about that *.chk files are basically *.zip files. I used 7-Zip or UniExtract 2. I downloaded the factory-to-dd-wrt.chk from DD-WRT's FTP and then extracted it.
Joined: 08 May 2018 Posts: 14221 Location: Texas, USA
Posted: Tue Sep 07, 2021 22:15 Post subject:
Upon further investigation, this extra cfe_600.bin doesn't seem to apply to all Broadcom devices as best I can tell (can't extract .trx or .bin files in a straightforward manner and I haven't taken the time to use binwalk); it was also not present in <Kong> builds. _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Upon further investigation, this extra cfe_600.bin doesn't seem to apply to all Broadcom devices as best I can tell (can't extract .trx or .bin files in a straightforward manner and I haven't taken the time to use binwalk); it was also not present in <Kong> builds.
That's the piggy back CFE to get DD-WRT up and running on the R7000. Dig into the source code.