patschi

Simple kernel script

May 21st, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.69 KB | None | 0 0
  1. #!/bin/bash
  2. KERNELVER="3.9.3"
  3. KERNELNAME="-amd64-patschi"
  4. USECORES=8
  5.  
  6. echo "> Making kernel Linux $KERNELVER..."
  7.  
  8. if [ ! -f "linux-$KERNELVER.tar.xz" ]; then
  9.         echo "> Downloading kernel..."
  10.         wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-$KERNELVER.tar.xz
  11. fi
  12.  
  13. if [ ! -d "linux-$KERNELVER" ]; then
  14.         echo "> Unpacking kernel..."
  15.         tar xf linux-$KERNELVER.tar.xz
  16. fi
  17.  
  18. cd linux-*
  19.  
  20. echo "> Using defaults with config questions..."
  21. yes "" | make oldconfig
  22. export CONCURRENCY_LEVEL=$USECORES
  23.  
  24. echo "> Compiling..."
  25. fakeroot make-kpkg --initrd --append-to-version=$KERNELNAME kernel-image kernel-headers modules_image
  26.  
  27. echo " "
  28. echo "> Work done, Sir!"
Advertisement
Add Comment
Please, Sign In to add comment