zax - customs
[anomen-kernel-config.git] / savara / 2.6.27-gentoo-r8-s23 / kernel_install.sh
blob0e5e517e2b3925297632baec587b7fabe8ad3c82
1 #!/bin/sh
3 # kernell install script
5 # $Id$
7 # System settings:
8 ROOT=`cat /etc/fstab | sed -ne 's@^[ \t]*\([^ \t][^ \t]*\)[ \t][ \t]*/[ \t].*@\1@p'`
10 echo chown portage...
11 chown portage . -R
13 echo make prepare
14 make prepare
16 # extract verions
17 #KERNEL=`make kernelversion`
18 KERVER=`make kernelrelease`
20 echo "Root: $ROOT"
21 #echo "Kern: $KERNEL"
22 #echo "KVer: $KERVER"
24 echo -n Build '&' install kernel "$KERVER" ' ?'
25 read
27 #echo Building kernel
28 echo make clean...
29 make clean
31 echo make all...
32 su portage -c make all
34 echo make modules_install...
35 make modules_install || exit 10
37 cp -v ./arch/x86/boot/bzImage "/boot/kernel-$KERVER" || exit 1
38 cp -v ./System.map "/boot/System.map-$KERVER" || exit 2
39 cp -v ./.config "/boot/Config-$KERVER" || exit 3
42 echo "" >> /boot/grub/grub.conf
43 echo "title=Linux $KERVER" >> /boot/grub/grub.conf
44 echo "kernel" "/boot/kernel-$KERVER" "root=$ROOT" "ro" >> /boot/grub/grub.conf
46 echo "* INFO *"
47 echo grub.conf was updated, but manual check is recomended.
48 echo ""
49 echo Finished.