Le lundi 11 janvier 2016 20:33:28 UTC+1, Alexandre Lissy a écrit :
>
> That's not B2G specific, this is Android build system magic. You need to
> play with the modules stuff in makefiles. Have a look at
> gonk-misc/Android.mk for example, that will give you a good short
> example of code being put to boot and system partitions.
This is what I was fearing as gonk-misc/Android.mk was indeed a candidate file
listed by grep -r system.img... OK, I'll try to look at this. Thanks for
confirming that magic relies here ;-)
> I don't know what you mean related to custpack. The trick on this topic
> was that there was some empty space in the GPT partition layout (defined
> by gpt_main0.bin) so we could move the starting (or the ending, I don't
> recall precisely) of the system partition.
What I was meaning is that on Fire E device, Gecko and Gaia files aren't solely
stored on system partition, but spread across both system and custpack
partitions.
In the cited BR [1], Flame device was running out of space for FOTA. The
adopted solution was altering the partition layout to recover empty space here
and there in order to increase the size of system partition.
Looking at Flame device's v18D gpt_main0.bin with a hex editor, I've noticed
that the listed partitions were exactly the same (and in the same order) than
on Fire E device. So, since Fire E device is using both system and custpack
partitions to store Gecko and Gaia files, I was wondering if, rather than
increasing Flame device's system partition, also using system and custpack
partitions to store Gecko and Gaia files would have been possible.
I don't own a Flame device, so can't be sure of the exact partition layout
there. Hence my above question ;-) But I know for sure that, before being
increased to 419.5MiB, the size of system partition was exactly the same for
Flame and Fire E devices: 377MB (737280 sectors). On Fire E device, custpack
partition is 210MB (409600 sectors) in size. So total amount to store Gecko and
Gaia files on Fire E device is 587MB, far bigger than 419.5MiB of new Flame
device's system partition. If custpack partition is as big on Flame device than
on Fire E device, using it to store Gecko and Gaia files in conjuction with
system partition would also have solved the space issue for FOTA, without
having to touch the original partition layout. But once again, I don't own a
Flame device, so only wanted to know if such a strategy would have been a
viable alternative to partition resizing.
> Now, you need to be 10000% sure that you have exactly the same layout.
> How did you checked the partition layout of Fire E ? Does that does to
> being close even in term of partitions sizes, starting/ending blocks?
I got partition layout on Fire E using ClockWorkMod recovery and then parted in
adb shell:
Model: MMC N5XZMB (sd/mmc)
Disk /dev/block/mmcblk0: 7634944s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 16384s 147455s 131072s fat16 modem
2 147456s 148479s 1024s sbl1
3 148480s 148735s 256s sdi
4 163840s 163903s 64s DDR
5 180224s 181247s 1024s aboot
6 181248s 182247s 1000s rpm
7 196608s 227327s 30720s boot
8 229376s 230375s 1000s tz
9 230376s 232423s 2048s pad
10 232424s 235495s 3072s modemst1
11 235496s 238567s 3072s modemst2
12 245760s 983039s 737280s ext4 system
13 983040s 1048575s 65536s ext4 persist
14 1048576s 1196031s 147456s ext4 cache
15 1196032s 1226751s 30720s recovery
16 1228800s 1230847s 2048s misc
17 1245184s 1248255s 3072s fsg
18 1261568s 1261569s 2s fsc
19 1261570s 1261585s 16s ssd
20 1261586s 1282065s 20480s splash
21 1282066s 1284113s 2048s traceability
22 1284114s 1286161s 2048s tuningpara
23 1286162s 1289233s 3072s studypara1
24 1289234s 1292305s 3072s studypara2
25 1292306s 1295377s 3072s studypara3
26 1295378s 1295889s 512s secro
27 1295890s 1295909s 20s fota
28 1295910s 1296933s 1024s abootbk
29 1296934s 1297933s 1000s rpmbk
30 1297934s 1298933s 1000s tzbk
31 1298934s 1708533s 409600s ext4 custpack
32 1720320s 3948543s 2228224s ext4 userdata
33 3948544s 7618525s 3669982s fat32 usbmsc
Partition's starting/ending blocks may differ, but while their size keeps the
same between Flame and Fire E devices, you're on safe way. Furthermore, from
branch v2.0's device-flame/BoardConfig.mk (i.e. before partition layout
change), BOARD_BOOTIMAGE_PARTITION_SIZE, BOARD_SYSTEMIMAGE_PARTITION_SIZE and
BOARD_CACHEIMAGE_PARTITION_SIZE all match the corresponding partition size of
Fire E device. Only BOARD_USERDATAIMAGE_PARTITION_SIZE is twice the size on
Flame device, but that's not related to Gecko and Gaia files.
Émeric
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1085230
_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos