[package] uboot-imx6: update to 2014.04
[openwrt.git] / package / boot / uboot-imx6 / patches / 110-wandboard-owrt-env.patch
1 --- a/include/configs/wandboard.h
2 +++ b/include/configs/wandboard.h
3 @@ -49,7 +49,7 @@
4  #define CONFIG_CMD_BMODE
5  #define CONFIG_CMD_SETEXPR
6  
7 -#define CONFIG_BOOTDELAY               5
8 +#define CONFIG_BOOTDELAY               3
9  
10  #define CONFIG_SYS_MEMTEST_START       0x10000000
11  #define CONFIG_SYS_MEMTEST_END         (CONFIG_SYS_MEMTEST_START + 500 * SZ_1M)
12 @@ -102,13 +102,15 @@
13  
14  #if defined(CONFIG_MX6DL) || defined(CONFIG_MX6S)
15  #define CONFIG_DEFAULT_FDT_FILE                "imx6dl-wandboard.dtb"
16 +#define CONFIG_OWRT_NAME "openwrt-imx6-imx6dl-wandboard-fit-uImage.itb"
17  #elif defined(CONFIG_MX6Q)
18  #define CONFIG_DEFAULT_FDT_FILE                "imx6q-wandboard.dtb"
19 +#define CONFIG_OWRT_NAME "openwrt-imx6-imx6q-wandboard-fit-uImage.itb"
20  #endif
21  
22  #define CONFIG_EXTRA_ENV_SETTINGS \
23         "script=boot.scr\0" \
24 -       "image=zImage\0" \
25 +       "image=" CONFIG_OWRT_NAME "\0" \
26         "console=ttymxc0\0" \
27         "splashpos=m,m\0" \
28         "fdt_high=0xffffffff\0" \
29 @@ -137,11 +139,11 @@
30         "mmcargs=setenv bootargs console=${console},${baudrate} " \
31                 "root=${mmcroot}\0" \
32         "loadbootscript=" \
33 -               "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
34 +               "ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
35         "bootscript=echo Running bootscript from mmc ...; " \
36                 "source\0" \
37 -       "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
38 -       "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
39 +       "loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
40 +       "loadfdt=ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
41         "mmcboot=echo Booting from mmc ...; " \
42                 "run mmcargs; " \
43                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
44 @@ -155,31 +157,7 @@
45                                 "fi; " \
46                         "fi; " \
47                 "else " \
48 -                       "bootz; " \
49 -               "fi;\0" \
50 -       "netargs=setenv bootargs console=${console},${baudrate} " \
51 -               "root=/dev/nfs " \
52 -       "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
53 -               "netboot=echo Booting from net ...; " \
54 -               "run netargs; " \
55 -               "if test ${ip_dyn} = yes; then " \
56 -                       "setenv get_cmd dhcp; " \
57 -               "else " \
58 -                       "setenv get_cmd tftp; " \
59 -               "fi; " \
60 -               "${get_cmd} ${image}; " \
61 -               "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
62 -                       "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
63 -                               "bootz ${loadaddr} - ${fdt_addr}; " \
64 -                       "else " \
65 -                               "if test ${boot_fdt} = try; then " \
66 -                                       "bootz; " \
67 -                               "else " \
68 -                                       "echo WARN: Cannot load the DT; " \
69 -                               "fi; " \
70 -                       "fi; " \
71 -               "else " \
72 -                       "bootz; " \
73 +                       "bootm; " \
74                 "fi;\0"
75  
76  #define CONFIG_BOOTCOMMAND \
77 @@ -189,10 +167,10 @@
78                    "else " \
79                            "if run loadimage; then " \
80                                    "run mmcboot; " \
81 -                          "else run netboot; " \
82 +                          "else echo WARN: Can not boot the image; " \
83                            "fi; " \
84                    "fi; " \
85 -          "else run netboot; fi"
86 +          "fi"
87  
88  /* Miscellaneous configurable options */
89  #define CONFIG_SYS_LONGHELP