Nope, manual flushing mmcblk0 didn’t help either.
But I managed to solve the problem;
The problem was in fact that I somehow switched boot partition on eMMC.
If I understand correctly, it is possible to tell eMMC which partition to use as “boot” - either one of boot partitions (/dev/mmcblk0boot0|1), or so called user area (/dev/mmcblk0).
On Dragonboard we seem not to use boot partitions as boot images take much more space than boot partitions (4MiB each)
With eMMC command it is possible to re-configure that (command is called PARTITION_CONFIG).
To switch my board to “working state” I had to enable CONFIG_SUPPORT_EMMC_BOOT in u-boot and then reconfigure partitions:
=> mmc partconf 0 0 7 0
Param explanation:
0 - device, SDC1
0 - boot_ack - disable boot acknowledge (default)
7 - boot_partition_enable - user area enabled for boot (not default - default is “device not boot enabled”)
0 - partition_access - no access to boot partition (default)
Probably it’s possible to do the same using Linux.
Just a reminder - boot0/boot1 have nothing to do with eMMC Linux partitions (i.e. ‘aboot’, ‘boot’, etc.) - they are handled by hardware.