-
Notifications
You must be signed in to change notification settings - Fork 6
/
prepear.sh
executable file
·75 lines (68 loc) · 1.94 KB
/
prepear.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
#!/bin/sh
# chmod -R a+w ./kernel/arch/arm/mach-mmp/*.*
# cp -f ./kernel/product/$1/*.* ./kernel/arch/arm/mach-mmp
SRCE=./kernel/product/$1/$2
DST=./kernel/arch/arm/configs/$2
if [ -f $SRCE ]; then
if [ -f $DST ]; then
RESULT=`diff $SRCE $DST`
if [ "$RESULT " != " " ];then
cp -f $SRCE $DST
fi
else
cp -f $SRCE $DST
fi
elif [ -f ./kernel/product/common/$2 ]; then
cp -f ./kernel/product/common/$2 $DST
fi
if [ "$2" = "sp7731gea_2341a-dt_defconfig" ];then
MACH_BOARD=sprd-scx35_sp7731gea_2341A
elif [ "$2" = "sp7731gea-dt_defconfig" ];then
MACH_BOARD=sprd-scx35_sp7731gea
elif [ "$2" = "sp7731gea_hd-dt_defconfig" ];then
MACH_BOARD=sprd-scx35_sp7731gea_hd
else
MACH_BOARD=?????
fi
SRCE=./kernel/product/$1/$MACH_BOARD.dts
DST=./kernel/arch/arm/boot/dts/$MACH_BOARD.dts
if [ -f $SRCE ]; then
if [ -f $DST ]; then
RESULT=`diff $SRCE $DST`
if [ "$RESULT " != " " ];then
cp -f $SRCE $DST
fi
else
cp -f $SRCE $DST
fi
elif [ -f ./kernel/product/common/$MACH_BOARD.dts ]; then
cp -f ./kernel/product/common/$MACH_BOARD.dts $DST
fi
SRCE=./kernel/product/$1/ontim_device.c
DST=./kernel/arch/arm/mach-sc/ontim_device.c
if [ -f $SRCE ]; then
if [ -f $DST ]; then
RESULT=`diff $SRCE $DST`
if [ "$RESULT " != " " ];then
cp -f $SRCE $DST
fi
else
cp -f $SRCE $DST
fi
elif [ -f ./kernel/product/common/ontim_device.c ]; then
cp -f ./kernel/product/common/ontim_device.c $DST
fi
#SRCE=./kernel/product/$1/cust_battery_para.h
#DST=./kernel/drivers/power/cust_battery_para.h
#if [ -f $SRCE ]; then
# if [ -f $DST ]; then
# RESULT=`diff $SRCE $DST`
# if [ "$RESULT " != " " ];then
# cp -f $SRCE $DST
# fi
# else
# cp -f $SRCE $DST
# fi
#elif [ -f ./kernel/product/common/cust_battery_para.h ]; then
# cp -f ./kernel/product/common/cust_battery_para.h $DST
#fi