PDA

View Full Version : [Diff] Cut down Image flash expert



renwich
30-04-2008, 07:45 PM
This will reduce the Expert flash settings,

PaphosAL
26-05-2008, 06:37 PM
Renny- (or anyone): is there such an animal as a linux command in Telnet which will do an mtd3.img backup to /tmp (ie- Flash w/o Bootloader in JFFS2), please?

This is for a 'skinny' image without the 400kb or so payload of yWeb, but to save me keep running up and down the stairs, LOL!

Cheers- AL

fatman
27-05-2008, 10:57 AM
As renny hasnt been seen for a while, I hope this will help you

Something PT-1 posted a while back

cat /proc/mtdyou should get something like:



dev: size erasesize name
mtd0: 00020000 00004000 "BR bootloader"
mtd1: 00020000 00020000 "flfs (u-boot)"
mtd2: 006e0000 00020000 "root (cramfs)"
mtd3: 000e0000 00020000 "var (jffs2)"
mtd4: 007e0000 00020000 ]"flash without bootloader"
mtd5: 00800000 00020000 "complete flash"



then for example backup
cat /dev/mtd/4 > /tmp/image_without_bl.img

Delete the Image eraseall /dev/mtd/4

then
cat /tmp/image_without_bl.img > /dev/mtd/4

PaphosAL
28-05-2008, 12:08 PM
Thanks for that info, Fatman- although I'd already found similar on a dreambox Linux Hints 'n Tips site after a google search.
The linux command set to reflash an image already sent to /tmp via FTP looks a bit different to yours, but never mind- there's more than one way to skin a cat, LOL!
The variants I found have tested out 100%. I've incorporated the Linux telnet commands into two little .sh type scripts and popped both into the /bin folder - chmod 755 of course.
Now, in telnet, I just type backup and away it goes- about 5 secs. The script tests to see if an image file already exists in /tmp and if so, it deletes it first.
After I've FTP'd an image to /tmp 'as' mtd3.img and telnet in with a flash command to run the second script, the image is reflashed. But unlike the same process via the Menus, this method leaves normal picture and sound on the TV during the Flash write. So no progress box in the screen- and you can even change channels.
The first my missus will notice what I am up to is when the box reboots, hehe! These scripts are fine for Flash w/o Bootloader (mtd3) on JFFS2 images. For SquashFS images (later Sportster and Commando) all references to 3 in both scripts need to be changed to 4
Note that pt-1's partition info example you've quoted is for a SquashFS image. Cheers- AL :driver:
(nb for Mods: Attachment is linux telnet command scripts only- and nothing 'dodgy')

fergalsworld
28-05-2008, 12:18 PM
AL can you rename the file so it states for jffs2 images only it also might be a good idea to include a txt file explaining this aswell to save any confusion or mishaps.

PaphosAL
28-05-2008, 12:29 PM
No probs, Fergal- but I've got to pop out for a couple of hours, m8. When I get back- I'll do two variants, one for SquashFS and the other for JFFS2, each with a small readme included.

This has already saved me half a dozen trips down and up the stairs this morning, LOL! Cheers- AL

PaphosAL
28-05-2008, 04:47 PM
Sorry to make this yet another message (Post-Clocking, LOL!)- but the EDIT button has vanished for me, no matter which forum Skin I try...

Here you go then, Fergal- perhaps you can delete the attachment in my post above- and we'll run with these, with all the tinsel and bells 'n whistles, m8.

Cheers- AL