a2e0f6d19144c8d0b1312d9c41dfa7e72dd3c662
[glsdk/meta-ti-glsdk.git] / recipes-bsp / u-boot / u-boot / 2011.09git / 0002-am335x_evm-read-uEnv.txt-instead-of-boot.scr.patch
1 From 527309ca11da0a258479da8443f00de0003c4bf9 Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@dominion.thruhere.net>
3 Date: Wed, 12 Oct 2011 10:50:51 +0200
4 Subject: [PATCH 2/2] am335x_evm: read uEnv.txt instead of boot.scr
6 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7 ---
8 include/configs/am335x_evm.h | 25 ++++++++++++++-----------
9 1 files changed, 14 insertions(+), 11 deletions(-)
11 diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
12 index dbb412a..5a28724 100755
13 --- a/include/configs/am335x_evm.h
14 +++ b/include/configs/am335x_evm.h
15 @@ -116,6 +116,10 @@
16 "loadbootscript=fatload mmc 0 ${script_addr} boot.scr\0" \
17 "bootscript= echo Running bootscript from MMC/SD to set the ENV...; " \
18 "source ${script_addr}\0" \
19 + "bootenv=uEnv.txt\0" \
20 + "loadbootenv=fatload mmc 0 ${loadaddr} ${bootenv}\0" \
21 + "importbootenv=echo Importing environment from mmc ...; " \
22 + "env import -t $loadaddr $filesize\0" \
23 "mmc_load_uimage_fat=fatload mmc 0 ${loadaddr} ${bootfile}\0" \
24 "mmc_load_uimage=ext2load mmc 0:2 ${loadaddr} /boot/${bootfile}\0" \
25 "bootargs_defaults=setenv bootargs " \
26 @@ -167,18 +171,17 @@
28 #define CONFIG_BOOTCOMMAND \
29 "if mmc rescan; then " \
30 - "if run loadbootscript; then " \
31 - "run bootscript; " \
32 - "else " \
33 - "if run mmc_load_uimage; then " \
34 - "run mmc_boot; " \
35 - "else " \
36 - "run nand_boot; " \
37 - "fi; " \
38 + "if run loadbootenv; then " \
39 + "echo Loaded environment from ${bootenv};" \
40 + "run importbootenv; " \
41 "fi; " \
42 - "else " \
43 - "run nand_boot; " \
44 - "fi"
45 + "if test -n $uenvcmd; then " \
46 + "echo Running uenvcmd ...;" \
47 + "run uenvcmd;" \
48 + "fi;" \
49 + "run mmc_boot; " \
50 + "fi; " \
51 + "run nand_boot; " \
53 #define CONFIG_DISPLAY_BOARDINFO
54 #define CONFIG_MISC_INIT_R
55 --
56 1.6.6.1