summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/patches-2.6.30/9991-drivers-mtd-maps-openwrt.patch
blob: fe413d990c25bfffa828000f7c3dd0afda58b30f (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
--- files/drivers/mtd/maps/rtl819x_flash.c	2013-05-10 23:08:00.000000000 +0300
+++ files.old/drivers/mtd/maps/rtl819x_flash.c	2013-05-10 15:34:50.000000000 +0300
@@ -164,45 +164,39 @@
         },
 };
 
-#elif defined( CONFIG_ROOTFS_SQUASH )
-#ifndef CONFIG_RTL_FLASH_DUAL_IMAGE_ENABLE
-static struct mtd_partition rtl8196_parts1[] = {
-        {
-                name: "boot+cfg+linux",
-                size:           (CONFIG_RTL_ROOT_IMAGE_OFFSET-0),
-                offset:         0x00000000,
-        },
-        {
-                name:           "root fs",  
-#ifdef CONFIG_RTL_TWO_SPI_FLASH_ENABLE
-#ifdef CONFIG_MTD_CONCAT
-                size:        (CONFIG_RTL_SPI_FLASH1_SIZE+CONFIG_RTL_SPI_FLASH2_SIZE-CONFIG_RTL_ROOT_IMAGE_OFFSET),
-#else
-		  size:        (CONFIG_RTL_SPI_FLASH1_SIZE-CONFIG_RTL_ROOT_IMAGE_OFFSET),
-#endif
-#else
-#if !defined(CONFIG_MTD_CHAR)
-                size:        (CONFIG_RTL_FLASH_SIZE-CONFIG_RTL_ROOT_IMAGE_OFFSET),
-#else
-		size:        (CONFIG_RTL_FLATFS_IMAGE_OFFSET-CONFIG_RTL_ROOT_IMAGE_OFFSET),
-#endif                	
-#endif
-                offset:         (CONFIG_RTL_ROOT_IMAGE_OFFSET),
-        }
-#if defined(CONFIG_MTD_CHAR)   
-	,     
-          {
-                name:           "flatfs",  
-
-                size:        (CONFIG_RTL_FLASH_SIZE-CONFIG_RTL_FLATFS_IMAGE_OFFSET),
-                offset:         (CONFIG_RTL_FLATFS_IMAGE_OFFSET),
-        }
-#endif        
-        
-        
-        
-};
-
+#elif defined( CONFIG_ROOTFS_SQUASH )
+#ifndef CONFIG_RTL_FLASH_DUAL_IMAGE_ENABLE
+static struct mtd_partition rtl8196_parts1[] = {
+        {
+                name: "boot+cfg",
+                size:           (CONFIG_RTL_LINUX_IMAGE_OFFSET - 0),
+                offset:         0x00000000,
+        },
+        {
+                name: "kernel",
+                size:           (CONFIG_RTL_ROOT_IMAGE_OFFSET - CONFIG_RTL_LINUX_IMAGE_OFFSET),
+                offset:         CONFIG_RTL_LINUX_IMAGE_OFFSET,
+        },
+        {
+                name:           "rootfs",
+#ifdef CONFIG_RTL_TWO_SPI_FLASH_ENABLE
+#ifdef CONFIG_MTD_CONCAT
+                size:        (CONFIG_RTL_SPI_FLASH1_SIZE + CONFIG_RTL_SPI_FLASH2_SIZE - CONFIG_RTL_ROOT_IMAGE_OFFSET),
+#else
+		  size:        (CONFIG_RTL_SPI_FLASH1_SIZE - CONFIG_RTL_ROOT_IMAGE_OFFSET),
+#endif
+#else
+                size:        (CONFIG_RTL_FLASH_SIZE - CONFIG_RTL_ROOT_IMAGE_OFFSET),
+#endif
+                offset:         CONFIG_RTL_ROOT_IMAGE_OFFSET,
+        },
+        {
+                name: "firmware",
+                size:           (CONFIG_RTL_FLASH_SIZE - CONFIG_RTL_LINUX_IMAGE_OFFSET),
+                offset:         CONFIG_RTL_LINUX_IMAGE_OFFSET,
+        },
+};
+
 #else //!CONFIG_RTL_FLASH_DUAL_IMAGE_ENABLE
 static struct mtd_partition rtl8196_parts1[] = {
         {