[E3-hacking] Config / content filesystem
Nick Griffin
span1922 at live.com
Wed Apr 24 12:46:24 BST 2019
New code I don’t know if this is right…??
#!/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...
perhaps_write_flash()
{
p=${1?} erase=${2?}
f=/media/sda1/e3-nand-backup.$p
dev=/dev/mtd$p
test -e $f || return
echo found $f
echo erasing $erase on $dev
flash_erase $dev 0 $erase
echo writing flash
nandwrite -on $dev $f
}
perhaps_write_flash 0 224
perhaps_write_flash 1 16
perhaps_write_flash 2 16
perhaps_write_flash 3 16
perhaps_write_flash 4 1728
perhaps_write_flash 5 48
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 12:32
To: Discussion of the Amstrad E3 emailer hardware/software<mailto:e3-hacking at earth.li>
Or is this part … perhaps like this… lol
perhaps_write_flash 0 224
perhaps_write_flash 1 16
perhaps_write_flash 2 16
perhaps_write_flash 3 16
perhaps_write_flash 4 1728
perhaps_write_flash 5 48
Spanner..
http://amstrad-e3-hacking.freeforums.net
From: Nick Griffin<mailto:span1922 at live.com>
Sent: Wednesday, 24 April 2019 12:08
To: Discussion of the Amstrad E3 emailer hardware/software<mailto:e3-hacking at earth.li>
is this right…??
perhaps_write_flash()
{
p=${1?} erase=${2?}
f=/media/sda1/e3-nand-backup.$p
dev=/dev/mtd$p
test -e $f || return
echo found $f
echo erasing $erase on $dev
flash_erase $dev 0 $erase
echo writing flash
nandwrite -on $dev $f
}
perhaps_write_flash 0 224
perhaps_write_flash 0 16
perhaps_write_flash 0 16
perhaps_write_flash 0 16
perhaps_write_flash 0 1728
perhaps_write_flash 0 48
Spanner..
http://amstrad-e3-hacking.freeforums.net
From: Ralph Corderoy<mailto:ralph at inputplus.co.uk>
Sent: Wednesday, 24 April 2019 11:55
To: Discussion of the Amstrad E3 emailer hardware/software<mailto:e3-hacking at earth.li>
Hi Nick,
> flash_erase /dev/mtd0 0 224
...
> flash_erase /dev/mtd0 0 16
It always mtd0. There's too much repetition in the code so errors like
this are likely to creep in. Consider the approach I suggested in
https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earth.li%2Fpipermail%2Fe3-hacking%2F2019-April%2F001314.html&data=02%7C01%7C%7C3698329065b24dc1983108d6c8a3522f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636917001111275025&sdata=6HxFeGP9mAKyYCGbBLR%2FyibGpJ5zDrlJKtEwH%2FpuZdk%3D&reserved=0
Then the `0' of mtd0, etc., it only typed once.
--
Cheers, Ralph.
_______________________________________________
e3-hacking mailing list
e3-hacking at earth.li
https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earth.li%2Fmailman%2Flistinfo%2Fe3-hacking&data=02%7C01%7C%7C3698329065b24dc1983108d6c8a3522f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636917001111275025&sdata=TgNw2UJuSOOgeXqrqlGa3123K2fKTJFK%2BtjOzDWmJYo%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.earth.li/pipermail/e3-hacking/attachments/20190424/36bc3578/attachment.html>
More information about the e3-hacking
mailing list