Revert "drm/prime: resolve race for drm_gem_prime_handle_to_fd()"
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / release_obs.sh
1 #!/bin/bash
2 #
3 JOBS=`grep -c processor /proc/cpuinfo`
4 let JOBS=${JOBS}*2
5 JOBS="-j${JOBS}"
6 BOOT_PATH="arch/arm/boot"
7 ZIMAGE="zImage"
8 DZIMAGE="dzImage"
9
10 INPUT_STR=${1}
11 CONFIG_STR=${INPUT_STR%_smk_dis*}
12 #CONFIG_STR=${INPUT_STR%_tima_en*}
13 OPTION_STR=${INPUT_STR#*${CONFIG_STR}}
14
15 INPUT_STR2=${2}
16 echo "defconfig : ${CONFIG_STR}_defconfig , option : ${OPTION_STR}, Release : ${INPUT_STR2}"
17
18 if [ "${OPTION_STR}" = "_smk_dis" ]; then
19         echo "Now change smack-disable for ${CONFIG_STR}_defconfig"
20
21         sed -i 's/CONFIG_SECURITY_SMACK=y/\# CONFIG_SECURITY_SMACK is not set/g' arch/arm/configs/${CONFIG_STR}_defconfig
22         if [ "$?" != "0" ]; then
23                 echo "Failed to change smack-disable step 1"
24                 exit 1
25         fi
26
27         sed -i 's/\# CONFIG_DEFAULT_SECURITY_DAC is not set/CONFIG_DEFAULT_SECURITY_DAC=y/g' arch/arm/configs/${CONFIG_STR}_defconfig
28         if [ "$?" != "0" ]; then
29                 echo "Failed to change smack-disable step 2"
30                 exit 1
31         fi
32
33         sed -i 's/CONFIG_DEFAULT_SECURITY_SMACK=y/\# CONFIG_DEFAULT_SECURITY_SMACK is not set/g' arch/arm/configs/${CONFIG_STR}_defconfig
34         if [ "$?" != "0" ]; then
35                 echo "Failed to change smack-disable step 3"
36                 exit 1
37         fi
38
39         sed -i 's/CONFIG_DEFAULT_SECURITY="smack"/CONFIG_DEFAULT_SECURITY=""/g' arch/arm/configs/${CONFIG_STR}_defconfig
40         if [ "$?" != "0" ]; then
41                 echo "Failed to change smack-disable step 4"
42                 exit 1
43         fi
44 fi
45
46 if [ "${OPTION_STR}" = "_tima_en" ]; then
47         echo "Now change tima enable for ${CONFIG_STR}_defconfig"
48
49         sed -i 's/\# CONFIG_TIMA is not set/CONFIG_TIMA=y/g' arch/arm/configs/${CONFIG_STR}_defconfig
50         if [ "$?" != "0" ]; then
51                 echo "Failed to change tima enable step 1"
52                 exit 1
53         fi
54
55         sed -i 's/\# CONFIG_TIMA_LOG is not set/CONFIG_TIMA_LOG=y/g' arch/arm/configs/${CONFIG_STR}_defconfig
56         if [ "$?" != "0" ]; then
57                 echo "Failed to change tima enable step 2"
58                 exit 1
59         fi
60 fi
61
62 if [ "${INPUT_STR2}" = "USR" ]; then
63         echo "Now disable CONFIG_SLP_KERNEL_ENG for ${CONFIG_STR}_defconfig"
64
65         sed -i 's/CONFIG_SLP_KERNEL_ENG=y/\# CONFIG_SLP_KERNEL_ENG is not set/g' arch/arm/configs/${CONFIG_STR}_defconfig
66         if [ "$?" != "0" ]; then
67                 echo "Failed to disable CONFIG_SLP_KERNEL_ENG feature"
68                 exit 1
69         fi
70 fi
71
72 make ARCH=arm ${CONFIG_STR}_defconfig
73 if [ "$?" != "0" ]; then
74         echo "Failed to make defconfig"
75         exit 1
76 fi
77
78 make $JOBS zImage ARCH=arm
79 if [ "$?" != "0" ]; then
80         echo "Failed to make zImage"
81         exit 1
82 fi
83
84 DTC_PATH="scripts/dtc/"
85
86 rm $BOOT_PATH/dts/*.dtb -f
87
88 make ARCH=arm dtbs
89 if [ "$?" != "0" ]; then
90         echo "Failed to make dtbs"
91         exit 1
92 fi
93
94 dtbtool -o $BOOT_PATH/merged-dtb -p $DTC_PATH -v $BOOT_PATH/dts/
95 if [ "$?" != "0" ]; then
96         echo "Failed to make merged-dtb"
97         exit 1
98 fi
99
100 mkdzimage -o $BOOT_PATH/$DZIMAGE -k $BOOT_PATH/zImage -d $BOOT_PATH/merged-dtb
101 if [ "$?" != "0" ]; then
102         echo "Failed to make mkdzImage"
103         exit 1
104 fi