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

klaus.goger at theobroma-systems.com klaus.goger at theobroma-systems.com
Fri May 4 09:19:41 UTC 2018


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.

> 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. 

> #else
> 	#define BOOT_TARGET_MMC(func)
> #endif
> -- 
> 1.9.1

Best Regards,
Klaus



More information about the U-Boot mailing list