Skip to contentSkip to conversation

mmc-utils boot enable conflict with mmc_blk_part_switch

DISCUSSION Matthieu CASTET 1 participant 1 message Aug 14, 2014 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hi,

Boot enable setting is enable with writting PARTITION_CONFIG ext csd. But the kernel also write it in mmc_blk_part_switch.

This lead to weird result :

~ # mmc_utils extcsd read /dev/mmcblk0 | grep PARTITION_CONFIG Boot configuration bytes [PARTITION_CONFIG: 0x00]
## no boot partition enabled
~ # mmc_utils boot enable 1 1 /dev/mmcblk0
~ # mmc_utils extcsd read /dev/mmcblk0 | grep PARTITION_CONFIG Boot configuration bytes [PARTITION_CONFIG: 0x48]
## boot partition enabled
~ # dd if=/dev/mmcblk0boot0 of=/dev/null count=1
1+0 records in
1+0 records out
~ # mmc_utils extcsd read /dev/mmcblk0 | grep PARTITION_CONFIG Boot configuration bytes [PARTITION_CONFIG: 0x01]
## kernel erased your boot partition config.

This is because the kernel have a cache of ext_csd in card->ext_csd and is not aware of modification done by the mmc_utils.

Matthieu