qong: changes to Dave/DENX Qong configuration
authorIlya Yanok <yanok@emcraft.com>
Thu, 5 Feb 2009 03:08:20 +0000 (04:08 +0100)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Wed, 18 Feb 2009 03:24:35 +0000 (04:24 +0100)
1. Changes to the default environment:
  - "bootcmd" defined as "run flash_self"
  - "saveenv" command removed from "update"
  - "uboot" changed to "u-boot" (also in "load")
  - "addmtd" variable defined (and added to all boot commands)
2. CONFIG_CMD_JFFS2 defined to enable "mtdparts" command
3. MTDIDS_DEFAULT and MTDPARTS_DEFAULT defined
4. CONFIG_SYS_CBSIZE changed from 256 to 512. That solves the problem
with truncated "bootargs" environment variable.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
include/configs/qong.h

index fc6e33aa9bdfb8f22d21ecb4cf6b5e52b504948e..ccc2625135f33a01b3a6dd74d9cd67f1b5696321 100644 (file)
@@ -84,6 +84,7 @@
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_MII
+#define CONFIG_CMD_JFFS2
 
 /*
  * You can compile in a MAC address and your custom net settings by using
                ":${hostname}:${netdev}:off panic=1\0"                  \
        "addtty=setenv bootargs ${bootargs}"                            \
                " console=ttymxc0,${baudrate}\0"                        \
+       "addmtd=setenv bootargs ${bootargs} ${mtdparts}\0"              \
        "addmisc=setenv bootargs ${bootargs}\0"                         \
        "uboot_addr=a0000000\0"                                         \
        "kernel_addr=a0080000\0"                                        \
        "ramdisk_addr=a0300000\0"                                       \
-       "uboot=qong/u-boot.bin\0"                                       \
+       "u-boot=qong/u-boot.bin\0"                                      \
        "kernel_addr_r=80800000\0"                                      \
        "hostname=qong\0"                                               \
        "bootfile=qong/uImage\0"                                        \
        "rootpath=/opt/eldk-4.2-arm/armVFP\0"                           \
-       "flash_self=run ramargs addip addtty addmisc;"                  \
+       "flash_self=run ramargs addip addtty addmtd addmisc;"           \
                "bootm ${kernel_addr} ${ramdisk_addr}\0"                \
-       "flash_nfs=run nfsargs addip addtty addmisc;"                   \
+       "flash_nfs=run nfsargs addip addtty addmtd addmisc;"            \
                "bootm ${kernel_addr}\0"                                \
        "net_nfs=tftp ${kernel_addr_r} ${bootfile};"                    \
-               "run nfsargs addip addtty addmisc;"                     \
+               "run nfsargs addip addtty addmtd addmisc;"              \
                "bootm\0"                                               \
-       "load=tftp ${loadaddr} ${uboot}\0"                              \
+       "bootcmd=run flash_self\0"                                      \
+       "load=tftp ${loadaddr} ${u-boot}\0"                             \
        "update=protect off " xstr(CONFIG_SYS_MONITOR_BASE)             \
                " +${filesize};era " xstr(CONFIG_SYS_MONITOR_BASE)      \
                " +${filesize};cp.b ${fileaddr} "                       \
-               xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize};"           \
-               "setenv filesize;saveenv\0"                             \
+               xstr(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0"          \
        "upd=run load update\0"                                         \
 
 /*
  */
 #define CONFIG_SYS_LONGHELP            /* undef to save memory */
 #define CONFIG_SYS_PROMPT              "=> "
-#define CONFIG_SYS_CBSIZE              256     /* Console I/O Buffer Size */
+#define CONFIG_SYS_CBSIZE              512     /* Console I/O Buffer Size */
 /* Print Buffer Size */
 #define CONFIG_SYS_PBSIZE              (CONFIG_SYS_CBSIZE + \
                sizeof(CONFIG_SYS_PROMPT) + 16)
  * JFFS2 partitions
  */
 #define CONFIG_JFFS2_CMDLINE
+#define MTDIDS_DEFAULT         "nor0=physmap-flash.0"
+#define MTDPARTS_DEFAULT       \
+       "mtdparts=physmap-flash.0:256k(U-Boot),128k(env1),"     \
+       "128k(env2),2560k(kernel),13m(ramdisk),-(user)"
 
 #endif /* __CONFIG_H */