Tuesday, April 27, 2010

ubuntu custom kernel build script

As I customized my kernel on a ubuntu laptop, I found myself looking up and running the same commands each time I made a change, so I wrote myself a little script to do the work.

#!/bin/bash
cd /usr/src/linux
make-kpkg clean
INSTALL_MOD_STRIP=1 CONCURRENCY_LEVEL=3 make-kpkg --initrd \
 --append-to-version=-custom kernel_image kernel_headers modules_image

I put the script in my path and called it build-kernel, so I could use it with
sudo build-kernel

This made things easy.

No comments:

Post a Comment