Fix bootcmd and some initialization in ti_omap5_common so that we don't need a boot...
authorH. Nikolaus Schaller <hns@goldelico.com>
Wed, 20 Jan 2016 11:01:57 +0000 (12:01 +0100)
committernotaz <notasas@gmail.com>
Sun, 14 Aug 2016 13:43:29 +0000 (16:43 +0300)
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
include/configs/letux_cortex15.h
include/configs/ti_omap5_common.h

index cc109e3..1e7a318 100644 (file)
 #undef CONFIG_SYS_I2C_TCA642X_BUS_NUM
 #undef CONFIG_SYS_I2C_TCA642X_ADDR
 
-#undef CONFIG_BOOTCOMMAND
-#define CONFIG_BOOTCOMMAND \
-       "echo bootcmd for LC15;" \
-       "setenv mmcdev 0; " \
-       "if test ${dofastboot} -eq 1; then " \
-               "echo Boot fastboot requested, resetting dofastboot ...;" \
-               "setenv dofastboot 0; saveenv;" \
-               "echo Booting into fastboot ...; fastboot;" \
-       "fi;" \
-       "if run loadbootscript; then " \
-               "run bootscript;" \
-       "else;" \
-               "echo trying mmc0;" \
-               "setenv mmcdev 0; " \
-               "setenv bootpart 0:1; " \
-               "setenv mmcroot /dev/mmcblk0p2 rw; " \
-               "run findfdt; " \
-               "run mmcboot;" \
-               "echo trying mmc1;" \
-               "setenv mmcdev 1; " \
-               "setenv bootpart 1:1; " \
-               "setenv mmcroot /dev/mmcblk1p2 rw; " \
-               "run mmcboot;" \
-       "fi;" \
-       ""
-
-#endif
-
 #if 0  /* for the moment, disable to store environment in eMMC */
 #undef CONFIG_ENV_IS_IN_MMC
 #undef CONFIG_SYS_MMC_ENV_DEV
index 3589cdc..3302088 100644 (file)
@@ -76,6 +76,7 @@
        "bootpart=0:2\0" \
        "bootdir=/boot\0" \
        "bootfile=zImage\0" \
+       "bootfilecmd=bootz\0" \
        "usbtty=cdc_acm\0" \
        "vram=16M\0" \
        "partitions=" PARTS_DEFAULT "\0" \
@@ -92,7 +93,7 @@
                                "run loadfdt; " \
                                "echo Booting from mmc${mmcdev} ...; " \
                                "run args_mmc; " \
-                               "bootz ${loadaddr} - ${fdtaddr}; " \
+                               "${bootfilecmd} ${loadaddr} - ${fdtaddr}; " \
                        "fi;" \
                "fi;\0" \
        "findfdt="\
        NETARGS \
 
 #define CONFIG_BOOTCOMMAND \
+       "echo Letux OMAP5 bootcmd;" \
        "if test ${dofastboot} -eq 1; then " \
                "echo Boot fastboot requested, resetting dofastboot ...;" \
                "setenv dofastboot 0; saveenv;" \
                "echo Booting into fastboot ...; fastboot 0;" \
        "fi;" \
        "run findfdt; " \
+       "setenv mmcdev 0; " \
+       "setenv bootpart 0:2; " \
        "run envboot; " \
        "run mmcboot;" \
        "setenv mmcdev 1; " \
        "setenv bootpart 1:2; " \
-       "setenv mmcroot /dev/mmcblk0p2 rw; " \
        "run mmcboot;" \
        ""
 #endif