forked from thecubed/android_kernel_lge_geefhd
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathenvsetup.sh
46 lines (35 loc) · 1.53 KB
/
envsetup.sh
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
# Quick Kernel Build reference by IOMonster/TheCubed
# Do not execute this program with "./envsetup.sh" , simply source it with ". envsetup.sh"
defconfig=gkatt_bcm-perf_defconfig
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
bold=$(tput bold)
normal=$(tput sgr0)
bldrd=${bold}$(tput setaf 1)
bldgrn=${bold}$(tput setaf 2)
bldblu=${bold}$(tput setaf 4)
echo
if [ ! -f ./.config ];
then
echo "${bldrd}[WARN]${normal} No .config detected."
echo "${bldrd}[ ]${normal} Issue ${bldblu}make $defconfig${normal} to generate one."
else
echo "${bldgn}[MESG]${normal} .config file detected!"
echo "${bldgn}[ ]${normal} The build environment has been successfully set up."
fi
alias "ctop"="cd `pwd`"
alias "cmsm"="cd `pwd`/arch/arm/mach-msm"
alias "nconfig"="nano `pwd`/.config"
cat <<EOF
${bold}Build Environment Simple Reference:${normal}
${bldblu}make mrproper${normal} - cleans ALL build information, including .config
${bldblu}make clean${normal} - cleans last build output, saves .config
${bldblu}make $defconfig${normal} - copies the defconfig to .config
${bldblu}make menuconfig${normal} - spawns the .config editor
${bldblu}make zImage${normal} - builds the kernel, outputs to ./arch/arm/boot/zImage
${bold}Extra Useful Commands:${normal}
${bldblu}ctop${normal} - change the directory to the top of the kernel tree (`pwd`)
${bldblu}cmsm${normal} - change to the arch/arm/mach-msm directory
${bldblu}nconfig${normal} - nano the .config file (`pwd`/.config)
EOF