Skip to content

Instantly share code, notes, and snippets.

@kentfredric
Created January 2, 2012 13:29
Show Gist options
  • Save kentfredric/1550685 to your computer and use it in GitHub Desktop.
Save kentfredric/1550685 to your computer and use it in GitHub Desktop.
pushd /usr/src/linux
CF="-march=native -mtune=native -O3"
MF='V=2 ARCH=x86_64 --jobs=10 --load-average=6.0'
mount /boot;
make ${MF} CFLAGS="${CF}" modules_prepare || exit 255;
make ${MF} CFLAGS="${CF}" vmlinux || exit 255;
make ${MF} CFLAGS="${CF}" modules || exit 255;
make ${MF} CFLAGS="${CF}" bzImage || exit 255;
make ${MF} CFLAGS="${CF}" modules_install || exit 255;
kn=$(make kernelrelease)
depmod --all --verbose --warn $kn
echo cp /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel.${kn}.xz
dracut --xz --hostonly --stdlog 5 --verbose --force /tmp/initramfs.${kn}.xz ${kn} || exit 255
cp -v /usr/src/linux/arch/x86_64/boot/bzImage /boot/kernel.${kn}.xz
cp -v /tmp/initramfs.${kn}.xz /boot/initramfs.${kn}.xz
@godspeed1989
Copy link

Next is to

# update-grub2

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