-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild_recovery_kernel.sh
More file actions
executable file
·45 lines (40 loc) · 1.55 KB
/
build_recovery_kernel.sh
File metadata and controls
executable file
·45 lines (40 loc) · 1.55 KB
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
#!/bin/bash
##############################################################################
#
# Kernel Build Script
#
##############################################################################
# 2014-06-21 Shev_t : modified
# 2011-10-24 effectivesky : modified
# 2010-12-29 allydrop : created
##############################################################################
##############################################################################
# set toolchain
##############################################################################
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=~/AndroidSources/linaro-4.9/bin/arm-eabi-
export LOCALVERSION="-recovery"
export USE_CCACHE=1
export CCACHE_DIR=~/.ccache/front-kernel
export MY_CONFIG=front_recovery_defconfig
ccache -M 5G
##############################################################################
# set variables
##############################################################################
export KERNELDIR=`pwd`
KERNEL_OUT=$KERNELDIR/obj/KERNEL_OBJ
STRIP=${CROSS_COMPILE}strip
##############################################################################
# make zImage
##############################################################################
mkdir -p $KERNEL_OUT
mkdir -p $KERNEL_OUT/tmp/kernel
mkdir -p $KERNEL_OUT/tmp/system/lib/modules
make O=$KERNEL_OUT $MY_CONFIG
make -j10 O=$KERNEL_OUT
if [ -f $KERNEL_OUT/arch/arm/boot/zImage ]
then
cp -f $KERNEL_OUT/arch/arm/boot/zImage ./
mv -f $KERNEL_OUT/arch/arm/boot/zImage $KERNEL_OUT/tmp/kernel/zImage
fi