Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Developers have long tried to sqeeze in ROMs into legacy devices with low internal memory, and one of the ways to do this was by using custom tailored mtd_parts, which gave the kernel a partition table to use, with resized partitions. This was widely used on many devices like the HTC G1, MT3G, Hero, Evo4G, Desire, etc. While that was a viable option for the HTC Pico, a small "problem" that popped up was that different phones have different NAND Devices, with different partition tables and pagesizes. Incase the modified custom mtd_parts even *accidentally* touched the boot partition, or has been offset'ed out of the available space, a partition would be *lost*. As a solution, dynamically obtain 32 mB from userdata partition, and 48 mB from the cache partition, and hax the partition table as soon as the information is got from ATAG. This should make this method work on *almost* all Pico's out there, which have partition layouts as misc:recovery:boot:system:cache:userdata:devlog and partitions in the order misc:rec..cache:devlog:userdata. Enable PICO_NAND_RESIZE_PART in defconfigs. PS1: initial, add logging PS2: add the hax PS3: remove logging from mtdpart.c PS4: remove notes for self PS5: whitespace fix PS6: unbloat code PS7: unbloat code (again) PS8: Add KConfig option Change-Id: I2d1eefa72ded09cf48b8f649da812c4d4a5ffb15 Signed-off-by: Vineeth Raj <contact.twn@opmbx.org>
- Loading branch information