From b396e2024c7eaa1c3364ae2de094a5d868d9492e Mon Sep 17 00:00:00 2001 From: Las Safin Date: Sat, 18 Sep 2021 14:28:47 +0000 Subject: [PATCH 1/2] Specify f2fs features --- fs/install-to-emmc-begin | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/install-to-emmc-begin b/fs/install-to-emmc-begin index 3809dcf8..ef353050 100755 --- a/fs/install-to-emmc-begin +++ b/fs/install-to-emmc-begin @@ -86,12 +86,14 @@ partx -a ${MMCDEV} 2>/dev/null || true sleep 1 +f2fsoptions="-O extra_attr,compression,inode_checksum,sb_checksum" + echo "Installing to $ROOTPART" # Seems like only kukui supports discard on f2fs if [ "$BASEBOARD" = "kukui" ]; then case "$FILESYSTEM" in f2fs) - mkfs.f2fs -f $ROOTPART + mkfs.f2fs -f $ROOTPART $f2fsoptions ;; ext4) mkfs.ext4 -F $ROOTPART @@ -100,7 +102,7 @@ if [ "$BASEBOARD" = "kukui" ]; then else case "$FILESYSTEM" in f2fs) - mkfs.f2fs -f $ROOTPART -t 0 + mkfs.f2fs -f $ROOTPART -t 0 $f2fsoptions ;; ext4) mkfs.ext4 -F $ROOTPART From 4f8601535f262d5d4266a9dd6e5dcfe74a7bdc59 Mon Sep 17 00:00:00 2001 From: Las Safin Date: Wed, 20 Oct 2021 18:53:37 +0000 Subject: [PATCH 2/2] Set compression algorithm for f2fs to zstd --- kernel/cmdline | 2 +- kernel/cmdline.oxide | 2 +- kernel/cmdline.p2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/cmdline b/kernel/cmdline index ce67e378..df59da58 100644 --- a/kernel/cmdline +++ b/kernel/cmdline @@ -1 +1 @@ -console=ttyMSM0,115200 console=ttyS0,115200 console=tty1 root=PARTUUID=%U/PARTNROFF=2 rootwait rw fbcon=logo-pos:center,logo-count:1 +console=ttyMSM0,115200 console=ttyS0,115200 console=tty1 root=PARTUUID=%U/PARTNROFF=2 rootwait rw fbcon=logo-pos:center,logo-count:1 rootflags=compress_algorithm=zstd:4 diff --git a/kernel/cmdline.oxide b/kernel/cmdline.oxide index 2c12d014..a5e4ccd8 100644 --- a/kernel/cmdline.oxide +++ b/kernel/cmdline.oxide @@ -1 +1 @@ -console=ttyS0,115200 console=tty1 console=ttyMSM0,115200 root=PARTLABEL=ROOT-C rootwait rw quiet fbcon=logo-pos:center,logo-count:1 +console=ttyS0,115200 console=tty1 console=ttyMSM0,115200 root=PARTLABEL=ROOT-C rootwait rw quiet fbcon=logo-pos:center,logo-count:1 rootflags=compress_algorithm=zstd:4 diff --git a/kernel/cmdline.p2 b/kernel/cmdline.p2 index 8e36ed02..c0d9eadc 100644 --- a/kernel/cmdline.p2 +++ b/kernel/cmdline.p2 @@ -1 +1 @@ -console=ttyS0,115200 console=tty1 console=ttyMSM0,115200 root=PARTUUID=%U/PARTNROFF=1 rootwait rw quiet fbcon=logo-pos:center,logo-count:1 +console=ttyS0,115200 console=tty1 console=ttyMSM0,115200 root=PARTUUID=%U/PARTNROFF=1 rootwait rw quiet fbcon=logo-pos:center,logo-count:1 rootflags=compress_algorithm=zstd:4