Hi,
I’m currently trying the new Yocto Rocko feature using an additional SD card image. I was able to adapt the my machine conf and the WKS file according to my needs. Our board is almost compatible with Variscite SD410.
Using LK from ‘firmware-qcom-dragonboard410c-bootloader-sdcard’ works well. However, I have various extensions/changes in my custom LK build for eMMC. And I need them also when booting from SD card.
Using my custom LK loads the boot image from eMMC instead of loading it from SD card though SBL1 and LK are running from SD card.
I’m using LK source base from here:
https://git.linaro.org/landing-teams/working/qualcomm/lk.git
I’m building platform msm8916.
The code tries to init slot 1 (eMMC) first and if it fails it tries slot 2 (external uSD):
https://git.linaro.org/landing-teams/working/qualcomm/lk.git/tree/target/msm8916/init.c#n107
In the SDHCI driver it tries to inititialize the ‘internal MMC’ and if it fails it tries to initialize the ‘SD card’:
The code referenced above seems not to be the base for the LK contained in the ‘firmware-qcom-dragonboard410c-bootloader-sdcard’ which obviously loads the boot image from SD card.
Hence, there must be another initialization sequence for the ‘SD card aware’ LK.
The boot messages from that bootloader tell me that MMC slot 2 is enforced for the first code snipped and the ‘internal MMC’ initialization failure resulting in ‘trying for SD card’ is also valid for the SD boot case:
…
[10] [10] platform_init()
[10] [10] target_init()
[20] [20] initialising mmc_slot =2
[30] [30] Error: Command timeout error
[30] [30] Failure getting OCR response from MMC Card
[30] [30] MMC card failed to respond, try for SD card
[200] [200] Done initialization of the card
…
I tried enforce MMC slot 2 too:
...
void target_sdc_init()
{
...
#if 0
/* Try slot 1*/
config.slot = 1;
config.sdhc_base = mmc_sdhci_base[config.slot - 1];
config.pwrctl_base = mmc_pwrctl_base[config.slot - 1];
config.pwr_irq = mmc_sdc_pwrctl_irq[config.slot - 1];
config.hs400_support = 0;
if (!(dev = mmc_init(&config))) {
#endif
/* Try slot 2 */
config.slot = 2;
config.max_clk_rate = MMC_CLK_200MHZ;
config.sdhc_base = mmc_sdhci_base[config.slot - 1];
config.pwrctl_base = mmc_pwrctl_base[config.slot - 1];
config.pwr_irq = mmc_sdc_pwrctl_irq[config.slot - 1];
if (!(dev = mmc_init(&config))) {
dprintf(CRITICAL, "mmc init failed!");
ASSERT(0);
}
#if 0
}
#endif
}
...
The LK never reaches ‘[200] [200] Done initialization of the card’ with the above hack.
Is the initialization sequence from the above firmware LK available?
@anon91830841 Can you help?
Best regards
-Carsten