Comments (5)
With the following modification, I could dump image2 with the below command
diff --git a/profiledef.c b/profiledef.c
index b9a648f..e8a4e7d 100644
--- a/profiledef.c
+++ b/profiledef.c
@@ -219,6 +219,14 @@ struct bcm2_profile bcm2_profiles[] = {
.version = "2.4.0",
.intf = BCM2_INTF_BLDR,
.magic = { 0x83f8a9ac, "2.4.0" },
+ .printf = 0x83f88174,
+ .spaces = {
+ {
+ .name = "flash",
+ .read = { 0x83f810e4, BCM2_READ_FUNC_OBL }
+ }
+ }
+
},
},
},
bcm2dump -vv dump /dev/ttyUSB0 flash image2 image2.bin
It's reporting 4.34k bytes/s. I am not sure but it looks like this bootloader doesn't have the same flash read functions as others so reading with SPI read is slow. Is there a way to make it fast? I see two ways
- Enabling telnet again so we can dump with console
- Finding fast flash read functions.
from bcm2-utils.
With the following modification, I could dump image2 with the below command
Wanna create a PR for that?
It's reporting 4.34k bytes/s. I am not sure but it looks like this bootloader doesn't have the same flash read functions as others so reading with SPI read is slow. Is there a way to make it fast?
The main bottleneck when dumping via serial console is the serial interface itself: printf
d as "%x %x %x %x\r\n"
, each line of 16 bytes of data is 37 bytes long (worst case). At 115200 baud (roughly 11.52 KiB/s), this amounts to
(11.52 KiB/s) * (16/37) = 4.98 KiB/s
which doesn't include the overhead of calling the dump code. Using base64 encoding in the dump code, you could probably achieve around 8 KiB/s, but this would significantly complicate the dump code (the code that's uploaded and executed on the router itself), which is something I want to avoid.
This is the main reason why reading via telnet is so much faster than with the serial console.
from bcm2-utils.
I opened a PR #46
I have a couple of questions.
- Since dumping with serial is slow, is there a way to enable telnet console once again so I can dump with telnet console?
- When I dumped image2 with serial, it had lots of 0xFF bytes at the end. IIRC, when I dumped with telnet it didn't have those bytes. What's the reason for this?
- Can I send the dumped firmware back to the modem again? If so, how can I do that? I guess I have to stop with
p
and then useg) Download and run from RAM
ord) Download and save to flash
I will appreciate it if you can share some pointers because I want to try modifying my firmware and upload it to my device.
from bcm2-utils.
Since dumping with serial is slow, is there a way to enable telnet console once again so I can dump with telnet console?
Does this device still allow downloading a GatewaySettings.bin
file? If so, it's possible that it can be modified to re-enable telnet using bcm2cfg
.
When I dumped image2 with serial, it had lots of 0xFF bytes at the end. IIRC, when I dumped with telnet it didn't have those bytes. What's the reason for this?
Probably the difference between running
$ bcm2dump dump <interface> flash image2 image2_with_ff.bin
and
$ bcm2dump dump <interface> flash image2,auto image2_without_ff.bin
The first command dumps the whole image2
partition, including any unused space, hence the 0xff
bytes. The second
command will check if there's an image header at the beginning of the partition, and if it's found, it'll only dump the actual image data.
Can I send the dumped firmware back to the modem again? If so, how can I do that? I guess I have to stop with
p
and then useg) Download and run from RAM
ord) Download and save to flash
I will appreciate it if you can share some pointers because I want to try modifying my firmware and upload it to my device.
Yes, you can use both commands. For that to work, you'll have to setup a TFTP server on your computer, and then specify its IP address when you run either command. If you're experimenting, g) Download and run from RAM
is the much safer alternative, as it's much harder to brick the device that way!
Sorry for the late replies!
from bcm2-utils.
Does this device still allow downloading a
GatewaySettings.bin
file? If so, it's possible that it can be modified to re-enable telnet usingbcm2cfg
.
Unfortunately, they disabled downloading the GatewaySettings.bin
file from the admin console. They actually removed tons of stuff from the admin console. They even removed the diagnosis menu which had ping
. I can still download the file thanks to the NVRAM dump and see the credentials. I guess it should be possible to write that file with a serial console but I am not sure. I saw this issue #29 but not sure what's needed more to make it work.
Thanks once again for the replies. I have two firmware dumps. The old one and the new one. I will try to diff two files and try to find how they disabled the downloading and uploading settings files.
from bcm2-utils.
Related Issues (20)
- Cisco EPC3010 boot process locked HOT 8
- Device profile for TC7210 HOT 1
- Netgear CG3100; progress and things of note HOT 6
- what's the Ubee Cable modem uart console Pin sequence HOT 4
- Castlenet CBV734EW : Can't dump in bootloader mode HOT 1
- View password telnet protocol Kaon Broadcom HOT 1
- TC7200_Kernel_Image HOT 5
- Bootloader Unlocking HOT 1
- Bricked CAX80, need RG login HOT 1
- TM902S 'ARRIS NonVol Settings' group HOT 5
- Castlenet CBV384Z4-AC1600 Can't dump in bootloader mode HOT 2
- Bisected: group size 0 too small to be valid
- Failed to parse group userif and firewall KAONMEDIA CG2200 CLARO HOT 6
- CGA2121 support HOT 1
- DecryptIng and adding other groups for Arris TM902S
- Side load file with script into original bin file? HOT 1
- Can't dump flash via telnet interface, Arris TM902S HOT 24
- Sagemcom Fast 3890 support HOT 1
- Strange Telnet and SSH interface on Ubee DDW36C HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcm2-utils.