Hello,
I’ve the hex dump of the NVRAM area of a Broadcom router that I obtained by UART. I connected a UART to USB adapter to my computer, stop the router boot process and run CFE command to print the data:
dn 0x000000020000 2050
This outputted something like:
------------------ block: 0, page: 0 ------------------
00000000: 10000027 00000000 930aa9fc 930aaa20 ...'...........
00000010: 930aab70 930ab7c0 930a0000 930aab70 ...p...........p
00000020: 930b2b30 00000000 00000000 00000000 ..+0............
00000030: 930a4090 930a4194 930a418c 930a8e58 ..@...A...A....X
00000040: 930a8f44 930a8f44 930a8f44 930a8f4c ...D...D...D...L
00000050: 930a4bf4 930a8f54 930a900c 930a3d14 ..K....T......=.
00000060: 930a2f18 930a2f20 930a4254 930a2f08 ../.../ ..BT../.
00000070: 930a43f0 930a3e10 930a41e0 930a8f44 ..C...>...A....D
00000080: 930a8f44 930a8f44 930a4228 930a66d8 ...D...D..B(..f.
00000090: 930a6700 930a8f44 930a8f44 930a8f44 ..g....D...D...D
000000a0: 0411198d 00000000 10400006 00000000 .........@......
000000b0: 00000000 3c09930a 252900c8 01200008 ....<...%)... ..
In multiple sections including spare areas:
(...)
07d0: 00000000 00000080 0000f600 0001ec00 ................
000007e0: 0001fc00 00000080 0000f580 0000f580 ................
000007f0: 00001000 00000400 4c453935 34300000 ........LE9540..
----------- spare area for block 0, page 0 -----------
00000800: ff198520 03000000 08c5aa26 54cb6554 ... .......&T.eT
00000810: ffffffff ffffffff ff903d5e 6d55ec0e ..........=^mU..
00000820: ffffffff ffffffff ff7317eb 30eb3f3f .........s..0.??
00000830: ffffffff ffffffff ff47d991 d2e61a37 .........G.....7
Does anyone have an ideia how do I go about cleaning this console output and actually reading the contents of the NVRAM?
The ideia is to end up with a list of the variables and values stored there.
Thank you.
After it is dumped and converted into a binary file, binwalk should (hopefully) recognize it as a filesystem such as squashfs/ubifs/jffs2
That there, from your link, tells you what you need to know… Or at least points you in the right direction.
Your dump will not have stuff like variable names in it - compilers don’t tend to keep those unless it’s a debug image; variable names are for meatsacks.
Once you have converted the dump to a binary file (dunno how you would do that these days; there ought to be a tool but you could always write one… If that thought fills you with dread then you are probably in the wrong game) binwalk might tell you what file system the data is and you could mount that and have a peer at what’s there.
Sadly there is no recipe book on how to go about it - you just have to make educated guesses (make use of Google/other research tools/usenet/hardware hacker fora) and keep trying stuff and making notes till it works…
Good luck!