Skip to content

Instantly share code, notes, and snippets.

@bodik
Created February 9, 2025 08:57
Show Gist options
  • Select an option

  • Save bodik/f6f7d7cafab71288c68029666d5835bc to your computer and use it in GitHub Desktop.

Select an option

Save bodik/f6f7d7cafab71288c68029666d5835bc to your computer and use it in GitHub Desktop.
make custom kernel .deb package
git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
cd linux/
git checkout v6.1.113
 
cp /boot/config-$(uname -r) .config
make oldconfig
scripts/config --set-str SYSTEM_REVISION "$(git rev-parse --short HEAD)"
scripts/config --set-str SYSTEM_SERIAL "$(date +%s)"
 
git revert COMMITID
export CONCURRENCY_LEVEL=$(nproc)
fakeroot make -j$(nproc) deb-pkg LOCALVERSION=-revertCOMMITID
git reset HEAD^ --hard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment