uboot-kirkwood: add support for Zyxel NSA310S
[openwrt/openwrt.git] / package / boot / uboot-kirkwood / patches / 160-nsa310s.patch
1 --- a/configs/nsa310s_defconfig
2 +++ b/configs/nsa310s_defconfig
3 @@ -5,7 +5,7 @@ CONFIG_KIRKWOOD=y
4 CONFIG_SYS_TEXT_BASE=0x600000
5 CONFIG_TARGET_NSA310S=y
6 CONFIG_ENV_SIZE=0x20000
7 -CONFIG_ENV_OFFSET=0xE0000
8 +CONFIG_ENV_OFFSET=0xC0000
9 CONFIG_NR_DRAM_BANKS=2
10 CONFIG_BOOTDELAY=3
11 CONFIG_USE_PREBOOT=y
12 @@ -25,7 +25,7 @@ CONFIG_CMD_EXT2=y
13 CONFIG_CMD_FAT=y
14 CONFIG_CMD_JFFS2=y
15 CONFIG_CMD_MTDPARTS=y
16 -CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100000@0x100000(second_stage_uboot),-@0x200000(root)"
17 +CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0xc0000@0x0(uboot),0x80000@0xc0000(uboot_env),-@0x140000(ubi)"
18 CONFIG_CMD_UBI=y
19 CONFIG_ISO_PARTITION=y
20 CONFIG_ENV_IS_IN_NAND=y
21 --- a/include/configs/nsa310s.h
22 +++ b/include/configs/nsa310s.h
23 @@ -30,22 +30,17 @@
24
25 /* default environment variables */
26 #define CONFIG_BOOTCOMMAND \
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 + "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
36 + "ubi part ubi; " \
37 + "ubifsmount ubi:rootfs; " \
38 + "ubi read 0x800000 kernel; " \
39 + "bootm 0x800000"
40
41 #define CONFIG_EXTRA_ENV_SETTINGS \
42 - "console=console=ttyS0,115200\0" \
43 - "mtdids=nand0=orion_nand\0" \
44 - "mtdparts="CONFIG_MTDPARTS_DEFAULT \
45 - "kernel=/boot/zImage\0" \
46 - "fdt=/boot/nsa310s.dtb\0" \
47 - "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0"
48 + "console=console=ttyS0,115200\0" \
49 + "mtdids=nand0=orion_nand\0" \
50 + "mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" \
51 + "bootargs_root=\0"
52
53 /* Ethernet driver configuration */
54 #ifdef CONFIG_CMD_NET