Diskonchip

来自WordPress中文文档
跳转至: 导航搜索

The DiskOnChip (see this ) Is a chip by m-systems. The driver software is called TrueFFS. It is a flashchip with 'translation' software which makes it pretend to behave pretty much like an sd-card.



In the Himalaya, and HTC_Blueangel, the DiskOnChip contains the bootsplash, extended rom, and storage. on the HTC_Typhoon, the DiskOnChip contains also the OS image, and radio software, and some bootstrap code, which loads the various parts in memory.

the HTC_Magician does not contain a DiskOnChip; all its data resides in one 64M intel flash chip.


the Extended_ROM partition is usually hidden, but can be made visible by deleting this registry key:

HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\TRUEFFS_DOC]
"MountFlags"=dword:00000001

on most phones this partition is writeprotected, you can unprotect it using this tool. it sends a

DeviceIoControl(hDsk1, FL_IOCTL_BDTL_HW_PROTECTION, {0, password, PROTECTION_INSERT_KEY})
followed by a
DeviceIoControl(hDsk1, FL_IOCTL_BDTL_HW_PROTECTION, {PROTECTABLE, password, PROTECTION_CHANGE_TYPE})

where PROTECTION_CHANGE_TYPE= 6 PROTECTION_INSERT_KEY= 0 FL_IOCTL_BDTL_HW_PROTECTION= 3011

  • the extended rompassword for the HTC_Blueangel is eGnAeUlB
  • the extended rompassword for the Himalaya is aYaLaMiH
  • the extended rompassword for the HTC_Alpine is = eNiPlA (that starts with 2 spaces)
  • the extended rompassword for the HTC_Universal is =SiRevInu=


in XdaUtils there is a tool pdocread to read the contents of DiskOnChip devices.





The DiskOnChip Millennium Plus is just a normal NAND flash chip, with a little ASIC which does error correction in hardware. It is supported by Linux. The Millennium Plus comes in three models -- there is a 16MiB version which is properly supported by the current Linux drivers, a 32MiB version which uses 16-bit flash access and is needs some extra work, then the 64MiB version which is effectively just two of the 32MiB chips stuck together.

The 'extra work' which needs to be done for the 32MiB device (and hence also for the 64MiB device) is related to using 16-bit access and 'interleaving' the contents of the flash. It's actually implemented in Linux too, but in the deprecated 'doc2001plus' driver. It should be relatively simple for someone who cares to make the new 'drivers/mtd/nand/diskonchip.c' driver work for the 32MiB and 64MiB models.

Linux also has an implementation of 'INFTL', which is the technical name of the translation layer which M-Systems call '~TrueFFS' on the DiskOnChip Millennium Plus. It hasn't received a huge amount of testing, but ought to work well enough that the 'disk' partitions can be accessed correctly.

It should also be possible to use JFFS2 on the DiskOnChip.