diff options
author | Pali Rohár <pali@kernel.org> | 2020-04-01 00:35:11 +0200 |
---|---|---|
committer | Lokesh Vutla <lokeshvutla@ti.com> | 2020-05-11 10:16:49 +0530 |
commit | fca7abf3b9d476546d29d83c1adfd0c3907206d9 (patch) | |
tree | 9e27e6c176772390344bfdbc9f8f20467a72bf6c /include/configs/nokia_rx51.h | |
parent | 778907d2132be43ec286f07fade5cdb6b3cbfffb (diff) | |
download | u-boot-fca7abf3b9d476546d29d83c1adfd0c3907206d9.tar.gz u-boot-fca7abf3b9d476546d29d83c1adfd0c3907206d9.tar.xz u-boot-fca7abf3b9d476546d29d83c1adfd0c3907206d9.zip |
Nokia RX-51: Move code from defconfig back to C header file
In commit commit 37304aaf60bf ("Convert CONFIG_USE_PREBOOT and
CONFIG_PREBOOT to Kconfig") was moved complicated multiline script code
from C header to oneliner in defconfig. After this change multiline to wide
oneliner it is hard to read this code and even harder to debug. Moreover
this script code should be at place where are other scripts, so move it
back to C header file.
Define new env variable preboot which stores this script and in option
CONFIG_PREBOOT calls this preboot variable.
Signed-off-by: Pali Rohár <pali@kernel.org>
Diffstat (limited to 'include/configs/nokia_rx51.h')
-rw-r--r-- | include/configs/nokia_rx51.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/configs/nokia_rx51.h b/include/configs/nokia_rx51.h index 2f2496ab16..46f18e7110 100644 --- a/include/configs/nokia_rx51.h +++ b/include/configs/nokia_rx51.h @@ -239,6 +239,28 @@ int rx51_kp_getc(struct stdio_dev *sdev); "fi\0" \ "emmcboot=setenv mmcnum 1; run trymmcboot\0" \ "sdboot=setenv mmcnum 0; run trymmcboot\0" \ + "preboot=setenv mmcnum 1; setenv mmcpart 1;" \ + "setenv mmcscriptfile bootmenu.scr;" \ + "if run switchmmc; then " \ + "setenv mmcdone true;" \ + "setenv mmctype fat;" \ + "if run scriptload; then true; else " \ + "setenv mmctype ext2;" \ + "if run scriptload; then true; else " \ + "setenv mmctype ext4;" \ + "if run scriptload; then true; else " \ + "setenv mmcdone false;" \ + "fi;" \ + "fi;" \ + "fi;" \ + "if ${mmcdone}; then " \ + "run scriptboot;" \ + "fi;" \ + "fi;" \ + "if run slide; then true; else " \ + "setenv bootmenu_delay 0;" \ + "setenv bootdelay 0;" \ + "fi\0" \ "menucmd=bootmenu\0" \ "bootmenu_0=Attached kernel=run attachboot\0" \ "bootmenu_1=Internal eMMC=run emmcboot\0" \ |