Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to compile the kernel correctly with zstd?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jiutian
n00b
n00b


Joined: 29 May 2022
Posts: 26

PostPosted: Fri Jun 03, 2022 8:22 am    Post subject: How to compile the kernel correctly with zstd? Reply with quote

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
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5903
Location: Bavaria

PostPosted: Fri Jun 03, 2022 8:48 am    Post subject: Re: How to compile the kernel correctly with zstd? Reply with quote

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
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Jun 03, 2022 10:54 am    Post subject: Reply with quote

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
View user's profile Send private message
jiutian
n00b
n00b


Joined: 29 May 2022
Posts: 26

PostPosted: Fri Jun 03, 2022 11:21 am    Post subject: Re: How to compile the kernel correctly with zstd? Reply with quote

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
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Fri Jun 03, 2022 11:34 am    Post subject: Reply with quote

Quote:
After the test, the boot is normal after all selections. Is this a kernel bug?

No.

It probably means:
  1. Your early framebuffer doesn't work
  2. Your initramfs is NOT compressed with zstd
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3961

PostPosted: Fri Jun 03, 2022 11:58 am    Post subject: Reply with quote

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:
Code:

compress="zstd"

_________________
:)
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3021
Location: Edge of marsh USA

PostPosted: Sat Jun 04, 2022 4:00 am    Post subject: Reply with quote

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
View user's profile Send private message
jiutian
n00b
n00b


Joined: 29 May 2022
Posts: 26

PostPosted: Sun Jun 05, 2022 12:16 pm    Post subject: Reply with quote

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:
Code:

compress="zstd"
Back to top
View user's profile Send private message
jiutian
n00b
n00b


Joined: 29 May 2022
Posts: 26

PostPosted: Sun Jun 05, 2022 12:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum