diff --git a/main/postmarketos-mkinitfs/APKBUILD b/main/postmarketos-mkinitfs/APKBUILD index 4eba32a42..b6a1ebf6f 100644 --- a/main/postmarketos-mkinitfs/APKBUILD +++ b/main/postmarketos-mkinitfs/APKBUILD @@ -2,7 +2,7 @@ # Co-Maintainer: Clayton Craft pkgname=postmarketos-mkinitfs pkgver=1.5.1 -pkgrel=2 +pkgrel=3 pkgdesc="Tool to generate initramfs images for postmarketOS" url="https://postmarketos.org" depends=" @@ -68,5 +68,5 @@ sha512sums=" d28802b17d7912a58d23c02fbdddfdb6f74489e712d61a59472f7f000a4429786f69ba2fca59d321c55c277ff79edb6f47c939a9e973b31f694aeca0167354ff postmarketos-mkinitfs-1.5.1.tar.gz 20f110337113e8de8999cf2a064a93fea36821d5c216bfa4ba46ec1f83825638262b92fd7be29eee0a85a54a108b7315a96cbe30da8ae4419f54c2ed53bb08c7 00-default.modules ccdceaa710d97d6f57d8d66bfcbec448486d08083341712303f62123039f729229b88528308e411a308a2b90b81b60de89fe91143a6facbb11cbc9b4055eeaec init.sh -9397e448c3397f48497cabc07472e6950a7e630834e019b2e37b7c8580015aff55bafdc093b3ae79939d14962b8825f15e6946003c89a4f871a0d71121443997 init_functions.sh +4006679c81d48245877988d5f5e94db68afe6896b6ab41f0f0d7d34c12a6674fe633975a89cee707e64c07cf01ad151694e27a34948df3b65c1e6be99036f0d0 init_functions.sh " diff --git a/main/postmarketos-mkinitfs/init_functions.sh b/main/postmarketos-mkinitfs/init_functions.sh index 65fb748f1..92e27d407 100644 --- a/main/postmarketos-mkinitfs/init_functions.sh +++ b/main/postmarketos-mkinitfs/init_functions.sh @@ -355,6 +355,22 @@ resize_root_partition() { ROOT_PARTITION_RESIZED=1 fi fi + + # Resize the root partition (non-subpartitions) on Chrome OS devices. + # Match $deviceinfo_cgpt_kpart not being empty instead of cmdline + # because it does not make sense here as all these devices use the same + # partitioning methods. This also resizes third partition instead of + # second, because these devices have an additional kernel partition + # at the start. + if [ -n "$deviceinfo_cgpt_kpart" ]; then + partition_dev="$(echo "$partition" | sed -E 's/p?3$//')" + if has_unallocated_space "$partition_dev"; then + echo "Resize root partition ($partition)" + parted -f -s "$partition_dev" resizepart 3 100% + partprobe + ROOT_PARTITION_RESIZED=1 + fi + fi } unlock_root_partition() {