Partition table format of Phicomm N1

Found at offset 0x2400000 of /dev/mmcblk1:

Looks like it’s using format below:

Found some code about this: Structure definition of partitions (and mask?), The partition table structure.

I also found (presumbly) a BUG in checksum calculation: The checksum is actually calculated as (uint32)(checksum-of-first-partition * number-of-partitions), any partition other than the first one is not taken into consideration. And as such, a simple equation for calculating the checksum would be (uint32)(0xD9115133 * number_of_partitions).

I tried to move partition logo to somewhere more near to the beginning of the eMMC, but seems not work, not sure if the offset is also saved elsewhere.

The partition table itself is in reserved. Some code whose purpose is unclear is also in it.

The bootloader code starts from the second sector (512 byte) of /dev/mmcblk1. Which means the first sector is not used. And thus it’s possible to partition /dev/mmcblk1 as MBR, as MBR only uses the first sector to store metadata. As long as the first partition starts after thoes special partitions (bootloader, reserved, but nothing else), the system still boots.

Leave a Reply

Your email address will not be published.