Ok, I google a bit and seems I found what this means.PeterB Wrote:echo 8 - lol ... I understand your point of view ... but the engineer in me wants to understand, and find out whether there's anything useful that can be achieved.
In eMMC partitioning note from Micron there is on page 13 Partitions Configuration Register:
- Code: Select All Code
1. Bit[7]: Reserved
2. Bit[6]: BOOT_ACK
– 0x0: No boot acknowledge is sent (default).
– 0x1: Boot acknowledge is sent during the boot operation.
3. Bit[5:3]: BOOT_PARTITION_ENABLE
The user selects the boot data that will be sent to the master.
– 0x0: Device is not boot-enabled (default).
– 0x1: Boot partition 1 is enabled for boot.
– 0x2: Boot partition 2 is enabled for boot.
– 0x3 to 0x6: Reserved
– 0x7: User area is enabled for boot.
4. Bit[2:0]: PARTITION_ACCESS (before BOOT_PARTITION_ACCESS)
The user selects the partition to access.
– 0x0: Access to user data area
– 0x1: R/W boot partition 1
– 0x2: R/W boot partition 2
– 0x3: R/W replay-protected memory block (RPMB)
– 0x4: Access to general-purpose partition 1
– 0x5: Access to general-purpose partition 2
– 0x6: Access to general-purpose partition 3
– 0x7: Access to general-purpose partition 4
As you can see writing 8 to it means Boot partition 1 is enabled for boot. And we wrote u-boot to boot partition 1. We could write 9 to it and leave boot partition 1 writable.
Some more info here.
- Code: Select All Code
# enable R/W boot partition 1
echo 0 > /sys/block/mmcblk0boot0/force_ro
# write u-boot to boot partition 1
dd if=u-boot-matrix.imx of=/dev/mmcblk0boot0 bs=1024 seek=1
# enable R only boot partition 1
echo 1 > /sys/block/mmcblk0boot0/force_ro
# enable boot partition 1 is for boot
echo 8 > /sys/devices/platform/sdhci-esdhc-imx3/mmc_host/mmc0/mmc0:0001/boot_config