Categories

Site Sponsors

Who's Online

  • 0 Members.
  • 11 Guests.

SPMP8k NAND Overview and NAND File Dump Tool – beta

3,125 views

Some disclaimers for your entertainment.

  • It’s VB, and it was written hastily.   A great combination!
  • Bugchecking and crash-proofing is minimal.   Expect both.
  • You MUST have a good adapter if you’re using USB->Serial.   Our FT232 is excellent.   Our PL-2303 is crap and times out / stalls constantly.   It works for small files and small transfer blocks, though.
  • The good news is – if you improve it or fix a bug we will post your code and you will get mad props from every other user on the entire internet.

We will first post the screenshot, and then explain the functions.

Screenshot of the SPMP8k Dump Program

Fig 1 – SPMP8k Console Dump Tool

Please be aware that there’s nothing magic going on here.   This program sends commands to the RedBoot console and parses the reply.   The parsing is dodgy and RedBoot is finicky for heavy work, so it can be painful at times.   Again, feel free to improve it.

  1. Set COM port.   Wrong port is not checked, it just ignores you.   Port already open is checked, tho.
  2. Open/Close Port.   Use to negotiate between mincom and this beast.   Or close/open as part of a voodoo routine to clear HW buffers and try to prevent timeouts.   Wait for replug/Send ^C is not implemented, you must do that with your terminal.
  3. Check Mount.   You should do this before any transactions, and you can (optionally) do it anytime you’re wondering if the PMP is still alive.   It returns the entire buffer as a msgbox so you can use it to debug screwups.
  4. Dir Box.   If you want to start at the root dir, leave this textbox blank.   If you want to search a subdir, fill it with something like IMAGE\ or RESOURCE\CALENDAR\.   Otherwise, use the checkboxes to parse all filenames or just the dir names, and whether to recurse into each dir.
  5. Dir List.   List of dirs from the search.   Load/Save directory list to text file.   Don’t overwrite your good file with blanks or you gotta parse again!
  6. Dir Tools.   The dump routine does not make dirs.   Set your root dir and use this section to generate all the directories to dump files into.   Obviously, it depends on the data from #5.
  7. File List. List of files from the search, reused later as list of files to fetch.   You can edit stuff, copy/paste single files, put in a junk line to intentionally stop fetching after a certain file, etc.   If a file is successfully fetched, the top line is deleted.   Since the program stops fetching on error, this is quasi-safe.   Buyer beware.
  8. Block Len. Length of data to dump before it is parsed to binary and written to file.   Smaller block lens are slower, but more successful with unreliable adapters.   Since we took out the file resume code it doesn’t really matter.   File resume will eventually be fixed, we swear.
  9. Get Files.   This starts the fetch.   It can be for one file or a thousand, it doesn’t matter.   If the RS232 or the PMP stalls it will error out and you can retry later.   Remember to save your file list if you’ve had a lot of successful gets so you can keep track of your progress.   The program will skip a file who already exists and whose size is correct.   Wrong size gets overwritten from 0 until resume is fixed.

That’s pretty much it.   I hope you get some use out of it, and with a reliable RS232 port it works very well.   Our current dump has been running for about 2.5h uninterrupted and has already fetched all the really big (tough) files.

REMEMBER: You must have already interrupted the boot sequence in a terminal program and the PMP should be sitting at a RedBoot> prompt before starting to work with this tool.    

VB Source and Executable for the SPMP8k Fetch Program

Now in a surprising twist of fate, about 6h after we had built our very crude tool we got a very elegant c file from another SPMP user on the web.

His tool will scan through an IMG file from SKLOGO and dump the entire ROFS structure onto your hard drive.   The end result is similar to this tool but with IMG files instead of connecting over RS232 so it takes seconds instead of hours.   It’s a fantastic tool, we will certainaly ask if we may release it on this site next time we chat with him.

For our primary goal of duplicating one device onto a second device, we still need to use the Fetch Tool as we don’t have any firmware files on hand that fit this device.   But you can trust that you will soon be able to dump your software, modify the files and filesystem, and repack a new img for upload.   More on this is coming soon…

Pages: 1 2

2 comments to SPMP8k NAND Overview and NAND File Dump Tool – beta

Leave a Reply

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>