On 10/17/07, Sébastien Lorquet <squalyl_at_gmail.com> wrote:
> I think that d2s does not cares about SD card format. It just writes a
> header and dump data from flash to SD card's sectors.
> So you don't have to format anything, or create any partition on your card!
> just dd the original saved data on the card, it does not follow any
> partition/FS format. you have to dd it to /dev/sdb, not /dev/sdb1 we're ok?
>
> I found somewhere on hh.org hx-4700 wiki that a saved wince4.2 image was
> around ~130 MB, so even if you transfer the first 256 MBs from your 1GB card
> to a new 256MB card, it will work without problem.
Exactly, the hx4700 flash is 128MB and d2s called without parameters
copies everything except the first 256k (HTC bootloader) onto the SD
(plus a small header of 412 bytes and 4 bytes footer IIRC). So 130MB
is just an approximate value > 412+133955584+4 bytes.
The header format can be seen in the script at
http://www.linuxtogo.org/~ph5/hx4700/wince.
It starts with:
16 bytes "ROADSTER ", then
16 bytes "0000000000000000",
16 bytes "1.01 ",
then 336 bytes with (to me) unknown purpose, mostly 0x00, except for
two words in my d2s images, then
4 bytes "HTCS",
8 bytes "A0040000", <-- this is the start adress (256k bytes into
flash memory, after the bootloader)
8 bytes "07FC0000", <-- this is the size of the data to be copied,
133955584 bytes)
8 bytes "4CF096E8", <-- this is most likely incorrect, should be the
crc32 checksum of the following data.
Then the actual image contents (133955584 bytes) follow, and then the footer,
4 bytes "HTCE".
I'm not sure, but it might be that in the unknown data in the header
the CID of the mmc/sd card is encoded, so maybe the image is only
recognized if you use the same card for backup and restore. Did
anybody successfully backup to one card and restore from another?
cheers
Philipp
Received on Wed Oct 17 2007 - 11:18:38 EDT
This archive was generated by hypermail 2.2.0 : Wed Oct 17 2007 - 11:18:54 EDT