[E3-hacking] Config / content filesystem

Nick Griffin span1922 at live.com
Wed Apr 24 11:48:36 BST 2019


This is the code I made for it… so if anyone wants to try it on theres,you can’t damge the E3 doing it,if it don’t work it will not get past the PBL line,lucky they put PBL on the nor flash you can’t brick it..😊 if it don’t work just when using the Pbltool put -n in the line to stop it from “Probbing” and “handshaking” because it will not find PBL V4.9 otherwise.
And say “Probbing” forever.. 😊 and not find anything.

You have to put the script on the USB Stick and run it from it on the E3 for it to work.

so .. cd /media/sda1/
ams-delta-of-install

The code…
-----------------------------------------------------------------------------------------

#!/bin/sh

if (! grep -q /dev/sda1 /proc/mounts); then
 echo "No install media mounted; couldn't find /dev/sda in /proc/mounts"
 exit 1;
fi

echo

echo "This process will completely restore your E3's NAND."
echo This will try and restore The Amstrad firmware on the device. Are you
echo -n "sure you wish to continue? [y/N]: "

read i

if [ ! "x$i" = "xy" -a ! "x$i" = "xY" ]; then
 echo
 echo Aborting.
 exit 1
fi

echo
echo Starting restore.. This might take a while...

if [ -e /media/sda1/e3-nand.0 ]; then
 echo Found e3-nand.0
 echo "  Erasing /dev/mtd0"
 flash_erase /dev/mtd0 0 224
 echo "  Writing e3-nand.0  4mb to /dev/mtd0"
 nandwrite /dev/mtd0 /media/sda1/e3-nand.0
fi

if [ -e /media/sda1/e3-nand.1 ]; then
 echo Found e3-nand.1
 echo "  Erasing /dev/mtd1"
 flash_erase /dev/mtd0 0 16
 echo "  Writing e3-nand-backup.1 264kb to /dev/mtd1"
 nandwrite /dev/mtd1 /media/sda1/e3-nand.1
fi

if [ -e /media/sda1/e3-nand.2 ]; then
 echo Found e3-nand.2
 echo "  Erasing /dev/mtd2"
 flash_erase /dev/mtd0 0 16
 echo "  Writing e3-nand-backup.2 264kb to /dev/mtd2"
 nandwrite /dev/mtd2 /media/sda1/e3-nand.2
fi

if [ -e /media/sda1/e3-nand.3 ]; then
 echo Found e3-nand.3
 echo "  Erasing /dev/mtd3"
 flash_erase /dev/mtd0 0 16
 echo "  Writing e3-nand-backup.3 264kb to /dev/mtd3"
 nandwrite /dev/mtd3 /media/sda1/e3-nand.3
fi

if [ -e /media/sda1/e3-nand.4 ]; then
 echo Found e3-nand.4
 echo "  Erasing /dev/mtd4"
 flash_erase /dev/mtd0 0 1728
 echo "  Writing e3-nand-backup.4  32 mb to /dev/mtd4"
 nandwrite /dev/mtd4 /media/sda1/e3-nand.4
fi

if [ -e /media/sda1/e3-nand.5 ]; then
 echo Found e3-nand.5
 echo "  Erasing /dev/mtd5"
 flash_erase /dev/mtd0 0 48
 echo "  Writing e3-nand-backup.5  792kb to /dev/mtd5"
 nandwrite /dev/mtd5 /media/sda1/e3-nand.5
fi


echo "Finished restoring the Amstrad E3 Firmware,"
echo "Type Reboot or unplug E3 to see if the Amstrad E3 Splash Screen”
echo "comes up (Fingers Crossed) If not just reinstall E3 Linux with the"
echo "pbltool with the -n in the line to stop Handshaking otherwise it will"
echo "not find PBL V4.9 Build:1311 bootloader."


Spanner..

http://amstrad-e3-hacking.freeforums.net

From: Nick Griffin<mailto:span1922 at live.com>
Sent: ‎Wednesday‎, ‎24‎ ‎April‎ ‎2019 ‎11‎:‎14
To: Discussion of the Amstrad E3 emailer hardware/software<mailto:e3-hacking at earth.li>

Thanks btw Ralph.. 😊

Spanner..

http://amstrad-e3-hacking.freeforums.net

From: David Given<mailto:dg at cowlark.com>
Sent: ‎Wednesday‎, ‎24‎ ‎April‎ ‎2019 ‎10‎:‎50
To: Discussion of the Amstrad E3 emailer hardware/software<mailto:e3-hacking at earth.li>

The E3 is based on an ARM reference design, isn't it? What's the feasibility of emulating one?

On Wed, 24 Apr 2019 at 11:46, Ralph Corderoy <ralph at inputplus.co.uk<mailto:ralph at inputplus.co.uk>> wrote:
Hi Nick,

> > That should be possible as you have the files, now without their 16
> > bytes per 512 bytes overhead.  You need to work out how many blocks
> > to erase based on the size of each file you're trying to put back.
> > IIRC I pointed out a block is the unit of erasure and it's 16 KiB.
>
> So e3-nand.0 is 3584 KB so how many blocks go into it…? so how many
> times dose 16KB going in to 3584KB…?? I don’t know..?? I can’t divide.
> Iam a bit ok on Add not brilliant at Times but can’t do Divide.

Having stripped the excess OOB data, I have these sizes for each file in
bytes.

     3670016  e3-nand-backup.0
      262144  e3-nand-backup.1
      262144  e3-nand-backup.2
      262144  e3-nand-backup.3
    28311552  e3-nand-backup.4
      786432  e3-nand-backup.5

You're right, 3,670,016 B is 3,584 KiB because
    3,670,016 / 1,024 = 3,584
so 1,024 goes into 3,670,016 exactly 3,584 times.

But the size of the erase block is 16 KiB which is
    16 * 1,024 = 16,384
so we want to know how many times 16,384 goes into 3,670,016.
    3,670,016 / 16,384 = 224
224 is what you worked out in your other email.

Taking those six sizes above and repeating the same sum gives

     3,670,016 / 16,384 =   224
       262,144 / 16,384 =    16
       262,144 / 16,384 =    16
       262,144 / 16,384 =    16
    28,311,552 / 16,384 = 1,728
       786,432 / 16,384 =    48

Now I haven't been carefully following along how to extract
e3-nand-backup.* in the first place, and how to write them back.
I'm aware there's a script involved and a command where one of the
parameters is the number of 16 KiB blocks to erase.  Hopefully, plugging
in those numbers above for each of the matching areas will work, but
it's your responsibility whether to go ahead as you're the one actually
doing all this;  I've just been sitting at a keyboard.  :-)

--
Cheers, Ralph.

_______________________________________________
e3-hacking mailing list
e3-hacking at earth.li<mailto:e3-hacking at earth.li>
https://www.earth.li/mailman/listinfo/e3-hacking<https://eur02.safelinks.protection.outlook.com/?url=https://www.earth.li/mailman/listinfo/e3-hacking&data=02%7c01%7c%7c69c6e14295c74042cbee08d6c89da440%7c84df9e7fe9f640afb435aaaaaaaaaaaa%7c1%7c0%7c636916976717334364&sdata=H8JmqamoTJhIAa7TQhXCgsEi3PcAkEvrW%2Bay%2BXLRoX8%3D&reserved=0>


--
┌─── http://www.cowlark.com<https://eur02.safelinks.protection.outlook.com/?url=http://www.cowlark.com&data=02%7c01%7c%7c69c6e14295c74042cbee08d6c89da440%7c84df9e7fe9f640afb435aaaaaaaaaaaa%7c1%7c0%7c636916976717344381&sdata=Abpjta6/p30KJcUM%2B0iv7RleOUP1AKBymsAfb1mhhSI%3D&reserved=0> ───
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.earth.li/pipermail/e3-hacking/attachments/20190424/19f81aed/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ams-delta-of-install
Type: application/octet-stream
Size: 2095 bytes
Desc: ams-delta-of-install
URL: <https://www.earth.li/pipermail/e3-hacking/attachments/20190424/19f81aed/attachment-0001.obj>


More information about the e3-hacking mailing list