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}}
15 echo "defconfig : ${CONFIG_STR}_defconfig , option : ${OPTION_STR}"
17 if [ "${OPTION_STR}" = "_smk_dis" ]; then
18 echo "Now change smack-disable for ${CONFIG_STR}_defconfig"
20 sed -i 's/CONFIG_SECURITY_SMACK=y/\# CONFIG_SECURITY_SMACK is not set/g' arch/arm/configs/${CONFIG_STR}_defconfig
21 if [ "$?" != "0" ]; then
22 echo "Failed to change smack-disable step 1"
26 sed -i 's/\# CONFIG_DEFAULT_SECURITY_DAC is not set/CONFIG_DEFAULT_SECURITY_DAC=y/g' arch/arm/configs/${CONFIG_STR}_defconfig
27 if [ "$?" != "0" ]; then
28 echo "Failed to change smack-disable step 2"
32 sed -i 's/CONFIG_DEFAULT_SECURITY_SMACK=y/\# CONFIG_DEFAULT_SECURITY_SMACK is not set/g' arch/arm/configs/${CONFIG_STR}_defconfig
33 if [ "$?" != "0" ]; then
34 echo "Failed to change smack-disable step 3"
38 sed -i 's/CONFIG_DEFAULT_SECURITY="smack"/CONFIG_DEFAULT_SECURITY=""/g' arch/arm/configs/${CONFIG_STR}_defconfig
39 if [ "$?" != "0" ]; then
40 echo "Failed to change smack-disable step 4"
45 if [ "${OPTION_STR}" = "_tima_en" ]; then
46 echo "Now change tima enable for ${CONFIG_STR}_defconfig"
48 sed -i 's/\# CONFIG_TIMA is not set/CONFIG_TIMA=y/g' arch/arm/configs/${CONFIG_STR}_defconfig
49 if [ "$?" != "0" ]; then
50 echo "Failed to change tima enable step 1"
54 sed -i 's/\# CONFIG_TIMA_LOG is not set/CONFIG_TIMA_LOG=y/g' arch/arm/configs/${CONFIG_STR}_defconfig
55 if [ "$?" != "0" ]; then
56 echo "Failed to change tima enable step 2"
61 make ARCH=arm ${CONFIG_STR}_defconfig
62 if [ "$?" != "0" ]; then
63 echo "Failed to make defconfig"
67 make $JOBS zImage ARCH=arm
68 if [ "$?" != "0" ]; then
69 echo "Failed to make zImage"
73 DTC_PATH="scripts/dtc/"
75 rm $BOOT_PATH/dts/*.dtb -f
78 if [ "$?" != "0" ]; then
79 echo "Failed to make dtbs"
83 ./scripts/sprd_dtbtool.sh -p ${DTC_PATH} -v ${BOOT_PATH}/dts/
84 if [ "$?" != "0" ]; then
85 echo "Failed to make merged-dtb"
89 ./scripts/sprd_mkdzimage.sh -o ${BOOT_PATH}/${DZIMAGE} -k ${BOOT_PATH}/zImage -d ${BOOT_PATH}/merged-dtb
90 if [ "$?" != "0" ]; then
91 echo "Failed to make mkdzImage"