forked from 4-rr4y/sony_kernel_msm8960
-
Notifications
You must be signed in to change notification settings - Fork 0
/
runme
executable file
·91 lines (90 loc) · 3.95 KB
/
runme
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
export DIR=$(cd $(dirname "$0"); pwd)
export START=$DIR/runme
# Toolchain path goes here:
export TC=~/android_prebuilt_toolchains-master/arm-eabi-linaro-4.6.2/bin/arm-eabi-
cd $DIR
clear
echo " ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨"
echo " user: $(whoami) | machine: $(uname -n) | toolchain path: "
echo " "$TC
echo " ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨"
echo
echo " choose your action."
echo
echo "1. clean kernel dir <make clean, make distclean>"
echo "2. set blue_tsubasa_defconfig <make defconfig>"
echo "3. set blue_mint_defconfig <make defconfig>"
echo "4. set blue_hayabusa_defconfig <make defconfig>"
echo "5. set other defconfig <make defconfig>"
echo "6. run menuconfig <make menuconfig>"
echo "7. build kernel <make -j?>"
echo
echo "0. show requirements"
echo "q. quit script"
echo
echo " enter desired option number and press enter"
read OPT
case $OPT in
0) clear;
echo "¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨";
echo " toolchain must be specified in this file (runme)";
echo "¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨";
read -p "press [enter] to continue";;
1) cd ./;
clear;
echo " - running 'make clean'";
ARCH=arm CROSS_COMPILE=${TC} make clean;
echo "- ok";
echo;
echo " - running 'make distclean'";
ARCH=arm CROSS_COMPILE=${TC} make distclean;
echo "- ok";
echo;
read -p "press [enter] to continue";;
2) cd ./; clear;
echo "¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨";
echo " setting defconfig for tsubasa <blue_tsubasa_defconfig>";
echo;
ARCH=arm CROSS_COMPILE=${TC} make blue_tsubasa_defconfig;
echo "- ok";
read -p "press [enter] to continue";;
3) cd ./; clear;
echo "¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨";
echo " setting defconfig for mint <blue_mint_defconfig>";
echo;
ARCH=arm CROSS_COMPILE=${TC} make blue_mint_defconfig;
echo "- ok";
read -p "press [enter] to continue";;
4) cd ./; clear;
echo "¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨";
echo " setting defconfig for hayabusa <blue_hayabusa_defconfig>";
echo;
ARCH=arm CROSS_COMPILE=${TC} make blue_hayabusa_defconfig;
echo "- ok";
read -p "press [enter] to continue";;
5) cd ./; clear;
echo "¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨";
echo " set other defconfig";
echo; echo "write yourself (e.g 'blue_tsubasa_defconfig'";
echo; read defconfig;
ARCH=arm CROSS_COMPILE=${TC} make $defconfig;
read -p "press [enter] to continue";;
6) cd ./; clear;
echo "¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨";
echo " running menuconfig <make menuconfig>";
echo;
ARCH=arm CROSS_COMPILE=${TC} make menuconfig;
read -p "press [enter] to continue";;
7) cd ./; clear;
echo "¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨";
echo " build kernel with -j? <make>";
echo; echo "enter a number which goes 'make -j<here>' and press enter";
echo; read J_PER_CORE;
ARCH=arm CROSS_COMPILE=${TC} make -j$J_PER_CORE;
read -p "press [enter] to continue";;
Q) clear; echo "press [enter] to kill script."; read; exit;;
q) clear; echo "press [enter] to kill script."; read; exit;;
esac
clear
$START