aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/linux/linux-2.6.30/at91/linux-2.6.30-001-configurable-partition-size.patch.patch
blob: ae24d12d1deeaff446df00b501e72af5e80f8d80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/board-at572d940hf_ek.c linux-2.6.30/arch/arm/mach-at91/board-at572d940hf_ek.c
--- linux-2.6.30-0rig/arch/arm/mach-at91/board-at572d940hf_ek.c	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/board-at572d940hf_ek.c	2010-03-14 11:28:55.000000000 +0100
@@ -114,10 +114,20 @@
  */
 static struct mtd_partition __initdata eb_nand_partition[] = {
 	{
-		.name	= "Partition 1",
-		.offset	= 0,
+		.name   = "Bootstrap",
+		.offset = 0,
+		.size   = 4 * SZ_1M,
+	},
+	{
+		.name	= "Root File System",
+		.offset	= MTDPART_OFS_NXTBLK,
+		.size	= CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+	},
+	{
+		.name	= "Data",
+		.offset	= MTDPART_OFS_NXTBLK,
 		.size	= MTDPART_SIZ_FULL,
-	}
+	},
 };
 
 static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/board-cap9adk.c linux-2.6.30/arch/arm/mach-at91/board-cap9adk.c
--- linux-2.6.30-0rig/arch/arm/mach-at91/board-cap9adk.c	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/board-cap9adk.c	2010-03-14 11:28:36.000000000 +0100
@@ -167,8 +167,18 @@
  */
 static struct mtd_partition __initdata cap9adk_nand_partitions[] = {
 	{
-		.name	= "NAND partition",
-		.offset	= 0,
+		.name   = "Bootstrap",
+		.offset = 0,
+		.size   = 4 * SZ_1M,
+	},
+	{
+		.name	= "Root File System",
+		.offset	= MTDPART_OFS_NXTBLK,
+		.size	= CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+	},
+	{
+		.name	= "Data",
+		.offset	= MTDPART_OFS_NXTBLK,
 		.size	= MTDPART_SIZ_FULL,
 	},
 };
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/board-dk.c linux-2.6.30/arch/arm/mach-at91/board-dk.c
--- linux-2.6.30-0rig/arch/arm/mach-at91/board-dk.c	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/board-dk.c	2010-03-14 11:28:43.000000000 +0100
@@ -314,8 +314,18 @@
 
 static struct mtd_partition __initdata dk_nand_partition[] = {
 	{
-		.name	= "NAND Partition 1",
-		.offset	= 0,
+		.name   = "Bootstrap",
+		.offset = 0,
+		.size   = 4 * SZ_1M,
+	},
+	{
+		.name	= "Root File System",
+		.offset	= MTDPART_OFS_NXTBLK,
+		.size	= CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+	},
+	{
+		.name	= "Data",
+		.offset	= MTDPART_OFS_NXTBLK,
 		.size	= MTDPART_SIZ_FULL,
 	},
 };
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9260ek.c linux-2.6.30/arch/arm/mach-at91/board-sam9260ek.c
--- linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9260ek.c	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/board-sam9260ek.c	2010-03-14 11:26:57.000000000 +0100
@@ -177,12 +177,17 @@
  */
 static struct mtd_partition __initdata ek_nand_partition[] = {
 	{
-		.name	= "Partition 1",
-		.offset	= 0,
-		.size	= SZ_256K,
+		.name   = "Bootstrap",
+		.offset = 0,
+		.size   = 4 * SZ_1M,
 	},
 	{
-		.name	= "Partition 2",
+		.name	= "Root File System",
+		.offset	= MTDPART_OFS_NXTBLK,
+		.size	= CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+	},
+	{
+		.name	= "Data",
 		.offset	= MTDPART_OFS_NXTBLK,
 		.size	= MTDPART_SIZ_FULL,
 	},
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9261ek.c linux-2.6.30/arch/arm/mach-at91/board-sam9261ek.c
--- linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9261ek.c	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/board-sam9261ek.c	2010-03-14 11:26:57.000000000 +0100
@@ -184,12 +184,17 @@
  */
 static struct mtd_partition __initdata ek_nand_partition[] = {
 	{
-		.name	= "Partition 1",
-		.offset	= 0,
-		.size	= SZ_256K,
+		.name   = "Bootstrap",
+		.offset = 0,
+		.size   = 4 * SZ_1M,
 	},
 	{
-		.name	= "Partition 2",
+		.name	= "Root File System",
+		.offset	= MTDPART_OFS_NXTBLK,
+		.size	= CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+	},
+	{
+		.name	= "Data",
 		.offset	= MTDPART_OFS_NXTBLK,
 		.size	= MTDPART_SIZ_FULL,
 	},
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9263ek.c linux-2.6.30/arch/arm/mach-at91/board-sam9263ek.c
--- linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9263ek.c	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/board-sam9263ek.c	2010-03-14 11:26:57.000000000 +0100
@@ -174,12 +174,17 @@
  */
 static struct mtd_partition __initdata ek_nand_partition[] = {
 	{
-		.name	= "Partition 1",
-		.offset	= 0,
-		.size	= SZ_64M,
+		.name   = "Bootstrap",
+		.offset = 0,
+		.size   = 4 * SZ_1M,
 	},
 	{
-		.name	= "Partition 2",
+		.name	= "Root File System",
+		.offset	= MTDPART_OFS_NXTBLK,
+		.size	= CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+	},
+	{
+		.name	= "Data",
 		.offset	= MTDPART_OFS_NXTBLK,
 		.size	= MTDPART_SIZ_FULL,
 	},
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c linux-2.6.30/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c
--- linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/board-sam9g20ek-2slot-mmc.c	2010-03-14 11:28:29.000000000 +0100
@@ -130,12 +130,12 @@
 		.size   = 4 * SZ_1M,
 	},
 	{
-		.name	= "Partition 1",
+		.name	= "Root File System",
 		.offset	= MTDPART_OFS_NXTBLK,
-		.size	= 60 * SZ_1M,
+		.size	= CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
 	},
 	{
-		.name	= "Partition 2",
+		.name	= "Data",
 		.offset	= MTDPART_OFS_NXTBLK,
 		.size	= MTDPART_SIZ_FULL,
 	},
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9g20ek.c linux-2.6.30/arch/arm/mach-at91/board-sam9g20ek.c
--- linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9g20ek.c	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/board-sam9g20ek.c	2010-03-14 11:26:57.000000000 +0100
@@ -129,12 +129,12 @@
 		.size   = 4 * SZ_1M,
 	},
 	{
-		.name	= "Partition 1",
+		.name	= "Root File System",
 		.offset	= MTDPART_OFS_NXTBLK,
-		.size	= 60 * SZ_1M,
+		.size	= CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
 	},
 	{
-		.name	= "Partition 2",
+		.name	= "Data",
 		.offset	= MTDPART_OFS_NXTBLK,
 		.size	= MTDPART_SIZ_FULL,
 	},
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9m10g45ek.c linux-2.6.30/arch/arm/mach-at91/board-sam9m10g45ek.c
--- linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9m10g45ek.c	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/board-sam9m10g45ek.c	2010-03-14 11:26:57.000000000 +0100
@@ -133,12 +133,17 @@
  */
 static struct mtd_partition __initdata ek_nand_partition[] = {
 	{
-		.name	= "Partition 1",
-		.offset	= 0,
-		.size	= SZ_64M,
+		.name   = "Bootstrap",
+		.offset = 0,
+		.size   = 4 * SZ_1M,
 	},
 	{
-		.name	= "Partition 2",
+		.name	= "Root File System",
+		.offset	= MTDPART_OFS_NXTBLK,
+		.size	= CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+	},
+	{
+		.name	= "Data",
 		.offset	= MTDPART_OFS_NXTBLK,
 		.size	= MTDPART_SIZ_FULL,
 	},
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9rlek.c linux-2.6.30/arch/arm/mach-at91/board-sam9rlek.c
--- linux-2.6.30-0rig/arch/arm/mach-at91/board-sam9rlek.c	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/board-sam9rlek.c	2010-03-14 11:26:57.000000000 +0100
@@ -83,12 +83,17 @@
  */
 static struct mtd_partition __initdata ek_nand_partition[] = {
 	{
-		.name	= "Partition 1",
-		.offset	= 0,
-		.size	= SZ_256K,
+		.name   = "Bootstrap",
+		.offset = 0,
+		.size   = 4 * SZ_1M,
 	},
 	{
-		.name	= "Partition 2",
+		.name	= "Root File System",
+		.offset	= MTDPART_OFS_NXTBLK,
+		.size	= CONFIG_MTD_NAND_ATMEL_ROOTFS_SIZE * SZ_1M,
+	},
+	{
+		.name	= "Data",
 		.offset	= MTDPART_OFS_NXTBLK,
 		.size	= MTDPART_SIZ_FULL,
 	},
diff -urN linux-2.6.30-0rig/arch/arm/mach-at91/Kconfig linux-2.6.30/arch/arm/mach-at91/Kconfig
--- linux-2.6.30-0rig/arch/arm/mach-at91/Kconfig	2010-03-14 11:13:34.000000000 +0100
+++ linux-2.6.30/arch/arm/mach-at91/Kconfig	2010-03-14 11:32:54.000000000 +0100
@@ -96,6 +96,7 @@
 config ARCH_AT91RM9200DK
 	bool "Atmel AT91RM9200-DK Development board"
 	depends on ARCH_AT91RM9200
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using Atmel's AT91RM9200-DK Development board.
 	  (Discontinued)
@@ -213,6 +214,7 @@
 config MACH_AT91SAM9260EK
 	bool "Atmel AT91SAM9260-EK / AT91SAM9XE Evaluation Kit"
 	depends on ARCH_AT91SAM9260
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using Atmel's AT91SAM9260-EK or AT91SAM9XE Evaluation Kit
 	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3933>
@@ -278,6 +280,7 @@
 config MACH_AT91SAM9261EK
 	bool "Atmel AT91SAM9261-EK Evaluation Kit"
 	depends on ARCH_AT91SAM9261
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using Atmel's AT91SAM9261-EK Evaluation Kit.
 	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3820>
@@ -293,6 +296,7 @@
 config MACH_AT91SAM9G10EK
 	bool "Atmel AT91SAM9G10-EK Evaluation Kit"
 	depends on ARCH_AT91SAM9G10
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using Atmel's AT91SAM9G10-EK Evaluation Kit.
 	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4588>
@@ -308,6 +312,7 @@
 config MACH_AT91SAM9263EK
 	bool "Atmel AT91SAM9263-EK Evaluation Kit"
 	depends on ARCH_AT91SAM9263
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using Atmel's AT91SAM9263-EK Evaluation Kit.
 	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4057>
@@ -350,6 +355,7 @@
 config MACH_AT91SAM9RLEK
 	bool "Atmel AT91SAM9RL-EK Evaluation Kit"
 	depends on ARCH_AT91SAM9RL
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using Atmel's AT91SAM9RL-EK Evaluation Kit.
 
@@ -364,6 +370,7 @@
 config MACH_AT91SAM9G20EK
 	bool "Atmel AT91SAM9G20-EK Evaluation Kit"
 	depends on ARCH_AT91SAM9G20
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using Atmel's AT91SAM9G20-EK Evaluation Kit
 	  that embeds only one SD/MMC slot.
@@ -371,6 +378,7 @@
 config MACH_AT91SAM9G20EK_2MMC
 	bool "Atmel AT91SAM9G20-EK Evaluation Kit with 2 SD/MMC Slots"
 	depends on ARCH_AT91SAM9G20
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
 	  with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and
@@ -408,6 +416,7 @@
 config MACH_AT91SAM9G45EKES
 	bool "Atmel AT91SAM9G45-EKES Evaluation Kit"
 	depends on ARCH_AT91SAM9G45
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit.
 	  "ES" at the end of the name means that this board is an
@@ -424,6 +433,7 @@
 config MACH_AT91SAM9M10EKES
         bool "Atmel AT91SAM9M10-EKES Evaluation Kit"
         depends on ARCH_AT91SAM9M10
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
         help
           Select this if you are using Atmel's AT91SAM9M10-EKES Evaluation Kit.
           "ES" at the end of the name means that this board is an
@@ -440,6 +450,7 @@
 config MACH_AT91CAP9ADK
 	bool "Atmel AT91CAP9A-DK Evaluation Kit"
 	depends on ARCH_AT91CAP9
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using Atmel's AT91CAP9A-DK Evaluation Kit.
 	  <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4138>
@@ -455,6 +466,7 @@
 config MACH_AT572D940HFEB
 	bool "AT572D940HF-EK"
 	depends on ARCH_AT572D940HF
+	select MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
 	help
 	  Select this if you are using Atmel's AT572D940HF-EK evaluation kit.
 	  <http://www.atmel.com/products/diopsis/default.asp>
@@ -494,6 +506,24 @@
 	  On AT91SAM926x boards both types of NAND flash can be present
 	  (8 and 16 bit data bus width).
 
+config MTD_NAND_ATMEL_ROOTFS_SIZE
+	int "Size NAND rootfs in MB"
+	range 8 250
+	depends on MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+	default "124"
+	help
+	  Many Atmel development boards has a NAND Flash, 
+	  divided into three partitions.
+          1) Boot partition (4 MB)
+	  2) Root FS
+	  3) Data partition
+	  This allows you to configure the size of the root fs
+	  with the remainder ending up in the data partition.
+	  The legal values are between 8 and 250
+
+config MTD_NAND_ALLOW_CONFIGURABLE_ROOTFS_SIZE
+	bool
+
 # ----------------------------------------------------------
 
 comment "AT91 Feature Selections"