-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_kernel_s
More file actions
executable file
·46 lines (40 loc) · 1.45 KB
/
build_kernel_s
File metadata and controls
executable file
·46 lines (40 loc) · 1.45 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
46
#!/bin/bash
#
#****************************************************************
## Set basic parameters:
trgt=$1
finalout=$2
androidtop=$3
secsign=$4
name=$5
version=$6
cm=$7
#****************************************************************
## Clean build environment:
cd $androidtop
make installclean
rm $finalout/boot.img
#****************************************************************
## Set kernel version in init:
cd $androidtop/kernel/samsung/aries
sed "/Mackay/c\ \" ("`echo $name`_`echo $version`")\"" $androidtop/kernel/samsung/aries/init/version.c > $androidtop/kernel/samsung/aries/init/version.vc
mv $androidtop/kernel/samsung/aries/init/version.vc $androidtop/kernel/samsung/aries/init/version.c
git add $androidtop/kernel/samsung/aries/init/version.c
git commit -m "Bump kernel version to `echo $version`"
#****************************************************************
## Build the kernel:
cd $androidtop
. build/envsetup.sh
breakfast $trgt
mka bootimage
#****************************************************************
## Check whether other prerequisites need to be build:
if [ ! -e $androidtop/out/host/linux-x86/framework/signapk.jar ]
then
echo "Signapk.jar not found, rebuilding..."
mka signapk
fi
#****************************************************************
## Finish off the kernel by packing it in a zip:
colour=cmc
build_kernel_s_finalize "${trgt}" "${finalout}" "${androidtop}" "${secsign}" "${name}" "${version}" "${colour}" "${cm}"