i2S6ULY2: update uboot into bootpart of eMMC flash
This commit is contained in:
@ -86,10 +86,12 @@ static int write_firmware(char *partname, unsigned long loadaddr,
|
||||
/*
|
||||
* If updating U-Boot on eMMC
|
||||
* append the hardware partition where U-Boot lives.
|
||||
* mmc0 is SDCard slot
|
||||
* mmc1 is eMMC
|
||||
*/
|
||||
if (!strcmp(partname, "uboot") &&
|
||||
!strcmp(CONFIG_SYS_STORAGE_MEDIA, "mmc") &&
|
||||
(mmc_dev_index == 0))
|
||||
(mmc_dev_index == 1))
|
||||
strcat(cmd, " $mmcbootpart");
|
||||
|
||||
/* Change to storage device */
|
||||
@ -475,7 +477,7 @@ int mmc_get_bootdevindex(void)
|
||||
{
|
||||
switch(get_boot_device()) {
|
||||
case SD1_BOOT ... SD4_BOOT:
|
||||
return 1;
|
||||
return 0;
|
||||
#if 0
|
||||
/* SD card */
|
||||
if (board_has_emmc())
|
||||
@ -483,8 +485,8 @@ int mmc_get_bootdevindex(void)
|
||||
else
|
||||
return 0; /* index of USDHC2 if SOM has no eMMC */
|
||||
#endif
|
||||
case MMC4_BOOT:
|
||||
return 0; /* index of SDHC4 (eMMC) */
|
||||
case MMC2_BOOT:
|
||||
return 1; /* index of SDHC2 (eMMC) */
|
||||
default:
|
||||
/* return default value otherwise */
|
||||
return CONFIG_SYS_MMC_ENV_DEV;
|
||||
|
||||
@ -190,6 +190,7 @@
|
||||
"bootargs_linux=\0" \
|
||||
"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
|
||||
"mmcpart=" CONFIG_BOOT_PARTITION "\0" \
|
||||
"mmcbootpart=" __stringify(CONFIG_SYS_BOOT_PART_EMMC) "\0" \
|
||||
"mmcroot=PARTUUID=1c606ef5-f1ac-43b9-9bb5-d5c578580b6b\0" \
|
||||
"mmcautodetect=yes\0" \
|
||||
"partition_mmc_linux=mmc rescan;" \
|
||||
|
||||
Reference in New Issue
Block a user