Re: [E3-hacking] Config / content filesystem

2019-04-29 Thread Nick Griffin
No still don’t load any well. Maybe Jonathan could help…? I don’t have a 
clue.

Spanner..

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

From: Nick Griffin
Sent: ‎Wednesday‎, ‎24‎ ‎April‎ ‎2019 ‎19‎:‎39
To: Nick Griffin

I try again with the images with the oob in them and see if that works.

Spanner..

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

From: Nick Griffin
Sent: ‎Wednesday‎, ‎24‎ ‎April‎ ‎2019 ‎19‎:‎37
To: Nick Griffin

Yes we need Jonathan I think, he understands this more.. I think he gave 
the code to remove it so you could look at the data in the files better by hex.

Spanner..

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

From: Nick Griffin
Sent: ‎Wednesday‎, ‎24‎ ‎April‎ ‎2019 ‎19‎:‎23
To: Discussion of the Amstrad E3 emailer 
hardware/software

I  think it needs the OOB data in the image.
Just looked on the net about ,it say…

How does this combination of nandsim, nandwrite and nandddump decide which ECC 
scheme to use? The flash is from a TI AM335 system, and as far as I know, the 
ECC scheme is decided by a combination of the processor and OS. How do these 
utilities know what to do?


First of all the ECC scheme used does not necessarily have to be for all the 
flash erase blocks. There are ususally 3 different types of flash partitions 
used and for every type the method to specify the used ECC code differs:

  1.  The one that are accessed by the ROM bootcode
  2.  The ones that are accessed by the bootloader (usually u-boot)
  3.  The ones that are accessed by the operating system (assuming you are 
using Linux)

In general the use of a specific ECC method is limited by the OOB size of the 
flash. The AM335x_U-Boot_User's_Guide (cannot post link here because of 
reputation) explains it in sections BCH Flash OOB Layout and the example 
matches to the flash chip you are using. The 64 bytes per 2k page effectively 
limit the usable ECC algorithms to BCH8, BCH4 or HAMMING codes.

BCH Flash OOB Layout

For any ECC scheme we need to add some extra data while writing so as to detect 
and correct (if possible) the errors introduced by the NAND part. In case of 
BCH scheme some bytes are needed to store the ECC related info.

The section of NAND memory where addition info like ECC data is stored is 
referred to as Out Of Band or OOB section.

The first 2 bytes are used for Bad block marker – 0x => Good block

The next ‘N’ bytes is used for BCH bytes

N = B * Number of 512-byte sectors in a page

B = 8 bytes per 512 byte sector in BCH4 B = 14 bytes per 512 byte sector in 
BCH8 B = 26 bytes per 512 byte sector in BCH16

So for a 2k page-size NAND flash with 64-byte OOB size, we will use BCH8. This 
will consume 2 + (14*4) = 58 bytes out of 64 bytes available.

ECC used by ROM bootcode

The AM335x processor's ROM bootcode decides which ECC scheme to use for NAND 
flash depending on the mechanism expalined in the AM335x technical reference 
manual chapter 26.1.7.4 NAND

ECC Correction The default ECC correction applied is BCH 8b/sector using the 
GPMC and ELM hardware. For device ID codes D3h, C3h, D5h, C5h, D7h, C7h, DEh, 
CEh when manufacturer code (first ID byte) is 98h the Cell type information is 
checked in the 4th byte of ID data. If it is equal to 10b then the ECC 
correction applied is BCH 16b/sector. In addition ECC computation done by the 
ROM can be turned off completely by using SYSBOOT[9]. This is particularly 
useful when interfacing with NAND devices that have built in ECC engines.

Other ways to control the ECC behavior are ONFI or and I2C EEPROM but the 
H27U1G8F2BTR datasheet does not mention ONFI so I guess it is not supported by 
the flash chip.

So basically BCH8 or BCH16 or no ECC mechanism is used for the first 128K the 
ROM bootloader reads from NAND flash.

ECC used by the bootloader

The bootloader decides this on his own. For example for U-boot this information 
is compiled into u-boot and the first level bootloader (SPL/MLO) as well. The 
information is controlled by U-Boot configuration settings set at compile time. 
Recent versions of U-boot can switch the ecc at runtime using the nandecc 
command.

ECC used by the OS

The selection is completely OS specific. For Linux embedded systems using 
AM335x processors I know that this information is passed into the kernel using 
the device tree.

Which ECC method does nandsim use

There is a parameter called bch which can be passed to the nandsim module to 
select an ecc code. From the code I guess It is initialized to zero so it won't 
use any ECC code. So it seems that nandsim can use BCH8 and BCH16 but only one 
for the whole flash that is simulated.

modprobe nandsim bch=8 first_id_byte=0xad second_id_byte=0xf1 
third_id_byte=0x00 fourth_id_byte=0x1d

Which ECC method does nanddump/nandwrite use

Again, this depends on the OS/Linux you used to dump the 

Re: [E3-hacking] Config / content filesystem

2019-04-29 Thread Nick Griffin
I  think it needs the OOB data in the image.
Just looked on the net about ,it say…

How does this combination of nandsim, nandwrite and nandddump decide which ECC 
scheme to use? The flash is from a TI AM335 system, and as far as I know, the 
ECC scheme is decided by a combination of the processor and OS. How do these 
utilities know what to do?


First of all the ECC scheme used does not necessarily have to be for all the 
flash erase blocks. There are ususally 3 different types of flash partitions 
used and for every type the method to specify the used ECC code differs:

  1.  The one that are accessed by the ROM bootcode
  2.  The ones that are accessed by the bootloader (usually u-boot)
  3.  The ones that are accessed by the operating system (assuming you are 
using Linux)

In general the use of a specific ECC method is limited by the OOB size of the 
flash. The AM335x_U-Boot_User's_Guide (cannot post link here because of 
reputation) explains it in sections BCH Flash OOB Layout and the example 
matches to the flash chip you are using. The 64 bytes per 2k page effectively 
limit the usable ECC algorithms to BCH8, BCH4 or HAMMING codes.

BCH Flash OOB Layout

For any ECC scheme we need to add some extra data while writing so as to detect 
and correct (if possible) the errors introduced by the NAND part. In case of 
BCH scheme some bytes are needed to store the ECC related info.

The section of NAND memory where addition info like ECC data is stored is 
referred to as Out Of Band or OOB section.

The first 2 bytes are used for Bad block marker – 0x => Good block

The next ‘N’ bytes is used for BCH bytes

N = B * Number of 512-byte sectors in a page

B = 8 bytes per 512 byte sector in BCH4 B = 14 bytes per 512 byte sector in 
BCH8 B = 26 bytes per 512 byte sector in BCH16

So for a 2k page-size NAND flash with 64-byte OOB size, we will use BCH8. This 
will consume 2 + (14*4) = 58 bytes out of 64 bytes available.

ECC used by ROM bootcode

The AM335x processor's ROM bootcode decides which ECC scheme to use for NAND 
flash depending on the mechanism expalined in the AM335x technical reference 
manual chapter 26.1.7.4 NAND

ECC Correction The default ECC correction applied is BCH 8b/sector using the 
GPMC and ELM hardware. For device ID codes D3h, C3h, D5h, C5h, D7h, C7h, DEh, 
CEh when manufacturer code (first ID byte) is 98h the Cell type information is 
checked in the 4th byte of ID data. If it is equal to 10b then the ECC 
correction applied is BCH 16b/sector. In addition ECC computation done by the 
ROM can be turned off completely by using SYSBOOT[9]. This is particularly 
useful when interfacing with NAND devices that have built in ECC engines.

Other ways to control the ECC behavior are ONFI or and I2C EEPROM but the 
H27U1G8F2BTR datasheet does not mention ONFI so I guess it is not supported by 
the flash chip.

So basically BCH8 or BCH16 or no ECC mechanism is used for the first 128K the 
ROM bootloader reads from NAND flash.

ECC used by the bootloader

The bootloader decides this on his own. For example for U-boot this information 
is compiled into u-boot and the first level bootloader (SPL/MLO) as well. The 
information is controlled by U-Boot configuration settings set at compile time. 
Recent versions of U-boot can switch the ecc at runtime using the nandecc 
command.

ECC used by the OS

The selection is completely OS specific. For Linux embedded systems using 
AM335x processors I know that this information is passed into the kernel using 
the device tree.

Which ECC method does nandsim use

There is a parameter called bch which can be passed to the nandsim module to 
select an ecc code. From the code I guess It is initialized to zero so it won't 
use any ECC code. So it seems that nandsim can use BCH8 and BCH16 but only one 
for the whole flash that is simulated.

modprobe nandsim bch=8 first_id_byte=0xad second_id_byte=0xf1 
third_id_byte=0x00 fourth_id_byte=0x1d

Which ECC method does nanddump/nandwrite use

Again, this depends on the OS/Linux you used to dump the flash. Similar to the 
nandsim module real mtd drivers have ways to specify the used ECC scheme 
(kernel parameters, device tree). But you can instruct nanddump to ignore the 
ECC information, too.

References

  *   AM335x technical reference manual http://www.ti.com/lit/gpn/am3359
  *   bch Linux Kernel parameter for nandsim 
http://lxr.free-electrons.com/source/drivers/mtd/nand/nandsim.c#L175
  *   The AM335x_U-Boot_User's_Guide





Spanner..

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

From: Ralph Corderoy
Sent: ‎Wednesday‎, ‎24‎ ‎April‎ ‎2019 ‎18‎:‎30
To: Discussion of the Amstrad E3 emailer 
hardware/software

Hi Nick,

> I copied it twice not

What's the output of copying it once?

> Amstrad Delta - PBL V4.9 Build:1311 Assert Debug ICE
> PBL 32MB NAND
> 0MB.-->MEMv01.00.002,CopyLim=0022h,CodeEnd=0140h-->PBL..1MB...2MB*

What if you try reading 

Re: [E3-hacking] Config / content filesystem

2019-04-27 Thread Nick Griffin
I need someone on here who knows what there are doing flashing the Amstrad 
firmware back on the E3.

Has anyone still got there E3 on here but only if you have flashed E3 Linux on 
it already then you can test trying flashing Amstrad E3 Original Firmware back 
and see it you can get it working, More people doing it would be better because 
one of us might get it working.

And I might of missed something you might find.. 

Any one willing to do this..?

Mine don’t go anywhere it don’t even get to this line …

System module loader - LDR V1.5 Build:0008 Assert

What am I missing…??

Spanner..

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

From: Nick Griffin
Sent: ‎Friday‎, ‎26‎ ‎April‎ ‎2019 ‎22‎:‎23
To: Discussion of the Amstrad E3 emailer 
hardware/software

>So, does that mean you have two now?

Yes I have 2 E3 now.. lol

>What do you mean by "reset"?

I mean if you hold Down Delete, Stop and Handfree when you boot up the E3 it 
puts in back to factory defaults where you have to register it and says” Press 
the [Email] button to get connected”

>Please remind me what this "trick" is?

With the Main Software V2 if its deactivated you could lift hand set and press 
and hold email down until it says aborting email please wait.. and it would 
activate the phone, it don’t work on V4.

>I disagree - a comparison (especially of the boot loader, not necessarily the
main software) could be instructive.

I can copy the firmware if you want it and share it…?

>You mean copying the firmware for interest's sake, or with the idea of copying
from the E1/E2 to the E3?
No copying the firmware from the E1/E2 to copy it back to a E1/E2 that's 
deactivated to activate them.

>Why do you always write this at the end of your emails?

Spanner is my name, My real name is Nick, I have not been called Nick for about 
15 years. Last person to call me Nick was my mum, she died 15 years ago in 
2004. I go by Spanner or Span now… 

Its a nickname I got at school, my partner started calling me it because I am 
good at working things out or fixing things then I started to use it as a 
username online.

Spanner..

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

From: Antony Stone
Sent: ‎Friday‎, ‎26‎ ‎April‎ ‎2019 ‎21‎:‎31
To: Discussion of the Amstrad E3 emailer 
hardware/software

On Friday 26 April 2019 at 22:01:29, Nick Griffin wrote:

> Ok thanks,I got my new E3 today

So, does that mean you have two now?

> and the seller told me it was working and able to make a call on it before I
> bought it and its unregistered so deactivated…

Sounds good so far...

> dam it.. ☹ ,he said to me he don’t understand how it was reset when it was
> working…???

What do you mean by "reset"?

> Its Main Software is V4 so the dial for email trick don’t work.

Please remind me what this "trick" is?

> so no point in copying the firmware

I disagree - a comparison (especially of the boot loader, not necessarily the
main software) could be instructive.

> but I am glad I have the clock back,

Be thankful for small mercies :))

> Has anyone have a idea of copying the firmware on the E1 or E2,

You mean copying the firmware for interest's sake, or with the idea of copying
from the E1/E2 to the E3?

I really doubt that E1/E2 firmware would work on an E3.  Different CPUs, for a
start.

> I have a E1 that activated too now.. I don’t know how the E1/E2 E-mailers
> OS work maybe someone can explain, well it not Linux like E3 so what does it
> use..?

Remember that there was a day when people wrote firmware for devices from
scratch, without using an "operating system".  It's only since the days when
embedded devices like wireless routers, telephones, televisions etc have had
enough CPU and RAM to run Linux that this has been a simpler starting point.

> Spanner..

Why do you always write this at the end of your emails?


Regards,


Antony.

--
"If I've told you once, I've told you a million times - stop exaggerating!"

   Please reply to the list;
 please *don't* CC me.

___
e3-hacking mailing list
e3-hacking@earth.li
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earth.li%2Fmailman%2Flistinfo%2Fe3-hackingdata=02%7C01%7C%7C0cec744a3e744933fb9d08d6ca86394f%7C84df9e7fe9f640afb435%7C1%7C0%7C636919075177321832sdata=7RGnHIIotBRp4gY%2F3FrAgejVyPFwh6LwJdLzI014zUk%3Dreserved=0
___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-26 Thread Nick Griffin
>So, does that mean you have two now?

Yes I have 2 E3 now.. lol

>What do you mean by "reset"?

I mean if you hold Down Delete, Stop and Handfree when you boot up the E3 it 
puts in back to factory defaults where you have to register it and says” Press 
the [Email] button to get connected”

>Please remind me what this "trick" is?

With the Main Software V2 if its deactivated you could lift hand set and press 
and hold email down until it says aborting email please wait.. and it would 
activate the phone, it don’t work on V4.

>I disagree - a comparison (especially of the boot loader, not necessarily the
main software) could be instructive.

I can copy the firmware if you want it and share it…?

>You mean copying the firmware for interest's sake, or with the idea of copying
from the E1/E2 to the E3?
No copying the firmware from the E1/E2 to copy it back to a E1/E2 that's 
deactivated to activate them.

>Why do you always write this at the end of your emails?

Spanner is my name, My real name is Nick, I have not been called Nick for about 
15 years. Last person to call me Nick was my mum, she died 15 years ago in 
2004. I go by Spanner or Span now… 

Its a nickname I got at school, my partner started calling me it because I am 
good at working things out or fixing things then I started to use it as a 
username online.

Spanner..

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

From: Antony Stone
Sent: ‎Friday‎, ‎26‎ ‎April‎ ‎2019 ‎21‎:‎31
To: Discussion of the Amstrad E3 emailer 
hardware/software

On Friday 26 April 2019 at 22:01:29, Nick Griffin wrote:

> Ok thanks,I got my new E3 today

So, does that mean you have two now?

> and the seller told me it was working and able to make a call on it before I
> bought it and its unregistered so deactivated…

Sounds good so far...

> dam it.. ☹ ,he said to me he don’t understand how it was reset when it was
> working…???

What do you mean by "reset"?

> Its Main Software is V4 so the dial for email trick don’t work.

Please remind me what this "trick" is?

> so no point in copying the firmware

I disagree - a comparison (especially of the boot loader, not necessarily the
main software) could be instructive.

> but I am glad I have the clock back,

Be thankful for small mercies :))

> Has anyone have a idea of copying the firmware on the E1 or E2,

You mean copying the firmware for interest's sake, or with the idea of copying
from the E1/E2 to the E3?

I really doubt that E1/E2 firmware would work on an E3.  Different CPUs, for a
start.

> I have a E1 that activated too now.. I don’t know how the E1/E2 E-mailers
> OS work maybe someone can explain, well it not Linux like E3 so what does it
> use..?

Remember that there was a day when people wrote firmware for devices from
scratch, without using an "operating system".  It's only since the days when
embedded devices like wireless routers, telephones, televisions etc have had
enough CPU and RAM to run Linux that this has been a simpler starting point.

> Spanner..

Why do you always write this at the end of your emails?


Regards,


Antony.

--
"If I've told you once, I've told you a million times - stop exaggerating!"

   Please reply to the list;
 please *don't* CC me.

___
e3-hacking mailing list
e3-hacking@earth.li
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earth.li%2Fmailman%2Flistinfo%2Fe3-hackingdata=02%7C01%7C%7C0cec744a3e744933fb9d08d6ca86394f%7C84df9e7fe9f640afb435%7C1%7C0%7C636919075177321832sdata=7RGnHIIotBRp4gY%2F3FrAgejVyPFwh6LwJdLzI014zUk%3Dreserved=0
___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-26 Thread Antony Stone
On Friday 26 April 2019 at 22:01:29, Nick Griffin wrote:

> Ok thanks,I got my new E3 today

So, does that mean you have two now?

> and the seller told me it was working and able to make a call on it before I
> bought it and its unregistered so deactivated…

Sounds good so far...

> dam it.. ☹ ,he said to me he don’t understand how it was reset when it was
> working…???

What do you mean by "reset"?

> Its Main Software is V4 so the dial for email trick don’t work.

Please remind me what this "trick" is?

> so no point in copying the firmware

I disagree - a comparison (especially of the boot loader, not necessarily the 
main software) could be instructive.

> but I am glad I have the clock back,

Be thankful for small mercies :))

> Has anyone have a idea of copying the firmware on the E1 or E2,

You mean copying the firmware for interest's sake, or with the idea of copying 
from the E1/E2 to the E3?

I really doubt that E1/E2 firmware would work on an E3.  Different CPUs, for a 
start.

> I have a E1 that activated too now.. I don’t know how the E1/E2 E-mailers
> OS work maybe someone can explain, well it not Linux like E3 so what does it
> use..?

Remember that there was a day when people wrote firmware for devices from 
scratch, without using an "operating system".  It's only since the days when 
embedded devices like wireless routers, telephones, televisions etc have had 
enough CPU and RAM to run Linux that this has been a simpler starting point.

> Spanner..

Why do you always write this at the end of your emails?


Regards,


Antony.

-- 
"If I've told you once, I've told you a million times - stop exaggerating!"

   Please reply to the list;
 please *don't* CC me.

___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-24 Thread Ralph Corderoy
Hi Nick,

> Starting restore.. This might take a while...
> found /media/sda1/e3-nand.0
> erasing 224 on /dev/mtd0
> Erase Total 224 Units
> Performing Flash Erase of length 16384 at offset 0x37c000 done offset 0x1f8000
> writing flash
> Input file is not page aligned

That's nandwrite detecting the file's length means it doesn't contain a
whole number of what it expects.

> Data did not fit into device, due to bad blocks

That's just a secondary error caused by the first that can be ignored;
a bug in nandwrite.

https://github.com/vamanea/mtd-utils/blob/master/nandwrite.c#L46 says -o
means image contains OOB data, but we've stripped it out so the
nandwrite -on $dev $f
you have needs to be
nandwrite -n $dev $f

That's assuming it's okay to write the data without the OOB part;
I don't know about mtd but that's the implication I picked up from
earlier in this thread.

-- 
Cheers, Ralph.

___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-24 Thread Nick Griffin
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
Sent: ‎Wednesday‎, ‎24‎ ‎April‎ ‎2019 ‎12‎:‎08
To: Discussion of the Amstrad E3 emailer 
hardware/software

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
Sent: ‎Wednesday‎, ‎24‎ ‎April‎ ‎2019 ‎11‎:‎55
To: Discussion of the Amstrad E3 emailer 
hardware/software

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.htmldata=02%7C01%7C%7C3698329065b24dc1983108d6c8a3522f%7C84df9e7fe9f640afb435%7C1%7C0%7C63691700275025sdata=6HxFeGP9mAKyYCGbBLR%2FyibGpJ5zDrlJKtEwH%2FpuZdk%3Dreserved=0
Then the `0' of mtd0, etc., it only typed once.

--
Cheers, Ralph.

___
e3-hacking mailing list
e3-hacking@earth.li
https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earth.li%2Fmailman%2Flistinfo%2Fe3-hackingdata=02%7C01%7C%7C3698329065b24dc1983108d6c8a3522f%7C84df9e7fe9f640afb435%7C1%7C0%7C63691700275025sdata=TgNw2UJuSOOgeXqrqlGa3123K2fKTJFK%2BtjOzDWmJYo%3Dreserved=0
___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-23 Thread Ralph Corderoy
Hi Nick,

> its just a command line version because the E3 is not powerful to run
> proper Linux.

Linux as you know it is three main parts.  There's the kernel, that's
what Linux really is, and it talks to the hardware.  Atop of that are
the user-space programs, like the shell, ls(1), etc.  They give you the
command line that many of us appreciate.  And then a bunch of user-space
programs can together provide a graphical environment with windows,
menus, etc.;  a `desktop', like Gnome, or XFCE.  Linux distributions
bundle those all up together.

So the E3 is powerful enough to run a Linux kernel, but doesn't have
enough memory to run a modern version, just as Intel 386 processors are
no longer supported.

> If I can’t put the original firmware back

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.

-- 
Cheers, Ralph.

___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-23 Thread Ralph Corderoy
Hi Nick,

> Does anyone want the E3 adverts, they are not big, there are 7 of them
> in gif format they are the same size as the screen on the E3 is
> 480x320, I can upload them

Yes, do that, e.g. to Dropbox like with the other files.  I expect I'm
not the only one to squirrel stuff away so copies live on.

-- 
Cheers, Ralph.

___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-22 Thread Ralph Corderoy
Hi Jonathan,

> So, the MTD partitions do not directly map to a kernel or a Linux
> filesystem. The "Q;Q;" blocks are an Amstrad specific way of putting
> data into those partitions, with a type + description associated with
> each one. For example the kernel lives in a Q;Q; block in mtd3 called
> "LINUX". mtd3 also has Q;Q; blocks for LDR (the second stage boot
> loader), and PARMS (the kernel boot parameters).

Agreed.  I guessed a 32-byte struct based on various `Q;Q;'s seen.

$ qq() {
> LC_ALL=C perl -0777ne 'print $& while /Q;Q;.{0,32}/g' "$@" |
> hexdump -ve '36/1 "%_p" "\n"';
> }
$
$ qq e3-nand-backup.3
Q;Q;...@MEM.
Q;Q;PARMS...
Q;Q;Hf..LDR.
Q;Q;.x..LINUX...
$

> The CRAMFS filesystem is in mtd4; Q;Q; block name "LNXFSYS". There are
> 2 of them (I imagine to allow for an active + fallback).

$ qq e3-nand-backup.4 | grep LNXFSYS
Q;Q;LNXFSYS.
Q;Q;...6LNXFSYS.
$

> There are various other bits of content in mtd4 too - you can see them
> by doing:
>
>  hexdump -C e3-nand-backup.4 | grep -A 1 "Q;Q;"

That's where my 32-byte-long guess comes unstuck.  A Q;Q; appears within
the structs around LIBC's.

$ qq e3-nand-backup.4 | fgrep -3 .LIBC
Q;Q;..^.. ..WTL_MAILCON.
Q;Q;. ..WTL_RES.
Q;Q;..M.  Q;Q;. 
Q;Q;. ..LIBC
Q;Q;. Q;Q;...Q. 
..WTL_WAV.Q;Q;. 
..WTL_CHUNK...Q;Q;..$.. 
$

And so it's out of step for a while.  Perhaps there's Q;Q;-formatted
data inside a Q;Q; block, or the last struct in the initial `list' is
shorter and its struct's content indicate that.

$ qq e3-nand-backup.4 | grep -1 ^Q | grep -3 ^-
Q;Q;. ..LIBC
Q;Q;. Q;Q;...Q. 
..WTL_WAV.Q;Q;. 
--
..M_USERPREF..Q;Q;.V
Q;Q;.1..M_WTL_WTAI..
Q;Q;.A..M_VPARSE
$

I expect a bit of peering at the words in each struct would spot a
length or similar of each `file's data to save searching through for the
next Q;Q;.

-- 
Cheers, Ralph.

___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-21 Thread David Given
You wouldn't run imagemagick on the E3 itself. (Apart from anything else
the E3 distribution is, IIRC, something based on OpenEmbedded/Angstrom and
is very hard to get software for?) You'd run it on a PC and use it to
convert files to put on a USB stick, and then use simple scripting on the
E3 to draw them on the screen.

That said, I remember the E3 framebuffer format to be pretty weird, so you
may be better off writing a program (on a PC) to do some kind of custom
conversion. fbset on the E3 should tell you the exact format.

On Sun, 21 Apr 2019 at 23:45, Nick Griffin  wrote:

> What the ams-delta mini distribution ..?
> Which one do I download… https://www.imagemagick.org/script/download.php and
> how do I install it on the E3..?
>
> Spanner..
>
> http://amstrad-e3-hacking.freeforums.net
>
> *From:* David Given 
> *Sent:* ‎Sunday‎, ‎21‎ ‎April‎ ‎2019 ‎19‎:‎41
> *To:* Discussion of the Amstrad E3 emailer hardware/software
> 
>
> If you just want to put images onto the screen, write a tiny script that
> copies files from the USB stick and cats them to /dev/fb0. Converting
> images to the right format's a little bit harder but I wouldn't be
> surprised if ImageMagick could do it out of the box. That'll run happily in
> the ams-delta mini distribution.
>
> Alternatively, you can boot an old Debian from a USB stick using that
> kernel --- although you'll need to hunt around to find a userland old
> enough; I think Debian woody works. That'll give you a (very slow)
> development system running on the E3 itself. Then you can write your own
> SDL programs to draw whatever you like, although I should warn you against
> extended typing on that keyboard unless you hate your fingers.
>
> On Sun, 21 Apr 2019 at 12:40, Nick Griffin  wrote:
>
>> I do wish I never flashed E3 Linux on it now,theres no point to it,you
>> can’t put anything on it or run anything on it cos its too old and E3 Linux
>> didn’t go anywhere, its just a command line version because the E3 is not
>> powerful to run proper Linux. I installed E3 Linux release v2 (E3 Linux
>> sound better that just Linux or release v2 this way you know what I am
>> taking about)from the.earth.li/pub/e3/
>> 
>> what are the rest of the stuff in there, can I update it to 2.6.19,its at
>> 2.6.16 that what release v2 is…?
>>
>> I would like to put a program on it so it shows images on it screen you
>> have to make it on it and it don’t even have make on it to make a program
>> so make need to be installed first.
>> If I can’t put the original firmware back or put a program on it so it
>> shows a animated gif then it useless and I will end up putting it in the
>> bin. I have about 8 gifs of its old adverts and want to show them on the
>> E3s screen, can anyone help me please. I am not used to installing programs
>> from source code, I am use to installing it from a repository.
>>
>> Oh and what happen to this…
>> http://amstrad-e3-hacking.freeforums.net/thread/7/support-status-update
>> 
>> why did the work on E3 Linux stop and only get to 2.6.19…?
>>
>> and very interested in this bit at the end.. “BTW, my 12-bit framebuffer
>> display support has been accepted and included in
>> mplayer svn revision 31139 on May 6th. Using it, I can enjoy a prescaled
>> 422x316 5fps MSMPEG-4 encoded live video stream playing fluently in
>> fullscreen mode on my E3 display.”
>>
>> Leave a reply in there and tell us what happened to E3 Linux 2.6.34..
>>
>> Spanner..
>>
>> http://amstrad-e3-hacking.freeforums.net
>> 
>>
>> *From:* Nick Griffin 
>> *Sent:* ‎Saturday‎, ‎20‎ ‎April‎ ‎2019 ‎22‎:‎25
>> *To:* Discussion of the Amstrad E3 emailer hardware/software
>> 
>>
>> OK sorted it out now, (thanks to Ollie), will I be able to use these
>> files to put the Amstrad firmware back on the E3 at all..?
>>
>> question is here too
>> http://amstrad-e3-hacking.freeforums.net/thread/9/config-content-filesystem?page=1=92
>> 

Re: [E3-hacking] Config / content filesystem

2019-04-21 Thread Nick Griffin
What the ams-delta mini distribution ..?
Which one do I download… https://www.imagemagick.org/script/download.php and 
how do I install it on the E3..?

Spanner..

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

From: David Given
Sent: ‎Sunday‎, ‎21‎ ‎April‎ ‎2019 ‎19‎:‎41
To: Discussion of the Amstrad E3 emailer 
hardware/software

If you just want to put images onto the screen, write a tiny script that copies 
files from the USB stick and cats them to /dev/fb0. Converting images to the 
right format's a little bit harder but I wouldn't be surprised if ImageMagick 
could do it out of the box. That'll run happily in the ams-delta mini 
distribution.

Alternatively, you can boot an old Debian from a USB stick using that kernel 
--- although you'll need to hunt around to find a userland old enough; I think 
Debian woody works. That'll give you a (very slow) development system running 
on the E3 itself. Then you can write your own SDL programs to draw whatever you 
like, although I should warn you against extended typing on that keyboard 
unless you hate your fingers.

On Sun, 21 Apr 2019 at 12:40, Nick Griffin 
mailto:span1...@live.com>> wrote:
I do wish I never flashed E3 Linux on it now,theres no point to it,you can’t 
put anything on it or run anything on it cos its too old and E3 Linux didn’t go 
anywhere, its just a command line version because the E3 is not powerful to run 
proper Linux. I installed E3 Linux release v2 (E3 Linux sound better that just 
Linux or release v2 this way you know what I am taking about)from 
the.earth.li/pub/e3/
  what are the rest of the stuff in there, can I update it to 2.6.19,its at 
2.6.16 that what release v2 is…?

I would like to put a program on it so it shows images on it screen you have to 
make it on it and it don’t even have make on it to make a program so make need 
to be installed first.
If I can’t put the original firmware back or put a program on it so it shows a 
animated gif then it useless and I will end up putting it in the bin. I have 
about 8 gifs of its old adverts and want to show them on the E3s screen, can 
anyone help me please. I am not used to installing programs from source code, I 
am use to installing it from a repository.

Oh and what happen to this…  
http://amstrad-e3-hacking.freeforums.net/thread/7/support-status-update
  why did the work on E3 Linux stop and only get to 2.6.19…?

and very interested in this bit at the end.. “BTW, my 12-bit framebuffer 
display support has been accepted and included in
mplayer svn revision 31139 on May 6th. Using it, I can enjoy a prescaled
422x316 5fps MSMPEG-4 encoded live video stream playing fluently in
fullscreen mode on my E3 display.”

Leave a reply in there and tell us what happened to E3 Linux 2.6.34..

Spanner..

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

From: Nick Griffin
Sent: ‎Saturday‎, ‎20‎ ‎April‎ ‎2019 ‎22‎:‎25
To: Discussion of the Amstrad E3 emailer 
hardware/software

OK sorted it out now, (thanks to Ollie), will I be able to use these files to 
put the Amstrad firmware back on the E3 at all..?

question is here too 
http://amstrad-e3-hacking.freeforums.net/thread/9/config-content-filesystem?page=1=92

You don’t need to register to reply or leave a new thread there now.

Spanner..

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

From: Ralph Corderoy
Sent: ‎Saturday‎, ‎20‎ ‎April‎ ‎2019 ‎18‎:‎39
To: Discussion of the Amstrad E3 emailer 
hardware/software

Hi Nick,

> sudo nand-oob-strip.py e3-nand-backup.0 

Re: [E3-hacking] Config / content filesystem

2019-04-21 Thread David Given
If you just want to put images onto the screen, write a tiny script that
copies files from the USB stick and cats them to /dev/fb0. Converting
images to the right format's a little bit harder but I wouldn't be
surprised if ImageMagick could do it out of the box. That'll run happily in
the ams-delta mini distribution.

Alternatively, you can boot an old Debian from a USB stick using that
kernel --- although you'll need to hunt around to find a userland old
enough; I think Debian woody works. That'll give you a (very slow)
development system running on the E3 itself. Then you can write your own
SDL programs to draw whatever you like, although I should warn you against
extended typing on that keyboard unless you hate your fingers.

On Sun, 21 Apr 2019 at 12:40, Nick Griffin  wrote:

> I do wish I never flashed E3 Linux on it now,theres no point to it,you
> can’t put anything on it or run anything on it cos its too old and E3 Linux
> didn’t go anywhere, its just a command line version because the E3 is not
> powerful to run proper Linux. I installed E3 Linux release v2 (E3 Linux
> sound better that just Linux or release v2 this way you know what I am
> taking about)from the.earth.li/pub/e3/  what are the rest of the stuff in
> there, can I update it to 2.6.19,its at 2.6.16 that what release v2 is…?
>
> I would like to put a program on it so it shows images on it screen you
> have to make it on it and it don’t even have make on it to make a program
> so make need to be installed first.
> If I can’t put the original firmware back or put a program on it so it
> shows a animated gif then it useless and I will end up putting it in the
> bin. I have about 8 gifs of its old adverts and want to show them on the
> E3s screen, can anyone help me please. I am not used to installing programs
> from source code, I am use to installing it from a repository.
>
> Oh and what happen to this…
> http://amstrad-e3-hacking.freeforums.net/thread/7/support-status-update
> why did the work on E3 Linux stop and only get to 2.6.19…?
>
> and very interested in this bit at the end.. “BTW, my 12-bit framebuffer
> display support has been accepted and included in
> mplayer svn revision 31139 on May 6th. Using it, I can enjoy a prescaled
> 422x316 5fps MSMPEG-4 encoded live video stream playing fluently in
> fullscreen mode on my E3 display.”
>
> Leave a reply in there and tell us what happened to E3 Linux 2.6.34..
>
> Spanner..
>
> http://amstrad-e3-hacking.freeforums.net
>
> *From:* Nick Griffin 
> *Sent:* ‎Saturday‎, ‎20‎ ‎April‎ ‎2019 ‎22‎:‎25
> *To:* Discussion of the Amstrad E3 emailer hardware/software
> 
>
> OK sorted it out now, (thanks to Ollie), will I be able to use these
> files to put the Amstrad firmware back on the E3 at all..?
>
> question is here too
> http://amstrad-e3-hacking.freeforums.net/thread/9/config-content-filesystem?page=1=92
> 
>
> You don’t need to register to reply or leave a new thread there now.
>
> Spanner..
>
> http://amstrad-e3-hacking.freeforums.net
>
> *From:* Ralph Corderoy 
> *Sent:* ‎Saturday‎, ‎20‎ ‎April‎ ‎2019 ‎18‎:‎39
> *To:* Discussion of the Amstrad E3 emailer hardware/software
> 
>
> Hi Nick,
>
> > sudo nand-oob-strip.py e3-nand-backup.0 e3-nand.0: No such file or
> > directory
>
> Two things.  You probably don't need sudo as your ordinary user should
> be able to read e3-nand-backup.0 and write e3-nand.0.  You have to
> specify a path to the nand-oob-strip.py script for the shell to find it.
> Since it's in the current directory, that's just `.', i.e.
>
> ./nand-oob-strip.py in.0 out.0
>
> If that complains, then it's because ./nand-oob-strip.py lacks the
> `execute' permission for you.  Either add it with chmod(1), or run the
> Python interpreter directly:
>
> python3 nand-oob-strip.py in.0 out.0
>
> Alternatively, to modify the file in place, so ensure they're not your
> only copies, you can do
>
> LC_ALL=C perl -i -0777pe 's/(.{512})(.{16})/$1/gs' \
> e3-nand-backup.{0..5}
>
> which substitutes every 512 bytes followed by 16 bytes with just the
> 512.
>
> --
> Cheers, Ralph.
>
> ___
> e3-hacking mailing list
> e3-hacking@earth.li
>
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earth.li%2Fmailman%2Flistinfo%2Fe3-hackingdata=02%7C01%7C%7C0c848394242c4830fc6e08d6c5b72a85%7C84df9e7fe9f640afb435%7C1%7C0%7C636913787811205410sdata=0kD8t8q7zfl%2FGDLfdCSjfHE%2B1A2ZbQ8DuiwML03509A%3Dreserved=0
> ___
> e3-hacking mailing list
> e3-hacking@earth.li
> https://www.earth.li/mailman/listinfo/e3-hacking
>


-- 
┌─── http://www.cowlark.com ───
│ "I have 

Re: [E3-hacking] Config / content filesystem

2019-04-21 Thread Nick Griffin
I do wish I never flashed E3 Linux on it now,theres no point to it,you can’t 
put anything on it or run anything on it cos its too old and E3 Linux didn’t go 
anywhere, its just a command line version because the E3 is not powerful to run 
proper Linux. I installed E3 Linux release v2 (E3 Linux sound better that just 
Linux or release v2 this way you know what I am taking about)from 
the.earth.li/pub/e3/  what are the rest of the 
stuff in there, can I update it to 2.6.19,its at 2.6.16 that what release v2 
is…?

I would like to put a program on it so it shows images on it screen you have to 
make it on it and it don’t even have make on it to make a program so make need 
to be installed first.
If I can’t put the original firmware back or put a program on it so it shows a 
animated gif then it useless and I will end up putting it in the bin. I have 
about 8 gifs of its old adverts and want to show them on the E3s screen, can 
anyone help me please. I am not used to installing programs from source code, I 
am use to installing it from a repository.

Oh and what happen to this…  
http://amstrad-e3-hacking.freeforums.net/thread/7/support-status-update  why 
did the work on E3 Linux stop and only get to 2.6.19…?

and very interested in this bit at the end.. “BTW, my 12-bit framebuffer 
display support has been accepted and included in
mplayer svn revision 31139 on May 6th. Using it, I can enjoy a prescaled
422x316 5fps MSMPEG-4 encoded live video stream playing fluently in
fullscreen mode on my E3 display.”

Leave a reply in there and tell us what happened to E3 Linux 2.6.34..

Spanner..

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

From: Nick Griffin
Sent: ‎Saturday‎, ‎20‎ ‎April‎ ‎2019 ‎22‎:‎25
To: Discussion of the Amstrad E3 emailer 
hardware/software

OK sorted it out now, (thanks to Ollie), will I be able to use these files to 
put the Amstrad firmware back on the E3 at all..?

question is here too 
http://amstrad-e3-hacking.freeforums.net/thread/9/config-content-filesystem?page=1=92

You don’t need to register to reply or leave a new thread there now.

Spanner..

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

From: Ralph Corderoy
Sent: ‎Saturday‎, ‎20‎ ‎April‎ ‎2019 ‎18‎:‎39
To: Discussion of the Amstrad E3 emailer 
hardware/software

Hi Nick,

> sudo nand-oob-strip.py e3-nand-backup.0 e3-nand.0: No such file or
> directory

Two things.  You probably don't need sudo as your ordinary user should
be able to read e3-nand-backup.0 and write e3-nand.0.  You have to
specify a path to the nand-oob-strip.py script for the shell to find it.
Since it's in the current directory, that's just `.', i.e.

./nand-oob-strip.py in.0 out.0

If that complains, then it's because ./nand-oob-strip.py lacks the
`execute' permission for you.  Either add it with chmod(1), or run the
Python interpreter directly:

python3 nand-oob-strip.py in.0 out.0

Alternatively, to modify the file in place, so ensure they're not your
only copies, you can do

LC_ALL=C perl -i -0777pe 's/(.{512})(.{16})/$1/gs' \
e3-nand-backup.{0..5}

which substitutes every 512 bytes followed by 16 bytes with just the
512.

--
Cheers, Ralph.

___
e3-hacking mailing list
e3-hacking@earth.li
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earth.li%2Fmailman%2Flistinfo%2Fe3-hackingdata=02%7C01%7C%7C0c848394242c4830fc6e08d6c5b72a85%7C84df9e7fe9f640afb435%7C1%7C0%7C636913787811205410sdata=0kD8t8q7zfl%2FGDLfdCSjfHE%2B1A2ZbQ8DuiwML03509A%3Dreserved=0
___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-20 Thread Nick Griffin
OK sorted it out now, (thanks to Ollie), will I be able to use these files to 
put the Amstrad firmware back on the E3 at all..?

question is here too 
http://amstrad-e3-hacking.freeforums.net/thread/9/config-content-filesystem?page=1=92

You don’t need to register to reply or leave a new thread there now.

Spanner..

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

From: Ralph Corderoy
Sent: ‎Saturday‎, ‎20‎ ‎April‎ ‎2019 ‎18‎:‎39
To: Discussion of the Amstrad E3 emailer 
hardware/software

Hi Nick,

> sudo nand-oob-strip.py e3-nand-backup.0 e3-nand.0: No such file or
> directory

Two things.  You probably don't need sudo as your ordinary user should
be able to read e3-nand-backup.0 and write e3-nand.0.  You have to
specify a path to the nand-oob-strip.py script for the shell to find it.
Since it's in the current directory, that's just `.', i.e.

./nand-oob-strip.py in.0 out.0

If that complains, then it's because ./nand-oob-strip.py lacks the
`execute' permission for you.  Either add it with chmod(1), or run the
Python interpreter directly:

python3 nand-oob-strip.py in.0 out.0

Alternatively, to modify the file in place, so ensure they're not your
only copies, you can do

LC_ALL=C perl -i -0777pe 's/(.{512})(.{16})/$1/gs' \
e3-nand-backup.{0..5}

which substitutes every 512 bytes followed by 16 bytes with just the
512.

--
Cheers, Ralph.

___
e3-hacking mailing list
e3-hacking@earth.li
https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earth.li%2Fmailman%2Flistinfo%2Fe3-hackingdata=02%7C01%7C%7C0c848394242c4830fc6e08d6c5b72a85%7C84df9e7fe9f640afb435%7C1%7C0%7C636913787811205410sdata=0kD8t8q7zfl%2FGDLfdCSjfHE%2B1A2ZbQ8DuiwML03509A%3Dreserved=0
___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-20 Thread Ralph Corderoy
Hi Nick,

> sudo nand-oob-strip.py e3-nand-backup.0 e3-nand.0: No such file or
> directory

Two things.  You probably don't need sudo as your ordinary user should
be able to read e3-nand-backup.0 and write e3-nand.0.  You have to
specify a path to the nand-oob-strip.py script for the shell to find it.
Since it's in the current directory, that's just `.', i.e.

./nand-oob-strip.py in.0 out.0

If that complains, then it's because ./nand-oob-strip.py lacks the
`execute' permission for you.  Either add it with chmod(1), or run the
Python interpreter directly:

python3 nand-oob-strip.py in.0 out.0

Alternatively, to modify the file in place, so ensure they're not your
only copies, you can do

LC_ALL=C perl -i -0777pe 's/(.{512})(.{16})/$1/gs' \
e3-nand-backup.{0..5}

which substitutes every 512 bytes followed by 16 bytes with just the
512.

-- 
Cheers, Ralph.

___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-18 Thread Nick Griffin
live@commodoreos /media/live/E3
READY.
sudo nand-oob-strip.py e3-nand-backup.0 e3-nand.0: No such file or directory


Spanner..

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

From: Jonathan McDowell
Sent: ‎Thursday‎, ‎18‎ ‎April‎ ‎2019 ‎21‎:‎09
To: Discussion of the Amstrad E3 emailer 
hardware/software

Yes, you run it on a proper Linux box, not the E3. The script isn't
going to magically fix anything, but it'll turn the dumps that include
OOB information into dumps without OOB information that might help you
do some sleuthing about their contents.

On Thu, Apr 18, 2019 at 12:52:37PM +, Nick Griffin wrote:
> Where do I put attached Python script, in my Linux not in the E3..?
>
> So I do each file with it..?
>
> Spanner..
>
> From: Jonathan McDowell
> Sent: ‎Thursday‎, ‎18‎ ‎April‎ ‎2019 ‎11‎:‎58
> To: Discussion of the Amstrad E3 emailer 
> hardware/software
>
> On Wed, Apr 17, 2019 at 01:26:40PM +, Nick Griffin wrote:
>
> > Do you remember if you were able to mount the Cramfs and look at its
> > filesystem..?  What's Q;Q; blocks in flash, another files system…?
> > Can’t find any info on it, were you able to mount that too. So does it
> > have 2 partitions on mtd4 then..?
>
> You need to remember the E3 dates from a time when embedded Linux
> systems were a lot simpler, and the E3 was designed to be a low cost
> platform (even allowing for the subsidy). It doesn't have the sort of
> NAND setup seen on modern systems; it simply didn't have the resources.
>
> So, the MTD partitions do not directly map to a kernel or a Linux
> filesystem. The "Q;Q;" blocks are an Amstrad specific way of putting
> data into those partitions, with a type + description associated with
> each one. For example the kernel lives in a Q;Q; block in mtd3 called
> "LINUX". mtd3 also has Q;Q; blocks for LDR (the second stage boot
> loader), and PARMS (the kernel boot parameters).
>
> The CRAMFS filesystem is in mtd4; Q;Q; block name "LNXFSYS". There are 2
> of them (I imagine to allow for an active + fallback). There are various
> other bits of content in mtd4 too - you can see them by doing:
>
>  hexdump -C e3-nand-backup.4 | grep -A 1 "Q;Q;"
>
> Finally the nanddump files have 16 bytes of out of band (OOB) data per
> 512 byte block, so if you want something that might be writable back to
> the flash you need to strip those out. The attached Python should do the
> trick:
>
>  nand-oob-strip e3-nand-backup.0 e3-nand.0
>
> will dump out e3-nand.0 with the OOB data stripped.

J.

--
I'm dangerous when I know what I'm doing.

___
e3-hacking mailing list
e3-hacking@earth.li
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.earth.li%2Fmailman%2Flistinfo%2Fe3-hackingdata=02%7C01%7C%7Cec5f9e059ac04cfb6dfa08d6c439c19c%7C84df9e7fe9f640afb435%7C1%7C0%7C636912149665586653sdata=DdEDodAV1hnS9KjUDy6bAmwvHU5phkgshzFfYCk9r8Y%3Dreserved=0
___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-18 Thread Jonathan McDowell
Yes, you run it on a proper Linux box, not the E3. The script isn't
going to magically fix anything, but it'll turn the dumps that include
OOB information into dumps without OOB information that might help you
do some sleuthing about their contents.

On Thu, Apr 18, 2019 at 12:52:37PM +, Nick Griffin wrote:
> Where do I put attached Python script, in my Linux not in the E3..?
> 
> So I do each file with it..?
> 
> Spanner..
> 
> From: Jonathan McDowell
> Sent: ‎Thursday‎, ‎18‎ ‎April‎ ‎2019 ‎11‎:‎58
> To: Discussion of the Amstrad E3 emailer 
> hardware/software
> 
> On Wed, Apr 17, 2019 at 01:26:40PM +, Nick Griffin wrote:
> 
> > Do you remember if you were able to mount the Cramfs and look at its
> > filesystem..?  What's Q;Q; blocks in flash, another files system…?
> > Can’t find any info on it, were you able to mount that too. So does it
> > have 2 partitions on mtd4 then..?
> 
> You need to remember the E3 dates from a time when embedded Linux
> systems were a lot simpler, and the E3 was designed to be a low cost
> platform (even allowing for the subsidy). It doesn't have the sort of
> NAND setup seen on modern systems; it simply didn't have the resources.
> 
> So, the MTD partitions do not directly map to a kernel or a Linux
> filesystem. The "Q;Q;" blocks are an Amstrad specific way of putting
> data into those partitions, with a type + description associated with
> each one. For example the kernel lives in a Q;Q; block in mtd3 called
> "LINUX". mtd3 also has Q;Q; blocks for LDR (the second stage boot
> loader), and PARMS (the kernel boot parameters).
> 
> The CRAMFS filesystem is in mtd4; Q;Q; block name "LNXFSYS". There are 2
> of them (I imagine to allow for an active + fallback). There are various
> other bits of content in mtd4 too - you can see them by doing:
> 
>  hexdump -C e3-nand-backup.4 | grep -A 1 "Q;Q;"
> 
> Finally the nanddump files have 16 bytes of out of band (OOB) data per
> 512 byte block, so if you want something that might be writable back to
> the flash you need to strip those out. The attached Python should do the
> trick:
> 
>  nand-oob-strip e3-nand-backup.0 e3-nand.0
> 
> will dump out e3-nand.0 with the OOB data stripped.

J.

-- 
I'm dangerous when I know what I'm doing.

___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-18 Thread Nick Griffin
Where do I put attached Python script, in my Linux not in the E3..?

So I do each file with it..?

Spanner..

From: Jonathan McDowell
Sent: ‎Thursday‎, ‎18‎ ‎April‎ ‎2019 ‎11‎:‎58
To: Discussion of the Amstrad E3 emailer 
hardware/software

On Wed, Apr 17, 2019 at 01:26:40PM +, Nick Griffin wrote:

> Do you remember if you were able to mount the Cramfs and look at its
> filesystem..?  What's Q;Q; blocks in flash, another files system…?
> Can’t find any info on it, were you able to mount that too. So does it
> have 2 partitions on mtd4 then..?

You need to remember the E3 dates from a time when embedded Linux
systems were a lot simpler, and the E3 was designed to be a low cost
platform (even allowing for the subsidy). It doesn't have the sort of
NAND setup seen on modern systems; it simply didn't have the resources.

So, the MTD partitions do not directly map to a kernel or a Linux
filesystem. The "Q;Q;" blocks are an Amstrad specific way of putting
data into those partitions, with a type + description associated with
each one. For example the kernel lives in a Q;Q; block in mtd3 called
"LINUX". mtd3 also has Q;Q; blocks for LDR (the second stage boot
loader), and PARMS (the kernel boot parameters).

The CRAMFS filesystem is in mtd4; Q;Q; block name "LNXFSYS". There are 2
of them (I imagine to allow for an active + fallback). There are various
other bits of content in mtd4 too - you can see them by doing:

 hexdump -C e3-nand-backup.4 | grep -A 1 "Q;Q;"

Finally the nanddump files have 16 bytes of out of band (OOB) data per
512 byte block, so if you want something that might be writable back to
the flash you need to strip those out. The attached Python should do the
trick:

 nand-oob-strip e3-nand-backup.0 e3-nand.0

will dump out e3-nand.0 with the OOB data stripped.

J.

--
One-seventh of your life is|  .''`.  Debian GNU/Linux Developer
 spent on Monday.  | : :' :  Happy to accept PGP signed
   | `. `'   or encrypted mail - RSA
   |   `-key on the keyservers.
___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking


Re: [E3-hacking] Config / content filesystem

2019-04-18 Thread Jonathan McDowell
On Wed, Apr 17, 2019 at 01:26:40PM +, Nick Griffin wrote:

> Do you remember if you were able to mount the Cramfs and look at its
> filesystem..?  What's Q;Q; blocks in flash, another files system…?
> Can’t find any info on it, were you able to mount that too. So does it
> have 2 partitions on mtd4 then..?

You need to remember the E3 dates from a time when embedded Linux
systems were a lot simpler, and the E3 was designed to be a low cost
platform (even allowing for the subsidy). It doesn't have the sort of
NAND setup seen on modern systems; it simply didn't have the resources.

So, the MTD partitions do not directly map to a kernel or a Linux
filesystem. The "Q;Q;" blocks are an Amstrad specific way of putting
data into those partitions, with a type + description associated with
each one. For example the kernel lives in a Q;Q; block in mtd3 called
"LINUX". mtd3 also has Q;Q; blocks for LDR (the second stage boot
loader), and PARMS (the kernel boot parameters).

The CRAMFS filesystem is in mtd4; Q;Q; block name "LNXFSYS". There are 2
of them (I imagine to allow for an active + fallback). There are various
other bits of content in mtd4 too - you can see them by doing:

 hexdump -C e3-nand-backup.4 | grep -A 1 "Q;Q;"

Finally the nanddump files have 16 bytes of out of band (OOB) data per
512 byte block, so if you want something that might be writable back to
the flash you need to strip those out. The attached Python should do the
trick:

 nand-oob-strip e3-nand-backup.0 e3-nand.0

will dump out e3-nand.0 with the OOB data stripped.

J.

-- 
One-seventh of your life is|  .''`.  Debian GNU/Linux Developer
 spent on Monday.  | : :' :  Happy to accept PGP signed
   | `. `'   or encrypted mail - RSA
   |   `-key on the keyservers.
#!/usr/bin/python3

import sys

if len(sys.argv) < 3:
print("Must provide filename to dump + file to write.")
sys.exit(-1)

with open(sys.argv[1], mode="rb") as infile:
with open(sys.argv[2], mode="wb") as outfile:
data = infile.read()
ofs = 0
while ofs < len(data):
outfile.write(data[ofs:ofs + 512])
ofs += (512 + 16)
___
e3-hacking mailing list
e3-hacking@earth.li
https://www.earth.li/mailman/listinfo/e3-hacking