Add PMOS_FORCE_PARTITION_RESIZE kernel boot parameter (#874)
This commit is contained in:
parent
c1e4579d3e
commit
c33e5d823e
8 changed files with 16 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
||||||
pkgname=device-qemu-aarch64
|
pkgname=device-qemu-aarch64
|
||||||
pkgver=1
|
pkgver=1
|
||||||
pkgrel=5
|
pkgrel=6
|
||||||
pkgdesc="Simulated device in qemu with vexpress soc"
|
pkgdesc="Simulated device in qemu with vexpress soc"
|
||||||
url="https://github.com/postmarketOS"
|
url="https://github.com/postmarketOS"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
|
@ -18,5 +18,5 @@ package() {
|
||||||
"$pkgdir"/etc/network/interfaces
|
"$pkgdir"/etc/network/interfaces
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="692f5e0b5e8f10a88f5c81631377981eb9bdd22cce2e288f7849c67488f6d2b60ba6919db3c99907238c33507a58948e95fe5c4fd262fb2688da6060cd7129d9 deviceinfo
|
sha512sums="406f7aff4416e58ac38e2240f164435299f42ce1a7d03098bc7ffdd570d02b40c630da89f009bb618d0554af0aedfbe5b26edc9848aa40de09534183d9f77db1 deviceinfo
|
||||||
d510ca304066840aa5e6c4fc71ded1b7e83012c93837fa39e37bdb873b3636230030d56f7aa50c93fc688f563cb4cb96c02ad333bbc45a400c1ebee1792a9dd4 interfaces"
|
d510ca304066840aa5e6c4fc71ded1b7e83012c93837fa39e37bdb873b3636230030d56f7aa50c93fc688f563cb4cb96c02ad333bbc45a400c1ebee1792a9dd4 interfaces"
|
||||||
|
|
|
@ -14,7 +14,7 @@ deviceinfo_external_disk_install="true"
|
||||||
deviceinfo_flash_methods="none"
|
deviceinfo_flash_methods="none"
|
||||||
deviceinfo_generate_legacy_uboot_initfs="false"
|
deviceinfo_generate_legacy_uboot_initfs="false"
|
||||||
deviceinfo_arch="aarch64"
|
deviceinfo_arch="aarch64"
|
||||||
deviceinfo_kernel_cmdline="console=ttyAMA0,38400n8 console=tty1 PMOS_NO_OUTPUT_REDIRECT"
|
deviceinfo_kernel_cmdline="console=ttyAMA0,38400n8 console=tty1 PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE"
|
||||||
|
|
||||||
# Splash
|
# Splash
|
||||||
deviceinfo_screen_width="640"
|
deviceinfo_screen_width="640"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
pkgname=device-qemu-amd64
|
pkgname=device-qemu-amd64
|
||||||
pkgver=1
|
pkgver=1
|
||||||
pkgrel=9
|
pkgrel=10
|
||||||
pkgdesc="Simulated device in qemu with an x86 platform"
|
pkgdesc="Simulated device in qemu with an x86 platform"
|
||||||
url="https://github.com/postmarketOS"
|
url="https://github.com/postmarketOS"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
|
@ -36,6 +36,6 @@ weston() {
|
||||||
"$subpkgdir"/etc/xdg/weston/weston.ini
|
"$subpkgdir"/etc/xdg/weston/weston.ini
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="7b190af151bf7b91eebb10902fc815b591b54d3fda5c917957538660baf72dd522782b5d8eaf8ce708a71130d7a8680e4834a0cd89c6c271f9a8dd76f37e5514 deviceinfo
|
sha512sums="b3659499d1c49554e65f7ee8e4b9448c010987a213cd97c19b6d289aaf403f741c01a08cd637de7da3467dffd841055d53ab2ba93833655c10de1644350894d8 deviceinfo
|
||||||
d510ca304066840aa5e6c4fc71ded1b7e83012c93837fa39e37bdb873b3636230030d56f7aa50c93fc688f563cb4cb96c02ad333bbc45a400c1ebee1792a9dd4 interfaces
|
d510ca304066840aa5e6c4fc71ded1b7e83012c93837fa39e37bdb873b3636230030d56f7aa50c93fc688f563cb4cb96c02ad333bbc45a400c1ebee1792a9dd4 interfaces
|
||||||
df0fe900693e5f176076c59f5379e56aaa96c3df16a4120448f15b71f530170730b43e5fe32733c40c118a00ca3581043231a062a8a1eb0a930bfbfbb6c52a47 weston.ini"
|
df0fe900693e5f176076c59f5379e56aaa96c3df16a4120448f15b71f530170730b43e5fe32733c40c118a00ca3581043231a062a8a1eb0a930bfbfbb6c52a47 weston.ini"
|
||||||
|
|
|
@ -14,7 +14,7 @@ deviceinfo_external_disk_install="true"
|
||||||
deviceinfo_flash_methods="none"
|
deviceinfo_flash_methods="none"
|
||||||
deviceinfo_generate_legacy_uboot_initfs="false"
|
deviceinfo_generate_legacy_uboot_initfs="false"
|
||||||
deviceinfo_arch="x86_64"
|
deviceinfo_arch="x86_64"
|
||||||
deviceinfo_kernel_cmdline="console=tty1 console=ttyS0 PMOS_NO_OUTPUT_REDIRECT"
|
deviceinfo_kernel_cmdline="console=tty1 console=ttyS0 PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE"
|
||||||
|
|
||||||
# Splash
|
# Splash
|
||||||
deviceinfo_screen_width="640"
|
deviceinfo_screen_width="640"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
pkgname=device-qemu-vexpress
|
pkgname=device-qemu-vexpress
|
||||||
pkgver=1
|
pkgver=1
|
||||||
pkgrel=12
|
pkgrel=13
|
||||||
pkgdesc="Simulated device in qemu with vexpress soc"
|
pkgdesc="Simulated device in qemu with vexpress soc"
|
||||||
url="https://github.com/postmarketOS"
|
url="https://github.com/postmarketOS"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
|
@ -18,5 +18,5 @@ package() {
|
||||||
"$pkgdir"/etc/network/interfaces
|
"$pkgdir"/etc/network/interfaces
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="4d49aca03d0c87ba1d35056c0985946bfeb9240130014f7e3b7155c38e4bfcdae8a67747969d1254fe064fe0b71847c537ca1e07bc5fd4173c6387270d72c4f2 deviceinfo
|
sha512sums="01983e7f52cc48e25e41df8bec91d364bac471c1c602c0b854a800ef4c09048989f894fe4bed35b607f0273d9fa46a25f3a285eeac62b1657867c27e08dd18a3 deviceinfo
|
||||||
d510ca304066840aa5e6c4fc71ded1b7e83012c93837fa39e37bdb873b3636230030d56f7aa50c93fc688f563cb4cb96c02ad333bbc45a400c1ebee1792a9dd4 interfaces"
|
d510ca304066840aa5e6c4fc71ded1b7e83012c93837fa39e37bdb873b3636230030d56f7aa50c93fc688f563cb4cb96c02ad333bbc45a400c1ebee1792a9dd4 interfaces"
|
||||||
|
|
|
@ -14,7 +14,7 @@ deviceinfo_external_disk_install="true"
|
||||||
deviceinfo_flash_methods="none"
|
deviceinfo_flash_methods="none"
|
||||||
deviceinfo_generate_legacy_uboot_initfs="false"
|
deviceinfo_generate_legacy_uboot_initfs="false"
|
||||||
deviceinfo_arch="armhf"
|
deviceinfo_arch="armhf"
|
||||||
deviceinfo_kernel_cmdline="console=ttyAMA0,38400n8 console=tty1 PMOS_NO_OUTPUT_REDIRECT"
|
deviceinfo_kernel_cmdline="console=ttyAMA0,38400n8 console=tty1 PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE"
|
||||||
|
|
||||||
# Splash
|
# Splash
|
||||||
deviceinfo_screen_width="640"
|
deviceinfo_screen_width="640"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
pkgname=postmarketos-mkinitfs
|
pkgname=postmarketos-mkinitfs
|
||||||
pkgver=0.5.2
|
pkgver=0.5.3
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
pkgdesc="Tool to generate initramfs images for postmarketOS"
|
pkgdesc="Tool to generate initramfs images for postmarketOS"
|
||||||
url="https://github.com/postmarketOS"
|
url="https://github.com/postmarketOS"
|
||||||
|
@ -22,5 +22,5 @@ package() {
|
||||||
mkdir -p "$pkgdir/etc/postmarketos-mkinitfs/hooks/"
|
mkdir -p "$pkgdir/etc/postmarketos-mkinitfs/hooks/"
|
||||||
}
|
}
|
||||||
sha512sums="e1849a13ee696e76dc6c734eda984bcc6a6e2e3d8a62a4df0778a8e338dc0bf9d967fa263ae6e57c14a0cb516c6004c6e251262a1711ad47f1ce4c622727a1d7 init.sh.in
|
sha512sums="e1849a13ee696e76dc6c734eda984bcc6a6e2e3d8a62a4df0778a8e338dc0bf9d967fa263ae6e57c14a0cb516c6004c6e251262a1711ad47f1ce4c622727a1d7 init.sh.in
|
||||||
d6eb7c1cd5ddf110996db1523db68a9cf13b980f25dc60a7bfc79d7c911558f46487708299bd84499ef04f61e129ab0b8186e4b1761c1479c6fec0f92232e001 init_functions.sh
|
1512d052890d6d8528f6dbca90eacd76664b56a00c24c980a5be900fdf290f24dbf42c8f3ebf43ea2c832046b4a81ed5d69401ddf5cea2516f8265b083a15ff3 init_functions.sh
|
||||||
1048ebb20e2534c9ac3c259443b89323e09f87a68eab9f1c8b8c42130bf9fe2ea99cdca32be0595c65e827007c4171be047441156dd03e1d81c0554f947828f8 mkinitfs.sh"
|
1048ebb20e2534c9ac3c259443b89323e09f87a68eab9f1c8b8c42130bf9fe2ea99cdca32be0595c65e827007c4171be047441156dd03e1d81c0554f947828f8 mkinitfs.sh"
|
||||||
|
|
|
@ -142,10 +142,12 @@ resize_root_partition() {
|
||||||
kpartx -afs "$partition_dev"
|
kpartx -afs "$partition_dev"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Detect and resize root partition on QEMU
|
# Resize the root partition (non-subpartitions). Usually we do not want this,
|
||||||
if [ -z "${partition##"/dev/hda"*}" ]; then
|
# except for QEMU devices (where PMOS_FORCE_PARTITION_RESIZE gets passed as
|
||||||
|
# kernel parameter).
|
||||||
|
if grep -q PMOS_FORCE_PARTITION_RESIZE /proc/cmdline; then
|
||||||
echo "Resize root partition ($partition)"
|
echo "Resize root partition ($partition)"
|
||||||
parted -s /dev/hda resizepart 2 100%
|
parted -s "$(echo "$partition" | sed -E 's/p?2$//')" resizepart 2 100%
|
||||||
partprobe
|
partprobe
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue