main/postmarketos-mkinitfs: basic support for btrfs, upgrade to 1.4.1 (MR 2841)

[ci:skip-build] already built successfully in CI
This commit is contained in:
Marian Stramm 2022-01-02 17:51:52 +01:00 committed by Clayton Craft
parent 5b6c490134
commit 0922ff0fdd
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A
4 changed files with 21 additions and 5 deletions

View file

@ -6,3 +6,4 @@ xts
libaes libaes
aes aes
evdev evdev
btrfs

View file

@ -1,13 +1,14 @@
# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org> # Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net> # Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-mkinitfs pkgname=postmarketos-mkinitfs
pkgver=1.3 pkgver=1.4.1
pkgrel=0 pkgrel=0
pkgdesc="Tool to generate initramfs images for postmarketOS" pkgdesc="Tool to generate initramfs images for postmarketOS"
url="https://postmarketos.org" url="https://postmarketos.org"
depends=" depends="
boot-deploy boot-deploy
busybox-extras busybox-extras
btrfs-progs
bzip2 bzip2
cryptsetup cryptsetup
device-mapper device-mapper
@ -67,8 +68,8 @@ check() {
} }
sha512sums=" sha512sums="
3495c72ad5a8b1287c4a696a2f9f29b465faafa2768f6336d158aaeb577e352aaa1fc5ddcff35c70de460828094cbfa5e06d4b905565228c5706c151f54a09a8 postmarketos-mkinitfs-1.3.tar.gz f827acb0a10c0e5c1631f1b712e91fde7eb4ade0f1174eb2ef1754018bf4518ea1ad3229fd335c25fb0c6fe46ae20890f5cf43e58c8143ae17b5ab9bb36f0199 postmarketos-mkinitfs-1.4.1.tar.gz
950ac042f19055979cb53b39be93866c88aba0acd5a49cd768522505991e2bd2851735677e777caa6c8973e006318582ddd975214eccc5c35c2c1d649af6d71e 00-default.modules 08a3e79c6fa7d3839d43515b8da7817cb36f4ab014552fd0164957c232bb16fde337e57c47c9734d396a5fca3328fbf49ebabe4728c6071c80b04dad14886bba 00-default.modules
0c6d2c749952ff027f1c435a7a3b2861fb632b81c16b6d69a92b47457da4af8cb80e50168b93f92b316377c8c1f5243029fca22ac49fef0940eb5ad6c3dff6ec init.sh 0c6d2c749952ff027f1c435a7a3b2861fb632b81c16b6d69a92b47457da4af8cb80e50168b93f92b316377c8c1f5243029fca22ac49fef0940eb5ad6c3dff6ec init.sh
0f631fb08f44b3aaaf44649c164040a6effda2a921c4bfc6e1b55e265ce4395947a8620e669902d18e62f7eabae0e9ef2b88d2d985d6714d27db02eb8b412cc2 init_functions.sh 201cd1112f8e5427d8570d87ff260ab492ea74863a1a8c46377438dfb31582c78ad20088168e36972100db1fc5729e9e625fb4d6c4c6bffe5c8ed33cba3ee1d8 init_functions.sh
" "

View file

@ -325,6 +325,15 @@ resize_root_filesystem() {
echo "Resize 'f2fs' root filesystem ($partition)" echo "Resize 'f2fs' root filesystem ($partition)"
resize.f2fs "$partition" resize.f2fs "$partition"
;; ;;
btrfs)
echo "Resize 'btrfs' root filesystem ($partition)"
modprobe btrfs
resize_root_filesystem_tmp_btrfs="$(mktemp -d)"
mount -t btrfs "$partition" "$resize_root_filesystem_tmp_btrfs"
btrfs filesystem resize max "$resize_root_filesystem_tmp_btrfs"
umount "$resize_root_filesystem_tmp_btrfs"
unset resize_root_filesystem_tmp_btrfs
;;
*) echo "WARNING: Can not resize '$type' filesystem ($partition)." ;; *) echo "WARNING: Can not resize '$type' filesystem ($partition)." ;;
esac esac
show_splash_loading show_splash_loading
@ -344,6 +353,11 @@ mount_root_partition() {
echo "Detected f2fs filesystem" echo "Detected f2fs filesystem"
mount -t f2fs -o ro "$partition" /sysroot mount -t f2fs -o ro "$partition" /sysroot
;; ;;
btrfs)
echo "Detected btrfs filesystem"
modprobe btrfs
mount -t btrfs -o ro "$partition" /sysroot
;;
*) echo "WARNING: Detected '$type' filesystem ($partition)." ;; *) echo "WARNING: Detected '$type' filesystem ($partition)." ;;
esac esac
if ! [ -e /sysroot/usr ]; then if ! [ -e /sysroot/usr ]; then

View file

@ -3,7 +3,7 @@
version=7 version=7
pmbootstrap_min_version=1.37.0 pmbootstrap_min_version=1.37.0
channel=edge channel=edge
supported_root_filesystems=ext4,f2fs supported_root_filesystems=btrfs,ext4,f2fs
supported_firewall=nftables supported_firewall=nftables
supported_base_nofde=True supported_base_nofde=True
supported_install_boot_label=pmOS_i_boot supported_install_boot_label=pmOS_i_boot