add ext4,vfat and tar.bz2
[u-tools.git] / u-tools / apps / usbinit / disk_layout.c
blobeb777857d4112919ddfb7f26a79b44a41ecba795
1 /* liu note (not use andriod libcutils)can use linux script read disk_layout.conf gen this source file!!! visual will do it */
2 #if 0
3 device {
4 path /dev/block/mmcblk0
6 scheme mbr
8 # bytes in a disk sector (== 1 LBA), must be a power of 2!
9 sector_size 512
11 # What LBA should the partitions start at?
12 start_lba 20000
14 # Autodetect disk size if == 0
15 num_lba 0
17 partitions {
19 recovery {
20 active y
21 type linux
22 len 128M
26 cache {
27 type linux
28 len 51M
31 system {
32 type linux
33 len 128M
36 data {
37 type linux
38 len 128M
41 third_party {
42 type linux
43 len -1
49 struct disk_info {
50 char *device;
51 uint8_t scheme;
52 int sect_size; /* expected sector size in bytes. MUST BE POWER OF 2 */
53 uint32_t skip_lba; /* in sectors (1 unit of LBA) */
54 uint32_t num_lba; /* the size of the disk in LBA units */
55 struct part_info *part_lst;
56 int num_parts;
59 struct part_info {
60 char *name;
61 uint8_t flags;
62 uint8_t type;
63 uint32_t len_kb; /* in 1K-bytes */
64 uint32_t start_lba; /* the LBA where this partition begins */
67 #endif
69 #include "diskconfig.h"
71 #ifndef SOC_OMAP3
72 struct part_info mypart_info[/*5*/] = {
73 {.name = "system",
74 .flags = PART_ACTIVE_FLAG,
75 .type = PC_PART_TYPE_LINUX,
76 .len_kb = 256*1024,//256 * 1024 *1024/1024
79 {.name = "recovery",
80 .type = PC_PART_TYPE_LINUX,
81 .len_kb = 256*1024,//256 * 1024 *1024/1024
84 {.name = "cache",
85 .type = PC_PART_TYPE_LINUX,
86 .len_kb = 128*1024, //51 * 1024 *1024/1024
89 {.name = "data",
90 .type = PC_PART_TYPE_LINUX /*PC_PART_TYPE_DOS*/,
91 #ifdef SOC_SIRF_PRIMA
92 .len_kb = -1,/*128 * 1024 *1024/1024*/
93 #else
94 .len_kb = 1024*1024,/*128 * 1024 *1024/1024*/
95 #endif
97 }/*,
98 {.name = "other",
99 .type = PC_PART_TYPE_LINUX,
100 .len_kb = -1
104 struct disk_info mydisk_info = {
105 .device = "/dev/mmcblk0",
106 .scheme = PART_SCHEME_MBR,
107 .sect_size = 512,
108 .num_lba = 0,
109 .skip_lba = 20000,
110 /*.part_lst = &mypart_info,*/
111 .num_parts = /*5*/4
113 #else
114 /* for omap3evm |fat32,Ext3,fat32| */
115 struct part_info mypart_info[/*5*/] = {
116 {.name = "install",
117 .flags = PART_ACTIVE_FLAG,
118 .type = PC_PART_TYPE_DOS,
119 .len_kb = 256*1024,//256 * 1024 *1024/1024
122 {.name = "system",
123 .type = PC_PART_TYPE_LINUX,
124 .len_kb = 256*1024,//256 * 1024 *1024/1024
127 {.name = "data",
128 .type = /*PC_PART_TYPE_LINUX*/ PC_PART_TYPE_DOS,
130 .len_kb = -1,/*128 * 1024 *1024/1024*/
132 }/*,
133 {.name = "other",
134 .type = PC_PART_TYPE_LINUX,
135 .len_kb = -1
139 struct disk_info mydisk_info = {
140 .device = "/dev/mmcblk0", /* install dest dev */
141 .scheme = PART_SCHEME_MBR,
142 .sect_size = 512,
143 .num_lba = 0,
144 .skip_lba = /*20000*/1024*2,
145 /*.part_lst = &mypart_info,*/
146 .num_parts = /*5*/3
149 #endif