Using Debian Stretch to build 5.15.x kernel with zstd compression fails with incorrect parameters

I had to move from Jessie to Stretch as kernel 5.15.49 requires gcc 5.x version (Jessie had 4.9 version Stretch 6.x). I decided to try the ZSTD module compression option in 5.15.x. I ensured to apt-get install zstd beforehand.

Using make bindeb-pkg it gets all the way past compiling and signing the modules but then errors out and you can see on the screen the zstd output saying incorrect parameters then giving a sample of what the parameters should be. So clearly it’s executing the compressor but it doesn’t like whatever parameters kbuild is sending it?

Is this a known issue? Is there an easy fix for this?

TIA!!

Asked By: user3161924

||

Debian Stretch has zstd version 1.1.2, which lacks support for the -T0 option which the kernel uses (it instructs zstd to use all available cores).

-T0 can be dropped without adversely affecting the build (other than the time taken to compress the modules); edit scripts/Makefile.modinst and remove -T0 from cmd_zstd.

Note that Debian Stretch is about to drop out of long-term support (on June 30); if you want to continue using it, you should consider Extended LTS.

Answered By: Stephen Kitt