dnsmasq: bump to 2.71
[openwrt/openwrt.git] / package / boot / uboot-kirkwood / patches / 0001-kirkwood-ib62x0-use-device-tree-and-update-config.patch
1 From 2701517a2bbf17544b408738438b0dd17718d4dd Mon Sep 17 00:00:00 2001
2 From: Luka Perkov <luka@openwrt.org>
3 Date: Wed, 14 Nov 2012 23:32:55 +0100
4 Subject: [PATCH] kirkwood: ib62x0: use device tree and update config
5
6 Signed-off-by: Luka Perkov <luka@openwrt.org>
7 CC: Prafulla Wadaskar <prafulla@marvell.com>
8 ---
9 v1->v2:
10
11 * keep CONFIG_MACH_TYPE define for backwards compatibility
12 ---
13 http://patchwork.ozlabs.org/patch/287388/
14 Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
15 ---
16 include/configs/ib62x0.h | 38 +++++++++++++++++++++++---------------
17 1 file changed, 23 insertions(+), 15 deletions(-)
18
19 --- a/include/configs/ib62x0.h
20 +++ b/include/configs/ib62x0.h
21 @@ -28,6 +28,11 @@
22 #define CONFIG_MACH_TYPE MACH_TYPE_NAS6210
23
24 /*
25 + * Enable device tree support
26 + */
27 +#define CONFIG_OF_LIBFDT
28 +
29 +/*
30 * Compression configuration
31 */
32 #define CONFIG_BZIP2
33 @@ -41,6 +46,7 @@
34 #define CONFIG_SYS_MVFS
35 #include <config_cmd_default.h>
36 #define CONFIG_CMD_ENV
37 +#define CONFIG_CMD_BOOTZ
38 #define CONFIG_CMD_IDE
39 #define CONFIG_CMD_MII
40 #define CONFIG_CMD_NAND
41 @@ -66,7 +72,7 @@
42 #define CONFIG_ENV_IS_NOWHERE
43 #endif
44 #define CONFIG_ENV_SIZE 0x20000
45 -#define CONFIG_ENV_OFFSET 0x80000
46 +#define CONFIG_ENV_OFFSET 0xe0000
47
48 /*
49 * Default environment variables
50 @@ -74,24 +80,26 @@
51 #define CONFIG_BOOTCOMMAND \
52 "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; " \
53 "ubi part root; " \
54 - "ubifsmount ubi:root; " \
55 + "ubifsmount ubi:rootfs; " \
56 "ubifsload 0x800000 ${kernel}; " \
57 - "ubifsload 0x1100000 ${initrd}; " \
58 - "bootm 0x800000 0x1100000"
59 -
60 -#define CONFIG_MTDPARTS \
61 - "mtdparts=orion_nand:" \
62 - "0x80000@0x0(uboot)," \
63 - "0x20000@0x80000(uboot_env)," \
64 - "-@0xa0000(root)\0"
65 + "ubifsload 0x700000 ${fdt}; " \
66 + "ubifsumount; " \
67 + "fdt addr 0x700000; fdt resize; fdt chosen; " \
68 + "bootz 0x800000 - 0x700000"
69 +
70 +#define CONFIG_MTDPARTS \
71 + "mtdparts=orion_nand:" \
72 + "0xe0000@0x0(uboot)," \
73 + "0x20000@0xe0000(uboot_env)," \
74 + "-@0x100000(root)\0"
75
76 -#define CONFIG_EXTRA_ENV_SETTINGS \
77 +#define CONFIG_EXTRA_ENV_SETTINGS \
78 "console=console=ttyS0,115200\0" \
79 "mtdids=nand0=orion_nand\0" \
80 "mtdparts="CONFIG_MTDPARTS \
81 - "kernel=/boot/uImage\0" \
82 - "initrd=/boot/uInitrd\0" \
83 - "bootargs_root=ubi.mtd=2 root=ubi0:root rootfstype=ubifs\0"
84 + "kernel=/boot/zImage\0" \
85 + "fdt=/boot/ib62x0.dtb\0" \
86 + "bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
87
88 /*
89 * Ethernet driver configuration