Support ChromeOS partition table and kernel partition
Stock bootloader on these devices boots kernel (it is intended to boot kernel, but i place secondary bootloader there) from special ChromeOS kernel partition on special GPT which is created with cgpt
utility. This MR adds initial support for it introducing new deviceinfo options:
-
cgpt_kpart
- path to file to be flashed to ChromeOS partition; -
cgpt_kpart_start
- offset from the start in sectors; -
cgpt_kpart_size
- partition size in sectors.
For example:
deviceinfo_cgpt_kpart="/usr/share/u-boot/google-peach-pit/u-boot-dtb.img.kpart"
deviceinfo_cgpt_kpart_start="8192"
deviceinfo_cgpt_kpart_size="32768"
cgpt
requires start and size values of partition, so these values are calculated for each partition.
Reserved size and on-device installer are not yet supported.
pmbootstrap install --sdcard=/dev/something
works fine, but when doing pmbootstrap export
and then dd it to SD card, root partition is not resized on boot. It should be solved in initfs, not pmbootstrap, so it's not in this MR.
Reference: https://archlinuxarm.org/platforms/armv7/samsung/samsung-chromebook