The eMMC has what's called "hardware partitions" or regions that the full flash memory pool is divided into by the memory controller.
These regions operate at a lower level than the usual logical/software partitions we're used to, like the ones that might be listed in a GUID partition table. So when you read from something like /dev/mmcblk0
, you're already being limited to the user region, and won't see the preloader.
What other regions are there? New specs mandate different regions, but on my device there are four: user, rpmb, boot1, and boot2.
The preloader is in boot1 and/or boot2 region. Your system may have it as /dev/mmcblk0boot0
and /dev/mmcblk0boot1
.
My boot1 looks like:
│00000000 43 4F 4D 42 4F 5F 42 4F 4F 54 00 00 01 00 00 00 │◆│COMBO_BOOT......│
│00000010 00 10 00 00 FF FF FF FF FF FF FF FF FF FF FF FF │▒│................│
Mediatek headers start at 0x1000:
│00001000 4D 4D 4D 01 38 00 00 00 46 49 4C 45 5F 49 4E 46 │▒│MMM.8...FILE_INF│
│00001010 4F 00 00 00 01 00 00 00 01 00 0C 05 10 0F 20 00 │▒│O............. .│
And the actual preloader code is just below:
│000010F0 00 00 00 00 05 00 00 EA 80 21 10 00 88 DF 10 00 │▒│.........!......│
│00001100 00 00 27 00 A8 65 27 00 00 00 20 00 F0 1D 25 00 │▒│..'..e'... ...%.│
│00001110 C4 61 9F E5 00 40 86 E5 00 00 A0 E3 00 10 A0 E3 │▒│.a...@..........│
│00001120 00 20 A0 E3 00 30 A0 E3 00 40 A0 E3 00 50 A0 E3 │▒│. [email protected]..│
The boot ROM ("brom") is separate from the preloader and does not exist in writeable flash, but in read-only memory. Its main job is to read the boot0 region from eMMC to RAM, authorize it, and transfer control to it.