Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

How to compile the kernel correctly with zstd?

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
jiutian
n00b
n00b
Posts: 26
Joined: Sun May 29, 2022 11:17 am

How to compile the kernel correctly with zstd?

  • Quote

Post by jiutian » Fri Jun 03, 2022 8:22 am

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: Select all

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
Top
pietinger
Administrator
Administrator
Posts: 6640
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

Re: How to compile the kernel correctly with zstd?

  • Quote

Post by pietinger » Fri Jun 03, 2022 8:48 am

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/Framebuffe ... er_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)
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Fri Jun 03, 2022 10:54 am

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.
Top
jiutian
n00b
n00b
Posts: 26
Joined: Sun May 29, 2022 11:17 am

Re: How to compile the kernel correctly with zstd?

  • Quote

Post by jiutian » Fri Jun 03, 2022 11:21 am

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/Framebuffe ... er_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)
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

  • Quote

Post by mike155 » Fri Jun 03, 2022 11:34 am

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
Top
alamahant
Advocate
Advocate
Posts: 4034
Joined: Sat Mar 23, 2019 12:12 pm

  • Quote

Post by alamahant » Fri Jun 03, 2022 11:58 am

I use a zstd-compressed kernel and modules.
My .config

Code: Select all

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: Select all

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: Select all

compress="zstd"
:)
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Sat Jun 04, 2022 4:00 am

I have USE "zstd" set globally in make.conf. Following are my kernel settings. I don't use an initramfs.

Code: Select all

$ 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 -wayland
Top
jiutian
n00b
n00b
Posts: 26
Joined: Sun May 29, 2022 11:17 am

  • Quote

Post by jiutian » Sun Jun 05, 2022 12:16 pm

O (∩∩) O thank you


alamahant wrote:I use a zstd-compressed kernel and modules.
My .config

Code: Select all

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: Select all

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: Select all

compress="zstd"
Top
jiutian
n00b
n00b
Posts: 26
Joined: Sun May 29, 2022 11:17 am

  • Quote

Post by jiutian » Sun Jun 05, 2022 12:22 pm

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: Select all

$ 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.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic