On 03/12/2022 00:45, Kim Steiner wrote:
Hi Dmitry,
Just letting you know that I tried flashing your boot.img with:
'fastboot flash boot boot.img' and I see the same kernel panic
message that I was seeing when I built with a pagesize=2048.
[190] sys r13 0x00000000 r14 0x00000000 [200] panic (caller 0x91637134): ASSERT FAILED at (platform/msm_shared/mmc_wrapper.c:190): !(data_len % block_size) [210] HALT: reboot into dload mo Format: Log Type - Time(microsec) - Message - Optional Info Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic S - QC_IMAGE_VERSION_STRING=BOOT.XF.1.0-00301
Are you able to flash the image and reboot?
Unfortunately I was not able to reproduce the 2048 vs 4096 issue here. I tested several images including the one I provided you, they all use pagesize 2048 and all of them work flawlessly. It might be that there are differences between the board revisions. Could you please check, what revision is printed on the board?
My recollection is that we need to use 4096. It was a bug in the 820 firmware (ABL) where a specific 4K alignment was required. So 2048 might work depending on the data size. but it does not guarantee the 4K alignment/assert in the code which has:
uint32_t mmc_read(uint64_t data_addr, uint32_t *out, uint32_t data_len) { uint32_t ret = 0; uint32_t block_size; uint32_t read_size = SDHCI_ADMA_MAX_TRANS_SZ; void *dev; uint8_t *sptr = (uint8_t *)out;
dev = target_mmc_device(); block_size = mmc_get_device_blocksize(); ASSERT(!(data_addr % block_size)); ASSERT(!(data_len % block_size));
We've always recommended to use 4096, as far as I remember (block_size if 4K on UFS). 820 was the first platform with UFS, so I think the only platform with this problem.