This patch redefine ENV offset and MTDPARTS

 Changes in v3:
 - add a bootstrap from nand
 - fix typo errors
 Changes in v2:
 - fix MTDPARTS typo errors
 Changes in v1:
 - define ENV offset to 0xe0000
 - define MTDPARTS and BOOTARGS to stay backward compatibles

Signed-off-by: Gerald Kerma <[email protected]>
---
 include/configs/sheevaplug.h | 56 ++++++++++++++++++++++++++++----------------
 1 file changed, 36 insertions(+), 20 deletions(-)

diff --git a/include/configs/sheevaplug.h b/include/configs/sheevaplug.h
index 247789c..ef905bb 100644
--- a/include/configs/sheevaplug.h
+++ b/include/configs/sheevaplug.h
@@ -75,32 +75,48 @@
  * 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_ADDR                        0xe0000
+#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 MTDIDS_DEFAULT "nand0=orion_nand"
-
-#define MTDPARTS_DEFAULT       \
-       "mtdparts="CONFIG_MTDPARTS
-
+       "mtdparts=orion_nand:"                                  \
+       "0xe0000@0x0(uboot),"                                   \
+       "0x20000@0xe0000(uboot_env),"                           \
+       "3m@1m(kernel),"                                        \
+       "1m@4m(script),"                                        \
+       "-@5m(root)\0"
+ 
+#define MTDIDS_DEFAULT         "nand0=orion_nand"
+
+#define MTDPARTS_DEFAULT       CONFIG_MTDPARTS
+
+#define CONFIG_BOOTCOMMAND     \
+       "run z_bootcmd_script; run z_bootcmd_nand;"
+
+#define CONFIG_EXTRA_ENV_SETTINGS      \
+       "mtdparts="MTDPARTS_DEFAULT                                     \
+       "mtdids="MTDIDS_DEFAULT"\0"                                     \
+       "kernel=/boot/uImage\0"                                         \
+       "ramdisk=/boot/uInitrd\0"                                       \
+       "fdt=/boot/dtb\0"                                               \
+       "z_bootcmd_script=nand read 0x6400000 script;"                  \
+       " setenv bootargs ${x_bootargs} ${x_bootargs_root};"            \
+       " run x_bootcmd_usb; run x_bootcmd_ide;"                        \
+       " source 0x6400000;\0"                                          \
+       "z_bootcmd_nand=run x_bootcmd_nand_kernel;"                     \
+       " setenv bootargs ${x_bootargs} ${x_bootargs_nand_root}; "      \
+       " run x_bootcmd_usb; bootm 0x6400000;\0"                        \
+       "x_bootargs=console=ttyS0,115200 "CONFIG_MTDPARTS               \
+       "x_bootargs_root=root=LABEL=ROOTFS rw panic=5\0"                \
+       "x_bootcmd_usb=usb reset\0"                                     \
+       "x_bootcmd_ide=ide reset\0"                                     \
+       "x_bootargs_nand_root=root=/dev/mtdblock4 rw rootfstype=jffs2\0"\
+       "x_bootcmd_nand_kernel=nand read 0x6400000 kernel\0"
+       
 /*
  * Ethernet Driver configuration
  */
-- 
1.9.1

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to