forked from rombaby/Mi2-2s-aries--CM_EX-Patch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_kernel.sh
executable file
·33 lines (28 loc) · 983 Bytes
/
build_kernel.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
#!/bin/bash
# set toolchain
export ARCH=arm
#export CROSS_COMPILE=/home/simin/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf-
export CROSS_COMPILE=/home/simin/gcctools/gcc-a15/arm-cortex_a15-linux-gnueabihf-linaro_4.9/bin/arm-cortex_a15-linux-gnueabihf-
#export CROSS_COMPILE=/home/simin/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf-
# make zImage
mkdir -p ./out/done/modules/
#cm11的配置文件
# make O=./out cyanogen_cm11-ex_aries_defconfig
#cm12的配置文件
make O=./out cyanogen_aries_defconfig
make -j8 O=./out
# Copy Kernel Image and Modules
if [ $? -eq 0 ]
then
echo "==================================="
echo " Compile success!"
echo "==================================="
cd out
cp -f ./arch/arm/boot/zImage ./done/
cp -r `find -iname '*.ko'` ./done/modules/
cd -
else
echo "==================================="
echo " Compile failed!"
echo "==================================="
fi