View previous topic :: View next topic |
Author |
Message |
jiutian n00b

Joined: 29 May 2022 Posts: 26
|
Posted: Fri Jun 03, 2022 8:22 am Post subject: How to compile the kernel correctly with zstd? |
|
|
What should I pay attention to when compiling the kernel with zstd compression? After I compile, I start and run in black screen.
I also installed zstd
[/code]
[code]
Kernel compression mode (zstd) --->
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
() Initramfs source file(s)
[ ] Support initial ramdisk/ramfs compressed using gzip
[ ] Support initial ramdisk/ramfs compressed using bzip2
[ ] Support initial ramdisk/ramfs compressed using LZMA
[ ] Support initial ramdisk/ramfs compressed using XZ
[ ] Support initial ramdisk/ramfs compressed using LZO
[ ] Support initial ramdisk/ramfs compressed using LZ4
[*] Support initial ramdisk/ramfs compressed using ZSTD |
|
Back to top |
|
 |
pietinger Moderator

Joined: 17 Oct 2006 Posts: 5903 Location: Bavaria
|
Posted: Fri Jun 03, 2022 8:48 am Post subject: Re: How to compile the kernel correctly with zstd? |
|
|
jiutian wrote: | What should I pay attention to when compiling the kernel with zstd compression? After I compile, I start and run in black screen. |
We had a lot of problems with "black screen" in the last time. It is always a missing framebuffer configuration: https://wiki.gentoo.org/wiki/Framebuffer#Early_framebuffer_drivers
(I cant help with zstd; but we have some experts for it also in our forum; just wait; in the meantime you could do your FB) |
|
Back to top |
|
 |
mike155 Advocate

Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Fri Jun 03, 2022 10:54 am Post subject: |
|
|
Have you seen: https://wiki.gentoo.org/wiki/Zstd?
As @pietinger already pointed out, a black screen is probably related to an incorrect framebuffer configuration. If you want help, then post your kernel config using wgetpaste, please. |
|
Back to top |
|
 |
jiutian n00b

Joined: 29 May 2022 Posts: 26
|
Posted: Fri Jun 03, 2022 11:21 am Post subject: Re: How to compile the kernel correctly with zstd? |
|
|
Kernel compression mode (zstd) --->
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
() Initramfs source file(s)
[ *] Support initial ramdisk/ramfs compressed using gzip
[ *] Support initial ramdisk/ramfs compressed using bzip2
[ *] Support initial ramdisk/ramfs compressed using LZMA
[ *] Support initial ramdisk/ramfs compressed using XZ
[ *] Support initial ramdisk/ramfs compressed using LZO
[ *] Support initial ramdisk/ramfs compressed using LZ4
[*] Support initial ramdisk/ramfs compressed using ZSTD
After the test, the boot is normal after all selections. Is this a kernel bug?
pietinger wrote: | jiutian wrote: | What should I pay attention to when compiling the kernel with zstd compression? After I compile, I start and run in black screen. |
We had a lot of problems with "black screen" in the last time. It is always a missing framebuffer configuration: https://wiki.gentoo.org/wiki/Framebuffer#Early_framebuffer_drivers
(I cant help with zstd; but we have some experts for it also in our forum; just wait; in the meantime you could do your FB) |
|
|
Back to top |
|
 |
mike155 Advocate

Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Fri Jun 03, 2022 11:34 am Post subject: |
|
|
Quote: | After the test, the boot is normal after all selections. Is this a kernel bug? |
No.
It probably means:
- Your early framebuffer doesn't work
- Your initramfs is NOT compressed with zstd
|
|
Back to top |
|
 |
alamahant Advocate

Joined: 23 Mar 2019 Posts: 3961
|
Posted: Fri Jun 03, 2022 11:58 am Post subject: |
|
|
I use a zstd-compressed kernel and modules.
My .config
Code: |
CONFIG_HAVE_KERNEL_ZSTD=y
CONFIG_KERNEL_ZSTD=y
CONFIG_RD_ZSTD=y
CONFIG_MODULE_COMPRESS_ZSTD=y
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD is not set
# CONFIG_ZRAM_DEF_COMP_ZSTD is not set
CONFIG_F2FS_FS_ZSTD=y
CONFIG_UBIFS_FS_ZSTD=y
CONFIG_SQUASHFS_ZSTD=y
CONFIG_PSTORE_ZSTD_COMPRESS=y
CONFIG_PSTORE_ZSTD_COMPRESS_DEFAULT=y
CONFIG_PSTORE_COMPRESS_DEFAULT="zstd"
CONFIG_CRYPTO_ZSTD=y
CONFIG_ZSTD_COMPRESS=y
CONFIG_ZSTD_DECOMPRESS=y
CONFIG_DECOMPRESS_ZSTD=y
|
You need to emerge
Code: |
USE="zstd" emerge -1av sys-apps/kmod
|
Plz make the flag permanent via package.use
Do this before building the kernel.
Then set zstd compression for initramfs --in my case dracut:
_________________
 |
|
Back to top |
|
 |
figueroa Advocate


Joined: 14 Aug 2005 Posts: 3021 Location: Edge of marsh USA
|
Posted: Sat Jun 04, 2022 4:00 am Post subject: |
|
|
I have USE "zstd" set globally in make.conf. Following are my kernel settings. I don't use an initramfs.
Code: | $ grep -i zstd /usr/src/linux/.config
CONFIG_HAVE_KERNEL_ZSTD=y
CONFIG_KERNEL_ZSTD=y
CONFIG_RD_ZSTD=y
# CONFIG_CRYPTO_ZSTD is not set
CONFIG_ZSTD_DECOMPRESS=y
CONFIG_DECOMPRESS_ZSTD=y |
I don't think I read the wiki before I switched over. _________________ Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi |
|
Back to top |
|
 |
jiutian n00b

Joined: 29 May 2022 Posts: 26
|
Posted: Sun Jun 05, 2022 12:16 pm Post subject: |
|
|
O (∩∩) O thank you
alamahant wrote: | I use a zstd-compressed kernel and modules.
My .config
Code: |
CONFIG_HAVE_KERNEL_ZSTD=y
CONFIG_KERNEL_ZSTD=y
CONFIG_RD_ZSTD=y
CONFIG_MODULE_COMPRESS_ZSTD=y
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD is not set
# CONFIG_ZRAM_DEF_COMP_ZSTD is not set
CONFIG_F2FS_FS_ZSTD=y
CONFIG_UBIFS_FS_ZSTD=y
CONFIG_SQUASHFS_ZSTD=y
CONFIG_PSTORE_ZSTD_COMPRESS=y
CONFIG_PSTORE_ZSTD_COMPRESS_DEFAULT=y
CONFIG_PSTORE_COMPRESS_DEFAULT="zstd"
CONFIG_CRYPTO_ZSTD=y
CONFIG_ZSTD_COMPRESS=y
CONFIG_ZSTD_DECOMPRESS=y
CONFIG_DECOMPRESS_ZSTD=y
|
You need to emerge
Code: |
USE="zstd" emerge -1av sys-apps/kmod
|
Plz make the flag permanent via package.use
Do this before building the kernel.
Then set zstd compression for initramfs --in my case dracut:
|
|
|
Back to top |
|
 |
jiutian n00b

Joined: 29 May 2022 Posts: 26
|
Posted: Sun Jun 05, 2022 12:22 pm Post subject: |
|
|
O (∩∩) O thank you
figueroa wrote: | I have USE "zstd" set globally in make.conf. Following are my kernel settings. I don't use an initramfs.
Code: | $ grep -i zstd /usr/src/linux/.config
CONFIG_HAVE_KERNEL_ZSTD=y
CONFIG_KERNEL_ZSTD=y
CONFIG_RD_ZSTD=y
# CONFIG_CRYPTO_ZSTD is not set
CONFIG_ZSTD_DECOMPRESS=y
CONFIG_DECOMPRESS_ZSTD=y |
I don't think I read the wiki before I switched over. |
|
|
Back to top |
|
 |
|