-
Notifications
You must be signed in to change notification settings - Fork 7
/
cdpg_kernel_build.sh
executable file
·34 lines (31 loc) · 1 KB
/
cdpg_kernel_build.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
#!/bin/bash
#
wifi_3g_version="$1"
CPU_JOB_NUM=$(grep processor /proc/cpuinfo | awk '{field=$NF};END{print field+1}')
START_TIME=`date +%s`
wifi_3g_version=`echo "$wifi_3g_version" | tr '[:upper:]' '[:lower:]'`
#make distclean
if [ "$wifi_3g_version" == "3g" ]; then
echo "****************Build 3g version*******************"
else
echo "****************Build wifi version*****************"
fi
if [ "$wifi_3g_version" == "3g" ]; then
echo " "
make omap3621_cl1_3g_defconfig
#sed -i "314a CONFIG_USB_SERIAL_SIERRAWIRELESS=y\nCONFIG_CL1_3G_BOARD=y" .config
else
echo " "
make omap3621_cl1_defconfig
#sed -i 's/CONFIG_USB_SERIAL_SIERRAWIRELESS=y/CONFIG_USB_SERIAL_SIERRAWIRELESS=n/g' .config
fi
make uImage -j$CPU_JOB_NUM
#make modules
END_TIME=`date +%s`
let "ELAPSED_TIME=$END_TIME-$START_TIME"
ls arch/arm/boot/uImage &> /dev/null
if [ $? != 0 ]; then
echo "Total kernel built time = $ELAPSED_TIME seconds, FAIL !!"
else
echo "Total kernel built time = $ELAPSED_TIME seconds, Success"
fi