[U-Boot] [PATCH] rockchip: update emmc/sd index

Kever Yang kever.yang at rock-chips.com
Mon May 7 02:53:26 UTC 2018


Hi Klaus,


On 05/04/2018 05:19 PM, klaus.goger at theobroma-systems.com wrote:
> Hi Kever
>
>> On 04.05.2018, at 10:50, Kever Yang <kever.yang at rock-chips.com> wrote:
>>
>> We define emmc/sdcard index in dts alias, emmc is 0 and sdcard is 1.
> The commit message is a bit misleading at first. When reading it i thought
> you update or add dts alias indexes. But you actually change the default
> boot order of distroboot. So having the commit message reflect that would
> be nice.

Thanks for your comment, will update.
>
>> Signed-off-by: Kever Yang <kever.yang at rock-chips.com>
>> ---
>>
>> include/configs/rockchip-common.h | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
>> index 4062480..d658854 100644
>> --- a/include/configs/rockchip-common.h
>> +++ b/include/configs/rockchip-common.h
>> @@ -16,11 +16,11 @@
>>
>> #ifndef CONFIG_SPL_BUILD
>>
>> -/* First try to boot from SD (index 0), then eMMC (index 1) */
>> +/* First try to boot from SD (index 1), then eMMC (index 0) */
>> #if CONFIG_IS_ENABLED(CMD_MMC)
>> 	#define BOOT_TARGET_MMC(func) \
>> -		func(MMC, mmc, 0) \
>> -		func(MMC, mmc, 1)
>> +		func(MMC, mmc, 1) \
>> +		func(MMC, mmc, 0)
> While I agree that the comment is wrong I’m against this patch as it will change the 
> current default behaviour that people are depending on. Wouldn’t it be better to 
> change the comment to reflect current reality?
> Also prioritising SD card over eMMC does not make any sense to me. At least on
> RK3399 and RK3368 the default ROM boot order is first eMMC then SD card. So 
> starting U-Boot from eMMC and then loading the Kernel from SD-card doesn’t sound
> right for me. 

First, it's obvious the comment and the real mmc number is not the same.
The reason why we need to make SD card have higher default priority is
if we have firmeware on both SD card and eMMC, that means we have normal
system in emmc, and SD card have a test purpose(for most developers) or
upgrade purpose(for factory or customer) firmware, so we should boot from
SD card first.
For the board with emmc, we won't have firmware on SD card in most case,
so it won't affect the existing system.

Thanks,
- Kever
>
>> #else
>> 	#define BOOT_TARGET_MMC(func)
>> #endif
>> -- 
>> 1.9.1
> Best Regards,
> Klaus
>
>




More information about the U-Boot mailing list