uboot/kirkwood: correct mtdparts + cmdline for new ubifs on dockstar
[openwrt.git] / package / boot / uboot-kirkwood / patches / 110-dockstar.patch
1 --- a/include/configs/dockstar.h
2 +++ b/include/configs/dockstar.h
3 @@ -17,20 +17,25 @@
4  /*
5   * Version number information
6   */
7 -#define CONFIG_IDENT_STRING    "\nSeagate FreeAgent DockStar"
8 +#define CONFIG_IDENT_STRING    "Seagate FreeAgent DockStar"
9  
10  /*
11 - * High Level Configuration Options (easy to change)
12 + * High Level Configuration Options
13   */
14 -#define CONFIG_FEROCEON_88FR131        1       /* CPU Core subversion */
15 -#define CONFIG_KW88F6281       1       /* SOC Name */
16 -#define CONFIG_MACH_DOCKSTAR   /* Machine type */
17 +#define CONFIG_FEROCEON_88FR131                /* CPU Core subversion */
18 +#define CONFIG_KW88F6281               /* SOC Name */
19  #define CONFIG_SKIP_LOWLEVEL_INIT      /* disable board lowlevel_init */
20  
21  /*
22 + * Machine type
23 + */
24 +#define CONFIG_MACH_DOCKSTAR
25 +
26 +/*
27   * Commands configuration
28   */
29 -#define CONFIG_SYS_NO_FLASH            /* Declare no flash (NOR/SPI) */
30 +#define CONFIG_SYS_NO_FLASH            /* declare no flash (NOR/SPI) */
31 +#define CONFIG_SYS_MVFS
32  #include <config_cmd_default.h>
33  #define CONFIG_CMD_DHCP
34  #define CONFIG_CMD_ENV
35 @@ -38,55 +43,52 @@
36  #define CONFIG_CMD_NAND
37  #define CONFIG_CMD_PING
38  #define CONFIG_CMD_USB
39 +
40  /*
41   * mv-common.h should be defined after CMD configs since it used them
42   * to enable certain macros
43   */
44  #include "mv-common.h"
45  
46 -#undef CONFIG_SYS_PROMPT       /* previously defined in mv-common.h */
47 -#define CONFIG_SYS_PROMPT      "DockStar> "    /* Command Prompt */
48 +#undef CONFIG_SYS_PROMPT
49 +#define CONFIG_SYS_PROMPT      "dockstar => "
50  
51  /*
52 - *  Environment variables configurations
53 + * Environment variables configuration
54   */
55  #ifdef CONFIG_CMD_NAND
56 -#define CONFIG_ENV_IS_IN_NAND          1
57 -#define CONFIG_ENV_SECT_SIZE           0x20000 /* 128K */
58 +#define CONFIG_ENV_IS_IN_NAND
59 +#define CONFIG_ENV_SECT_SIZE   0x20000
60  #else
61 -#define CONFIG_ENV_IS_NOWHERE          1       /* if env in SDRAM */
62 +#define CONFIG_ENV_IS_NOWHERE
63  #endif
64 -/*
65 - * max 4k env size is enough, but in case of nand
66 - * it has to be rounded to sector size
67 - */
68 -#define CONFIG_ENV_SIZE                        0x20000 /* 128k */
69 -#define CONFIG_ENV_ADDR                        0x60000
70 -#define CONFIG_ENV_OFFSET              0x60000 /* env starts here */
71 +#define CONFIG_ENV_SIZE                0x20000
72 +#define CONFIG_ENV_OFFSET      0xe0000
73  
74  /*
75   * Default environment variables
76   */
77  #define CONFIG_BOOTCOMMAND \
78         "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; "     \
79 -       "ubi part root; " \
80 -       "ubifsmount ubi:root; " \
81 -       "ubifsload 0x800000 ${kernel}; " \
82 -       "ubifsload 0x1100000 ${initrd}; " \
83 -       "bootm 0x800000 0x1100000"
84 -
85 -#define CONFIG_MTDPARTS                "mtdparts=orion_nand:1m(uboot),-(root)\0"
86 +       "ubi part ubi; "                                                \
87 +       "ubi read 0x800000 kernel; "                            \
88 +       "bootz 0x800000"
89 +
90 +#define CONFIG_MTDPARTS \
91 +       "mtdparts=orion_nand:"                          \
92 +       "0xe0000@0x0(uboot),"                           \
93 +       "0x20000@0xe0000(uboot_env),"                   \
94 +       "0x100000@0x100000(second_stage_uboot),"        \
95 +       "-@0x200000(ubi)\0"
96  
97  #define CONFIG_EXTRA_ENV_SETTINGS \
98 -       "console=console=ttyS0,115200\0" \
99 -       "mtdids=nand0=orion_nand\0" \
100 -       "mtdparts="CONFIG_MTDPARTS \
101 -       "kernel=/boot/uImage\0" \
102 -       "initrd=/boot/uInitrd\0" \
103 -       "bootargs_root=ubi.mtd=1 root=ubi0:root rootfstype=ubifs ro\0"
104 +       "console=console=ttyS0,115200\0"        \
105 +       "mtdids=nand0=orion_nand\0"             \
106 +       "mtdparts="CONFIG_MTDPARTS              \
107 +       "bootargs_root=\0"
108  
109  /*
110 - * Ethernet Driver configuration
111 + * Ethernet driver configuration
112   */
113  #ifdef CONFIG_CMD_NET
114  #define CONFIG_MVGBE_PORTS     {1, 0}  /* enable port 0 only */
115 @@ -102,7 +110,7 @@
116  #define CONFIG_CMD_UBI
117  #define CONFIG_CMD_UBIFS
118  #define CONFIG_RBTREE
119 -#define CONFIG_MTD_DEVICE               /* needed for mtdparts commands */
120 +#define CONFIG_MTD_DEVICE
121  #define CONFIG_MTD_PARTITIONS
122  #define CONFIG_CMD_MTDPARTS
123  #define CONFIG_LZO