diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-19 20:03:13 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-29 11:38:33 +0900 |
commit | 6bc50a8f69920b2d2b0c5890e2133748b62656c3 (patch) | |
tree | aed89c59937c4f1002b23a019df66ce023fadac9 /arch | |
parent | bea3d826203f90507ff32ed24bd0a3c53479e55c (diff) |
ARM: uniphier: do not modify bootcmd environment variable at run-time
Some users might want to modify 'bootcmd' at compile-time by editing
include/configs/uniphier.h, but overwriting it at run-time makes it
impossible.
Instead, set 'bootdev' at run-time, which contains the boot device the
system is booting from, then indirectly reference it from 'bootcmd'.
It is up to users whether to override 'bootcmd'.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-uniphier/board_late_init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c index 1b871c62ce..972dbe8ae5 100644 --- a/arch/arm/mach-uniphier/board_late_init.c +++ b/arch/arm/mach-uniphier/board_late_init.c @@ -66,20 +66,20 @@ int board_late_init(void) switch (uniphier_boot_device_raw()) { case BOOT_DEVICE_MMC1: printf("eMMC Boot"); - env_set("bootcmd", "run bootcmd_mmc0; run distro_bootcmd"); + env_set("bootdev", "emmc"); break; case BOOT_DEVICE_NAND: printf("NAND Boot"); - env_set("bootcmd", "run bootcmd_ubifs0; run distro_bootcmd"); + env_set("bootdev", "nand"); nand_denali_wp_disable(); break; case BOOT_DEVICE_NOR: printf("NOR Boot"); - env_set("bootcmd", "run tftpboot; run distro_bootcmd"); + env_set("bootdev", "nor"); break; case BOOT_DEVICE_USB: printf("USB Boot"); - env_set("bootcmd", "run bootcmd_usb0; run distro_bootcmd"); + env_set("bootdev", "usb"); break; default: printf("Unknown"); |