From 3ed253e34449c98dd9d0e466b3dcb0c0a93dd917 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 2 May 2013 09:25:15 +1000 Subject: [PATCH 1/2] gk802 default boot script: try for files in /boot first, fall back to same files in / if they exist --- include/configs/gk802.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/configs/gk802.h b/include/configs/gk802.h index a84f16bf0..1f1ac3dfc 100644 --- a/include/configs/gk802.h +++ b/include/configs/gk802.h @@ -115,10 +115,9 @@ "initrd_high=0xffffffff\0" \ "boot_recovery=setenv bootsuffix _recovery; setenv mmcdev 1; run try_boot; setenv mmcdev 0; run try_boot; run boot_normal\0" \ "boot_normal= setenv bootsuffix ''; setenv mmcdev 1; run try_boot; setenv mmcdev 0; run try_boot\0" \ - "try_boot=if ext2load mmc ${mmcdev} ${loadaddr} /boot/ubootcmd${bootsuffix}; then source; fi;" \ - " if ext2load mmc ${mmcdev} ${loadaddr} /boot/uImage${bootsuffix}; then bootm; fi;\0" - - + "try_path=if ext2load mmc ${mmcdev} ${loadaddr} ${path}/ubootcmd${bootsuffix}; then source; fi;" \ + " if ext2load mmc ${mmcdev} ${loadaddr} ${path}/uImage${bootsuffix}; then bootm; fi;\0" \ + "try_boot=setenv path /boot; run try_path; setenv path ''; run try_path;\0" #define CONFIG_BOOTCOMMAND \ "if test ${recovery} -gt 0; then "\ From ee888c9d64259895e71beed6e2c9db076d01d8cc Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Mon, 20 May 2013 17:55:15 +1000 Subject: [PATCH 2/2] GK802 default bootcmd: Try booting from USB if mmc 0 & 1 fail --- include/configs/gk802.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/configs/gk802.h b/include/configs/gk802.h index 1f1ac3dfc..6fa5c9ab3 100644 --- a/include/configs/gk802.h +++ b/include/configs/gk802.h @@ -113,11 +113,14 @@ "console=" CONFIG_CONSOLE_DEV "\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "boot_recovery=setenv bootsuffix _recovery; setenv mmcdev 1; run try_boot; setenv mmcdev 0; run try_boot; run boot_normal\0" \ - "boot_normal= setenv bootsuffix ''; setenv mmcdev 1; run try_boot; setenv mmcdev 0; run try_boot\0" \ - "try_path=if ext2load mmc ${mmcdev} ${loadaddr} ${path}/ubootcmd${bootsuffix}; then source; fi;" \ - " if ext2load mmc ${mmcdev} ${loadaddr} ${path}/uImage${bootsuffix}; then bootm; fi;\0" \ - "try_boot=setenv path /boot; run try_path; setenv path ''; run try_path;\0" + "boot_recovery=setenv bootsuffix _recovery; run try_devices; run boot_normal;\0" \ + "boot_normal= setenv bootsuffix ''; run try_devices;\0" \ + "try_path=if ext2load ${dtype} ${dev} ${loadaddr} ${path}/ubootcmd${bootsuffix}; then source; fi;" \ + " if ext2load ${dtype} ${dev} ${loadaddr} ${path}/uImage${bootsuffix}; then bootm; fi;\0" \ + "try_boot=setenv path /boot; run try_path; setenv path ''; run try_path;\0" \ + "try_mmc=setenv dtype mmc; setenv dev 1; run try_boot; setenv dev 0; run try_boot;\0" \ + "try_usb=usb start; setenv dtype usb; setenv dev 0; run try_boot; setenv dev 1; run try_boot;\0" \ + "try_devices=run try_mmc; run try_usb;\0" #define CONFIG_BOOTCOMMAND \ "if test ${recovery} -gt 0; then "\ @@ -132,7 +135,6 @@ #define CONFIG_SYS_PROMPT "U-Boot > " #define CONFIG_AUTO_COMPLETE #define CONFIG_SYS_CBSIZE 256 - /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) #define CONFIG_SYS_MAXARGS 16