Prepare ENV settings for sheevaplugs to be OpenWRT ready.

        +----------+
        | UBOOT    | >> 896 Kb (7x128)  = uboot
        +----------+
        | ENV      | >> 128 Kb          = uboot_env
        +----------+
        | IMAGES   | >> 23 Mb @ 1 Mb    = image -> UIMAGE+UINITRD+FDT
        +----------+
        | ROOT(FS) | >> 488 Mb @ 24 Mb  = root -> rootfs (ubifs)
        +----------+

With (CC) TRUNK OpenWRT build (QUICK HOWTO) :

        <INTERRUPT>
        Marvell>> nand erase.part root
        Marvell>> ubi part root
        Marvell>> ubi remove rootfs
        Marvell>> ubi create rootfs
        Marvell>> usb reset
        Marvell>> fatload usb 0:1 0x800000 
sheevaplug/openwrt/openwrt-kirkwood-sheevaplug-rootfs.ubifs
        Marvell>> ubi write 0x800000 rootfs ${filesize}
        Marvell>> reset

Signed-off-by: Gérald Kerma <drea...@doukki.net>
---
 include/configs/sheevaplug.h | 40 ++++++++++++++++++++++++----------------
 1 file changed, 24 insertions(+), 16 deletions(-)

diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 0f523c5..dc51a4a 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -78,26 +78,34 @@
  * it has to be rounded to sector size
  */
 #define CONFIG_ENV_SIZE                        0x20000 /* 128k */
-#define CONFIG_ENV_ADDR                        0x80000
-#define CONFIG_ENV_OFFSET              0x80000 /* env starts here */
+#define CONFIG_ENV_OFFSET              0xE0000 /* env starts here */
 
 /*
  * Default environment variables
  */
-#define CONFIG_BOOTCOMMAND             "${x_bootcmd_kernel}; " \
-       "setenv bootargs ${x_bootargs} ${x_bootargs_root}; "    \
-       "${x_bootcmd_usb}; bootm 0x6400000;"
-
-#define CONFIG_MTDPARTS                \
-       "mtdparts=orion_nand:512K(uboot),"                              \
-       "512K(env),1M(script),6M(kernel),"                              \
-       "12M(ramdisk),4M(spare),-(rootfs)"
-
-#define CONFIG_EXTRA_ENV_SETTINGS      "x_bootargs=console"    \
-       "=ttyS0,115200 mtdparts="CONFIG_MTDPARTS        \
-       "x_bootcmd_kernel=nand read 0x6400000 0x100000 0x300000\0" \
-       "x_bootcmd_usb=usb start\0" \
-       "x_bootargs_root=root=/dev/mtdblock3 rw rootfstype=jffs2\0"
+#define CONFIG_BOOTCOMMAND \
+       "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; "     \
+       "ubi part root; "                                               \
+       "ubifsmount ubi:rootfs; "                                       \
+       "ubifsload 0x800000 ${kernel}; "                                \
+       "ubifsload 0x700000 ${fdt}; "                                   \
+       "ubifsumount; "                                                 \
+       "fdt addr 0x700000; fdt resize; fdt chosen; "                   \
+       "bootz 0x800000 - 0x700000"
+
+#define CONFIG_MTDPARTS        \
+       "mtdparts=orion_nand:"                                  \
+       "896K(uboot),128K(uboot_env),"                          \
+       "23M@1M(image),"                                        \
+       "-@24M(root)\0"
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+       "console=console=ttyS0,115200\0"                                \
+       "mtdids=nand0=orion_nand\0"                                     \
+       "mtdparts="CONFIG_MTDPARTS                                      \
+       "kernel=/boot/zImage\0"                                         \
+       "fdt=/boot/sheevaplug.dtb\0"                                    \
+       "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
 
 #define MTDIDS_DEFAULT "nand0=orion_nand"
 
-- 
2.1.3
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to