Set partition layout for original Fairphone 1.

The partition definitions were set based on the values returned by
"/proc/dumchar_info" in a running official kernel (which are not exactly
the same that should appear in the partition definitions; the addresses
are slightly changed when output, as can be seen in "dumchar.c") and
ptgen.pl source code. The previous partition definitions were probably
intended for a Fairphone 1 with unified partitions, although I do not
have one to check it.

The size for the FAT partition was not really needed to be set, as
dum-char module ignores it and always assigns the remaining space from
the start of the partition. Anyway, it was just set for consistency.

On the other hand, the proper value for MTK_SHARED_SDCARD must be set in
ProjectConfig.mk, as whether it is defined or not affects how dum-char
and the USB gadget are built.

Only those files used by the kernel were updated; other files in the
MediaTek tree that store partition layout information but are not used
by the kernel were just ignored.
parent 90dd59b3
......@@ -984,7 +984,7 @@ MTK_SEND_RR_SUPPORT=yes
MTK_SENSOR_SUPPORT=yes
# sdcard will be a folder of /data
MTK_SHARED_SDCARD=yes
MTK_SHARED_SDCARD=no
# A mechanism for customer to enable their own sign key.
MTK_SIGNATURE_CUSTOMIZATION=no
......
......@@ -24,10 +24,12 @@
#define PART_SEC_RO "SEC_RO"
#define PART_MISC "MISC"
#define PART_LOGO "LOGO"
#define PART_EBR2 "EBR2"
#define PART_EXPDB "EXPDB"
#define PART_ANDROID "ANDROID"
#define PART_CACHE "CACHE"
#define PART_USRDATA "USRDATA"
#define PART_FAT "FAT"
#define PART_BMTPOOL "BMTPOOL"
/*preloader re-name*/
#define PART_SECURE "SECURE"
......@@ -59,14 +61,16 @@
#define PART_OFFSET_SEC_RO (0x3380000)
#define PART_SIZE_MISC (512*KB)
#define PART_SIZE_LOGO (3072*KB)
#define PART_SIZE_EBR2 (512*KB)
#define PART_SIZE_EXPDB (10240*KB)
#define PART_SIZE_ANDROID (665600*KB)
#define PART_SIZE_CACHE (129024*KB)
#define PART_SIZE_USRDATA (1048576*KB)
#define PART_SIZE_FAT (13618816*KB)
#define PART_SIZE_BMTPOOL (0xa8)
#define PART_NUM 20
#define PART_NUM 22
......
......@@ -16,10 +16,12 @@ struct excel_info PartInfo[PART_NUM]={
{"sec_ro",6291456,0x3380000, EMMC, 4,USER},
{"misc",524288,0x3980000, EMMC, 0,USER},
{"logo",3145728,0x3a00000, EMMC, 0,USER},
{"expdb",10485760,0x3d00000, EMMC, 0,USER},
{"android",681574400,0x4700000, EMMC, 5,USER},
{"cache",132120576,0x2d100000, EMMC, 6,USER},
{"usrdata",1073741824,0x34f00000, EMMC, 7,USER},
{"ebr2",524288,0x3d00000, EMMC, 0,USER},
{"expdb",10485760,0x3d80000, EMMC, 0,USER},
{"android",681574400,0x4780000, EMMC, 5,USER},
{"cache",132120576,0x2d180000, EMMC, 6,USER},
{"usrdata",1073741824,0x34f80000, EMMC, 7,USER},
{"fat",13945667584,0x74f80000, EMMC, 8,USER},
{"bmtpool",22020096,0xFFFF00a8, EMMC, 0,USER},
};
EXPORT_SYMBOL(PartInfo);
......@@ -28,6 +30,7 @@ EXPORT_SYMBOL(PartInfo);
struct MBR_EBR_struct MBR_EBR_px[MBR_COUNT]={
{"mbr", {1, 2, 3, 4, }},
{"ebr1", {5, 6, 7, }},
{"ebr2", {8, }},
};
EXPORT_SYMBOL(MBR_EBR_px);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment