-
Notifications
You must be signed in to change notification settings - Fork 1
/
_build-recoveryimg.sh
executable file
·56 lines (42 loc) · 1.16 KB
/
_build-recoveryimg.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
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
KERNEL_DIR=$PWD
IMAGE_NAME=recovery
BIN_DIR=out/$TARGET_DEVICE/$BUILD_TARGET/bin
OBJ_DIR=out/$TARGET_DEVICE/$BUILD_TARGET/obj
mkdir -p $BIN_DIR
mkdir -p $OBJ_DIR
. build_func
. recovery_version
echo BUILD_RECOVERYVERSION $BUILD_RECOVERYVERSION
# set build env
BUILD_LOCALVERSION=$BUILD_RECOVERYVERSION
echo ""
echo "====================================================================="
echo " BUILD START (RECOVERY VERSION $BUILD_LOCALVERSION)"
echo "====================================================================="
# copy RAMDISK
echo ""
echo "=====> COPY RAMDISK"
copy_ramdisk
echo ""
echo "=====> CREATE RELEASE IMAGE"
# clean release dir
if [ `find $BIN_DIR -type f | wc -l` -gt 0 ]; then
rm -rf $BIN_DIR/*
fi
mkdir -p $BIN_DIR
# copy zImage -> kernel
cp ./release-tools/$TARGET_DEVICE/stock-img/kernel $BIN_DIR/kernel
# create boot image
make_boot_image
# create odin image
cd $BIN_DIR
make_odin3_image
# create cwm image
make_cwm_image
cd $KERNEL_DIR
echo ""
echo "====================================================================="
echo " BUILD COMPLETED"
echo "====================================================================="
exit 0