|
| 1 | +--- a/configs/dns325_defconfig |
| 2 | ++++ b/configs/dns325_defconfig |
| 3 | +@@ -27,7 +27,7 @@ CONFIG_CMD_FAT=y |
| 4 | + CONFIG_CMD_JFFS2=y |
| 5 | + CONFIG_CMD_MTDPARTS=y |
| 6 | + CONFIG_MTDIDS_DEFAULT="nand0=orion_nand" |
| 7 | +-CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:896k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)" |
| 8 | ++CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xe0000@0x0(u-boot),0x20000@0xe0000(u-boot-env),-@0x100000(ubi)" |
| 9 | + CONFIG_CMD_UBI=y |
| 10 | + CONFIG_ISO_PARTITION=y |
| 11 | + CONFIG_OF_CONTROL=y |
| 12 | +--- a/include/configs/dns325.h |
| 13 | ++++ b/include/configs/dns325.h |
| 14 | +@@ -66,46 +66,12 @@ |
| 15 | + */ |
| 16 | + |
| 17 | + #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 18 | +- "stdin=serial\0" \ |
| 19 | +- "stdout=serial\0" \ |
| 20 | +- "stderr=serial\0" \ |
| 21 | +- "loadaddr=0x800000\0" \ |
| 22 | +- "autoload=no\0" \ |
| 23 | +- "console=ttyS0,115200\0" \ |
| 24 | +- "mtdparts="CONFIG_MTDPARTS_DEFAULT \ |
| 25 | +- "optargs=\0" \ |
| 26 | +- "bootenv=uEnv.txt\0" \ |
| 27 | +- "importbootenv=echo Importing environment ...; " \ |
| 28 | +- "env import -t ${loadaddr} ${filesize}\0" \ |
| 29 | +- "loadbootenv=fatload usb 0 ${loadaddr} ${bootenv}\0" \ |
| 30 | +- "setbootargs=setenv bootargs console=${console} " \ |
| 31 | +- "${optargs} " \ |
| 32 | +- "${mtdparts} " \ |
| 33 | +- "root=${bootenvroot} " \ |
| 34 | +- "rootfstype=${bootenvrootfstype}\0" \ |
| 35 | +- "subbootcmd=run setbootargs; " \ |
| 36 | +- "if run bootenvloadimage; then " \ |
| 37 | +- "bootm ${loadaddr};" \ |
| 38 | +- "fi;\0" \ |
| 39 | +- "nandroot=ubi0:rootfs ubi.mtd=rootfs\0" \ |
| 40 | +- "nandrootfstype=ubifs\0" \ |
| 41 | +- "nandloadimage=nand read ${loadaddr} kernel\0" \ |
| 42 | +- "setnandbootenv=echo Booting from nand ...; " \ |
| 43 | +- "setenv bootenvroot ${nandroot}; " \ |
| 44 | +- "setenv bootenvrootfstype ${nandrootfstype}; " \ |
| 45 | +- "setenv bootenvloadimage ${nandloadimage}\0" |
| 46 | ++ "mtdids="CONFIG_MTDIDS_DEFAULT "\0" \ |
| 47 | ++ "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" |
| 48 | + |
| 49 | + #define CONFIG_BOOTCOMMAND \ |
| 50 | +- "if test -n ${bootenv} && usb start; then " \ |
| 51 | +- "if run loadbootenv; then " \ |
| 52 | +- "echo Loaded environment ${bootenv} from usb;" \ |
| 53 | +- "run importbootenv;" \ |
| 54 | +- "fi;" \ |
| 55 | +- "if test -n ${bootenvcmd}; then " \ |
| 56 | +- "echo Running bootenvcmd ...;" \ |
| 57 | +- "run bootenvcmd;" \ |
| 58 | +- "fi;" \ |
| 59 | +- "fi;" \ |
| 60 | +- "run setnandbootenv subbootcmd;" |
| 61 | ++ "ubi part ubi; " \ |
| 62 | ++ "ubi read 0x800000 kernel; " \ |
| 63 | ++ "bootm 0x800000" |
| 64 | + |
| 65 | + #endif /* _CONFIG_DNS325_H */ |
0 commit comments