Skip to content

Instantly share code, notes, and snippets.

@malakudi
Last active September 13, 2023 20:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malakudi/b90fe4c5b7ca6182fda07ed51e8eaaa5 to your computer and use it in GitHub Desktop.
Save malakudi/b90fe4c5b7ca6182fda07ed51e8eaaa5 to your computer and use it in GitHub Desktop.
Build debian kernel package from git
git clone -b sid --single-branch https://salsa.debian.org/kernel-team/linux.git
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.2.9.tar.xz
cd linux/
edit file linux/debian/config/defines and change debug-info to false
edit file linux/debian/config/amd64/defines and change debug-info to false
debian/bin/genorig.py ../linux-5.2.9.tar.xz # create original source tar package)
debian/rules orig # unpack original source
debian/rules debian/control # create control file
fakeroot debian/rules source
fakeroot make -j24 -f debian/rules.gen binary-arch_amd64_none_amd64
fakeroot make -j24 -f debian/rules.gen binary-arch_amd64_real # also header files, libc-dev files
fakeroot debian/rules binary-indep # build arch independent packages (for example doc)
@eshattow
Copy link

eshattow commented Aug 5, 2023

alternatively:

scripts/config --disable SYSTEM_TRUSTED_KEYRING
scripts/config --set-str SYSTEM_TRUSTED_KEYS ''
scripts/config --disable DEBUG_INFO

where you would want to turn off debug info and avoid using trusted keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment