3 JOBS=`grep -c processor /proc/cpuinfo`
6 BOOT_PATH="arch/arm/boot"
11 CONFIG_STR=${INPUT_STR%_smk_dis*}
12 #CONFIG_STR=${INPUT_STR%_tima_en*}
13 OPTION_STR=${INPUT_STR#*${CONFIG_STR}}
16 echo "defconfig : ${CONFIG_STR}_defconfig , option : ${OPTION_STR}, Release : ${INPUT_STR2}"
18 if [ "${OPTION_STR}" = "_smk_dis" ]; then
19 echo "Now change smack-disable for ${CONFIG_STR}_defconfig"
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"
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"
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"
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"
46 if [ "${OPTION_STR}" = "_tima_en" ]; then
47 echo "Now change tima enable for ${CONFIG_STR}_defconfig"
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"
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"
62 if [ "${INPUT_STR2}" = "USR" ]; then
63 echo "Now disable CONFIG_SLP_KERNEL_ENG for ${CONFIG_STR}_defconfig"
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"
72 make ARCH=arm ${CONFIG_STR}_defconfig
73 if [ "$?" != "0" ]; then
74 echo "Failed to make defconfig"
78 make $JOBS zImage ARCH=arm
79 if [ "$?" != "0" ]; then
80 echo "Failed to make zImage"
84 DTC_PATH="scripts/dtc/"
86 rm $BOOT_PATH/dts/*.dtb -f
89 if [ "$?" != "0" ]; then
90 echo "Failed to make dtbs"
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"
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"