imx6: update patches
[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 @@ -51,7 +51,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 @@ -103,15 +103,18 @@
13  
14  #if defined(CONFIG_MX6DL)
15  #define CONFIG_DEFAULT_FDT_FILE                "imx6dl-wandboard.dtb"
16 +#define CONFIG_OWRT_NAME               "openwrt-imx6dl-wandboard-uImage.itb"
17  #elif defined(CONFIG_MX6Q)
18  #define CONFIG_DEFAULT_FDT_FILE                "imx6q-wandboard.dtb"
19 +#define CONFIG_OWRT_NAME               "openwrt-imx6q-wandboard-uImage.itb"
20  #elif defined(CONFIG_MX6S)
21  #define CONFIG_DEFAULT_FDT_FILE                "imx6s-wandboard.dtb"
22 +#define CONFIG_OWRT_NAME               "openwrt-imx6s-wandboard-uImage.itb"
23  #endif
24  
25  #define CONFIG_EXTRA_ENV_SETTINGS \
26         "script=boot.scr\0" \
27 -       "uimage=uImage\0" \
28 +       "uimage=" CONFIG_OWRT_NAME "\0" \
29         "console=ttymxc0\0" \
30         "fdt_high=0xffffffff\0" \
31         "initrd_high=0xffffffff\0" \
32 @@ -139,11 +142,11 @@
33         "mmcargs=setenv bootargs console=${console},${baudrate} " \
34                 "root=${mmcroot}\0" \
35         "loadbootscript=" \
36 -               "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
37 +               "ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
38         "bootscript=echo Running bootscript from mmc ...; " \
39                 "source\0" \
40 -       "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
41 -       "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
42 +       "loaduimage=ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \
43 +       "loadfdt=ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
44         "mmcboot=echo Booting from mmc ...; " \
45                 "run mmcargs; " \
46                 "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
47 @@ -158,30 +161,6 @@
48                         "fi; " \
49                 "else " \
50                         "bootm; " \
51 -               "fi;\0" \
52 -       "netargs=setenv bootargs console=${console},${baudrate} " \
53 -               "root=/dev/nfs " \
54 -       "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
55 -               "netboot=echo Booting from net ...; " \
56 -               "run netargs; " \
57 -               "if test ${ip_dyn} = yes; then " \
58 -                       "setenv get_cmd dhcp; " \
59 -               "else " \
60 -                       "setenv get_cmd tftp; " \
61 -               "fi; " \
62 -               "${get_cmd} ${uimage}; " \
63 -               "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
64 -                       "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
65 -                               "bootm ${loadaddr} - ${fdt_addr}; " \
66 -                       "else " \
67 -                               "if test ${boot_fdt} = try; then " \
68 -                                       "bootm; " \
69 -                               "else " \
70 -                                       "echo WARN: Cannot load the DT; " \
71 -                               "fi; " \
72 -                       "fi; " \
73 -               "else " \
74 -                       "bootm; " \
75                 "fi;\0"
76  
77  #define CONFIG_BOOTCOMMAND \
78 @@ -191,10 +170,10 @@
79                    "else " \
80                            "if run loaduimage; then " \
81                                    "run mmcboot; " \
82 -                          "else run netboot; " \
83 +                          "else echo WARN: Can not boot the image; " \
84                            "fi; " \
85                    "fi; " \
86 -          "else run netboot; fi"
87 +          "fi"
88  
89  /* Miscellaneous configurable options */
90  #define CONFIG_SYS_LONGHELP