-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkernel.sh
More file actions
executable file
·28 lines (18 loc) · 815 Bytes
/
kernel.sh
File metadata and controls
executable file
·28 lines (18 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
#apt-get install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev wget libncurses5 libncurses5-dev
cd /usr/src
DOWNLOAD_PATH=`curl kernel.org | grep "/pub/linux/kernel/" | grep ">F<" | cut -d'"' -f2 | head -n 1`
KERNEL_FILENAME=`echo $DOWNLOAD_PATH | tr "/" "\n" | tail -n 1`
#wget -c http://kernel.org$DOWNLOAD_PATH
#tar -xvjf $KERNEL_FILENAME
KERNEL_FIELDCNT=`echo $KERNEL_FILENAME | tr "." "\n" | head -n -2 | wc -l`
KERNEL_DIR=`echo $KERNEL_FILENAME | tr "." "\n" | head -n -2 | tr "\n" "." | cut -d"." --field=-$KERNEL_FIELDCNT`
echo
echo $KERNEL_DIR
cd $KERNEL_DIR
cp /boot/config-$(uname -r) .config
yes "" | make oldconfig
make xconfig
#make menuconfig
make-kpkg clean
CONCURRENCY_LEVEL=3 time make-kpkg --initrd --revision=64 kernel_image kernel_headers modules_image