raspi - customs - /etc
[anomen-kernel-config.git] / quin / 2.6.28-tuxonice-r5-q3 / kernel_install.sh
blobb9314fec79c6bc5070081e938d788bd3e8babb06
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'`
9 ROOT=/dev/sda4
11 echo chown portage...
12 chown portage . -R
14 echo make prepare
15 make prepare
17 # extract verions
18 #KERNEL=`make kernelversion`
19 KERVER=`make kernelrelease`
21 echo "Root: $ROOT"
22 #echo "Kern: $KERNEL"
23 #echo "KVer: $KERVER"
25 echo -n Build '&' install kernel "$KERVER" ' ?'
26 read
28 #echo Building kernel
29 echo make clean...
30 make clean
32 echo make prepare...
33 make prepare
35 echo make all...
36 su portage -c make all
38 echo make modules_install...
39 make modules_install || exit 10
41 cp -v ./arch/x86/boot/bzImage "/boot/kernel-$KERVER" || exit 1
42 cp -v ./System.map "/boot/System.map-$KERVER" || exit 2
43 cp -v ./.config "/boot/Config-$KERVER" || exit 3
46 echo "" >> /boot/grub/grub.conf
47 echo "title=Linux $KERVER" >> /boot/grub/grub.conf
48 echo "kernel" "/boot/kernel-$KERVER" "root=$ROOT" "ro" >> /boot/grub/grub.conf
50 echo "* INFO *"
51 echo grub.conf was updated, but manual check is recomended.
52 echo ""
53 echo Finished.