a93dde09814d5c9ac2350d513263a4754ccc8668
[openwrt.git] / package / boot / uboot-kirkwood / patches / 140-pogoplug_e02.patch
1 --- a/boards.cfg
2 +++ b/boards.cfg
3 @@ -168,6 +168,7 @@ Active  arm         arm926ejs      davin
4  Active  arm         arm926ejs      kirkwood    buffalo         lsxl                lschlv2                               lsxl:LSCHLV2                                                                                                                      Michael Walle <michael@walle.cc>
5  Active  arm         arm926ejs      kirkwood    buffalo         lsxl                lsxhl                                 lsxl:LSXHL                                                                                                                        Michael Walle <michael@walle.cc>
6  Active  arm         arm926ejs      kirkwood    cloudengines    pogo_e02            pogo_e02                              -                                                                                                                                 Dave Purdy <david.c.purdy@gmail.com>
7 +Active  arm         arm926ejs      kirkwood    cloudengines    pogo_e02            pogo_e02_second_stage                pogo_e02:SECOND_STAGE                                                                                                              Felix Kaechele <felix@fetzig.org>
8  Active  arm         arm926ejs      kirkwood    d-link          dns325              dns325                                -                                                                                                                                 Stefan Herbrechtsmeier <stefan@code.herbrechtsmeier.net>
9  Active  arm         arm926ejs      kirkwood    iomega          iconnect            iconnect                              -                                                                                                                                 Luka Perkov <luka@openwrt.org>
10  Active  arm         arm926ejs      kirkwood    iomega          iconnect            iconnect_second_stage                iconnect:SECOND_STAGE                                                                                                              Luka Perkov <luka@openwrt.org>
11 --- a/include/configs/pogo_e02.h
12 +++ b/include/configs/pogo_e02.h
13 @@ -62,23 +62,35 @@
14  #endif
15  
16  #define CONFIG_ENV_SIZE                        0x20000 /* 128k */
17 -#define CONFIG_ENV_OFFSET              0x60000 /* env starts here */
18 +#define CONFIG_ENV_OFFSET              0xe0000 /* env starts here */
19  
20  /*
21   * Default environment variables
22   */
23  #define CONFIG_BOOTCOMMAND \
24 -       "setenv bootargs $(bootargs_console); " \
25 -       "run bootcmd_usb; " \
26 -       "bootm 0x00800000 0x01100000"
27 +       "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
28 +       "ubi part root; " \
29 +       "ubifsmount ubi:rootfs; " \
30 +       "ubifsload 0x800000 ${kernel}; " \
31 +       "ubifsload 0x700000 ${fdt}; " \
32 +       "ubifsumount; " \
33 +       "fdt addr 0x700000; fdt resize; fdt chosen; " \
34 +       "bootz 0x800000 - 0x700000"
35 +
36 +#define CONFIG_MTDPARTS \
37 +       "mtdparts=orion_nand:" \
38 +       "0xe0000@0x0(uboot)," \
39 +       "0x20000@0xe0000(uboot_env)," \
40 +       "0x100000@0x100000(second_stage_uboot)," \
41 +       "-@0x200000(root)\0"
42  
43  #define CONFIG_EXTRA_ENV_SETTINGS \
44 -       "mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage)," \
45 -       "32M(rootfs),-(data)\0"\
46 -       "mtdids=nand0=orion_nand\0"\
47 -       "bootargs_console=console=ttyS0,115200\0" \
48 -       "bootcmd_usb=usb start; ext2load usb 0:1 0x00800000 /uImage; " \
49 -       "ext2load usb 0:1 0x01100000 /uInitrd\0"
50 +       "console=console=ttyS0,115200\0"        \
51 +       "mtdids=nand0=orion_nand\0"             \
52 +       "mtdparts="CONFIG_MTDPARTS              \
53 +       "kernel=/boot/zImage\0"                 \
54 +       "fdt=/boot/pogo_e02.dtb\0"              \
55 +       "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
56  
57  /*
58   * Ethernet Driver configuration