-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrelease_obs.sh
90 lines (75 loc) · 2.02 KB
/
release_obs.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
#
JOBS=`grep -c processor /proc/cpuinfo`
let JOBS=${JOBS}*2
JOBS="-j${JOBS}"
ARM=arm
BOOT_PATH="arch/${ARM}/boot"
IMAGE="zImage"
DZIMAGE="dzImage"
CHIPSET=sc9830
RELEASE=${1}
MODEL=${2}
CARRIER=${3}
REGION=${4}
OPERATOR=${5}
VARIANT="${MODEL}"
if [ "${CARRIER}" != "" ]; then
VARIANT="${VARIANT}_${CARRIER}"
fi
if [ "${REGION}" != "" ]; then
VARIANT="${VARIANT}_${REGION}"
fi
if [ "${OPERATOR}" != "" ]; then
VARIANT="${VARIANT}_${OPERATOR}"
fi
if [ "${VARIANT}" == "${MODEL}" ]; then
echo "base_def : ${MODEL}_defconfig , Release : ${RELEASE}"
else
echo "base_def : ${MODEL}_defconfig , variant_def : ${VARIANT}_defconfig, Release : ${RELEASE}"
fi
if [ "${RELEASE}" = "usr" ]; then
echo "Now disable CONFIG_TIZEN_SEC_KERNEL_ENG for ${MODEL}_defconfig"
sed -i 's/CONFIG_TIZEN_SEC_KERNEL_ENG=y/\# CONFIG_TIZEN_SEC_KERNEL_ENG is not set/g' arch/${ARM}/configs/${MODEL}_defconfig
if [ "$?" != "0" ]; then
echo "Failed to disable CONFIG_TIZEN_SEC_KERNEL_ENG feature"
exit 1
fi
echo "Now disable CONFIG_DYNAMIC_DEBUG for ${MODEL}_defconfig"
sed -i 's/CONFIG_DYNAMIC_DEBUG=y/\# CONFIG_DYNAMIC_DEBUG is not set/g' arch/${ARM}/configs/${MODEL}_defconfig
if [ "$?" != "0" ]; then
echo "Failed to disable CONFIG_DYNAMIC_DEBUG feature"
exit 1
fi
fi
if [ "${VARIANT}" == "${MODEL}" ]; then
make ARCH=${ARM} ${MODEL}_defconfig
else
make ARCH=${ARM} ${MODEL}_defconfig VARIANT_DEFCONFIG=${VARIANT}_defconfig
fi
if [ "$?" != "0" ]; then
echo "Failed to make defconfig :"${ARCH}
exit 1
fi
rm ${BOOT_PATH}/dts/*.dtb -f
make ${JOBS} ARCH=${ARM} ${IMAGE}
if [ "$?" != "0" ]; then
echo "Failed to make "${IMAGE}
exit 1
fi
make ARCH=${ARM} dtbs
if [ "$?" != "0" ]; then
echo "Failed to make dtbs"
exit 1
fi
DTC_PATH="scripts/dtc/"
dtbtool -o ${BOOT_PATH}/merged-dtb -p ${DTC_PATH} -v ${BOOT_PATH}/dts/
if [ "$?" != "0" ]; then
echo "Failed to make merged-dtb"
exit 1
fi
mkdzimage -o ${BOOT_PATH}/${DZIMAGE} -k ${BOOT_PATH}/${IMAGE} -d ${BOOT_PATH}/merged-dtb
if [ "$?" != "0" ]; then
echo "Failed to make mkdzImage"
exit 1
fi