Skip to content

Commit

Permalink
base-files: add support for rootfs compress from cmdline
Browse files Browse the repository at this point in the history
Add support for configuring rootfs compression option from cmdline.

To enable rootfs compression declare in the cmdline
rootfs_compress_algorithm followed by the algorithm.

Example usage:
"... rootfs_compress_algorithm=zstd ..."

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
  • Loading branch information
Ansuel committed Sep 16, 2023
1 parent 94f4724 commit 803ebc4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion package/base-files/files/lib/preinit/80_mount_root
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ missing_lines() {
}

do_mount_root() {
mount_root
local rootfs_compression

rootfs_compression="$(cmdline_get_var rootfs_compress_algorithm)"

mount_root start rootfs_compress_algorithm="$rootfs_compression"

boot_run_hook preinit_mount_root
[ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && {
echo "- config restore -"
Expand Down

0 comments on commit 803ebc4

Please sign in to comment.