-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add zstd module decompression #43
Conversation
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
after several weeks, works with no failures - locally compiled mkinitcpio-zstd pacman -Qs "kmod|mkinitcpio"
/etc/mkinitcpio.conf
mkinitcpio -p customkernel |
/etc/mkinitcpio.conf
works correctly |
functions
Outdated
esac | ||
done | ||
(( ${#xz_comp[*]} )) && xz -d "${xz_comp[@]}" | ||
(( ${#gz_comp[*]} )) && gzip -d "${gz_comp[@]}" | ||
(( ${#zst_comp[*]} )) && zstd -d "${zst_comp[@]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe zstd
should be silenced here with the -q
option in order to avoid garbage during initramfs regeneration both in console and pacman log.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're absolutely right, I overlooked that.
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
Thanks for the suggestion, done. |
Correct me if I'm wrong. I believe the |
I'm pretty sure it's not necessary in this case. @pfactum What do you think about this? Adding this will not be the slightest problem. |
It seems the source files are preserved by default during initramfs regeneration. |
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
@zhmars Done. |
@sirlucjan agree with this, it seems that zstd has got inverted defaults unlike gzip and xz. |
kmod 28 supports modules compressed in zstd format so let's add this possibility to kernel. Requires this update to mkinitcpio: archlinux/mkinitcpio#43 Link: https://lkml.kernel.org/r/20210330113235.2767216-1-lucjan.lucjanov@gmail.com Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com> Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Cc: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
@grazzolini please note we are pushing related work to the upstream kernel (https://github.com/hnaz/linux-mm/commit/bb63820634e41278399f3d65ca0f8306eca67351) so that this pull request is expected to be actually usable without kernel patching soon. |
The patch has been merged into linux-next so perhaps this will appear in 5.13 |
I have just merged this. However, this doesn't mean Arch kernels will start compressing modules with zstd as soon as 5.13 lands. |
kmod 28 supports modules compressed in zstd format so let's add this possibility to kernel. Requires this update to mkinitcpio: archlinux/mkinitcpio#43 Link: https://lkml.kernel.org/r/20210330113235.2767216-1-lucjan.lucjanov@gmail.com Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com> Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Cc: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
kmod 28 supports modules compressed in zstd format so let's add this possibility to kernel. Requires this update to mkinitcpio: archlinux/mkinitcpio#43 Link: https://lkml.kernel.org/r/20210330113235.2767216-1-lucjan.lucjanov@gmail.com Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com> Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Cc: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
kmod 28 supports modules compressed in zstd format so let's add the same functionality to mkinitcpio.
Signed-off-by: Piotr Gorski lucjan.lucjanov@gmail.com