-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-all-isp-mkpartial.sh
executable file
·136 lines (99 loc) · 3.48 KB
/
build-all-isp-mkpartial.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#!/bin/sh
if [ "$1" != "" ]; then
#echo "Arg 1 is BUILD_TYPE: Release or Debug ->"
#echo $1
BUILD_TYPE=$1
else
BUILD_TYPE=Release
fi
if [ "$2" != "" ]; then
#echo "Arg 2 is Branch: -> "
#echo $2
BRANCH=$2
else
BRANCH=temp_partial_branch
fi
BUILD_TYPE=`echo ${BUILD_TYPE}| tr '[:upper:]' '[:lower:]'`
BUILD=partial
echo "BUILD_TYPE: ${BUILD_TYPE}"
echo "BRANCH: ${BRANCH}"
# Step 0
rm -rf appshell/build
mkdir -p appshell/build
cd appshell/build
git reset HEAD --hard
git clean -fd
git branch ${BRANCH}
git checkout ${BRANCH}
# Step 1
echo "Make Partial build --------------------->"
if [ "$BUILD_TYPE" = 'release' ]
then
echo "Release build --------------------->"
cmake -DCMAKE_BUILD_TYPE=release -DISP_VERSION=ISP8000NANO_V1802 -DPLATFORM=ARM64 -DAPPMODE=V4L2 -DQTLESS=1 -DFULL_SRC_COMPILE=1 -DWITH_DWE=1 -DWITH_DRM=1 -DSERVER_LESS=1 -DSUBDEV_V4L2=1 -DENABLE_IRQ=1 -DSDKTARGETSYSROOT=$SDKTARGETSYSROOT -Wno-dev -DIMX_G2D=ON ..
else
echo "Debug build --------------------->"
cmake -DCMAKE_BUILD_TYPE=debug -DISP_VERSION=ISP8000NANO_V1802 -DPLATFORM=ARM64 -DAPPMODE=V4L2 -DQTLESS=1 -DFULL_SRC_COMPILE=1 -DWITH_DWE=1 -DWITH_DRM=1 -DSERVER_LESS=1 -DSUBDEV_V4L2=1 -DENABLE_IRQ=1 -DSDKTARGETSYSROOT=$SDKTARGETSYSROOT -Wno-dev -DIMX_G2D=ON ..
fi
echo "Starting Build --------------------->"
# Step 2
make -j4
echo "Pruning build --------------------->"
# Step 3 and 4
cd -
#cd dewarp/proprietories/
#sh mkpartitionbuild.sh
#cd -
# Step 5 and 6
cd units/mkrel/ISP8000NANO_V1802
sh mkpartitionbuild.sh
cd -
rm -rf appshell/build
mkdir -p appshell/build
cd appshell/build
echo "Starting rebuild --------------------->"
# Step 7
if [ "$BUILD_TYPE" = 'release' ]
then
echo "Release build --------------------->"
cmake -DCMAKE_BUILD_TYPE=release -DISP_VERSION=ISP8000NANO_V1802 -DPLATFORM=ARM64 \
-DAPPMODE=V4L2 -DQTLESS=1 -DFULL_SRC_COMPILE=1 -DWITH_DWE=1 -DWITH_DRM=1 \
-DSERVER_LESS=1 -DSUBDEV_V4L2=1 -DENABLE_IRQ=1 -DPARTITION_BUILD=0 -D3A_SRC_BUILD=0 -DSDKTARGETSYSROOT=$SDKTARGETSYSROOT -DIMX_G2D=ON .. -Wno-dev
else
echo "Debug build --------------------->"
cmake -DCMAKE_BUILD_TYPE=debug -DISP_VERSION=ISP8000NANO_V1802 -DPLATFORM=ARM64 \
-DAPPMODE=V4L2 -DQTLESS=1 -DFULL_SRC_COMPILE=1 -DWITH_DWE=1 -DWITH_DRM=1 \
-DSERVER_LESS=1 -DSUBDEV_V4L2=1 -DENABLE_IRQ=1 -DPARTITION_BUILD=0 -D3A_SRC_BUILD=0 -DSDKTARGETSYSROOT=$SDKTARGETSYSROOT -DIMX_G2D=ON .. -Wno-dev
fi
#Step 8
make -j4
cd -
echo "Rebuild completed --------------------->"
git rm -rf tuning-*
git status -s | grep "?? " | gawk '{print $2}' | xargs git add
git status -s | grep " D " | gawk '{print $2}' | xargs git rm
git commit -s -m "New partial build ${BRANCH}"
echo "Packaging the build --------------------->"
# copy the build results
BUILD_OUTPUT_DIR=build_output_${BUILD_TYPE}_${BUILD}
rm -rfv ${BUILD_OUTPUT_DIR}.tgz ${BUILD_OUTPUT_DIR}
if [ "$BUILD_TYPE" = 'release' ]
then
BUILD_DIR=release
else
BUILD_DIR=debug
fi
ISP_LIB_DIR=${BUILD_OUTPUT_DIR}/usr/lib
ISP_BIN_DIR=${BUILD_OUTPUT_DIR}/opt/imx8-isp/bin
ISP_BOOT_DIR=${BUILD_OUTPUT_DIR}/boot
mkdir -p ${ISP_LIB_DIR}
mkdir -p ${ISP_BIN_DIR}
mkdir -p ${ISP_BOOT_DIR}
cp -a appshell/build/generated/${BUILD_DIR}/lib/*.so* ${ISP_LIB_DIR}
cp -a appshell/build/generated/${BUILD_DIR}/bin/* ${ISP_BIN_DIR}
cp -ra mediacontrol/case/ ${ISP_BIN_DIR}
cp -ra dewarp/dewarp_config/ ${ISP_BIN_DIR}
cp -a utils3rd/tools/ISP8000NANO_V1802/* ${ISP_BIN_DIR}
chmod +x ${ISP_BIN_DIR}/run.sh
chmod +x ${ISP_BIN_DIR}/memtool
tar zcvf ${BUILD_OUTPUT_DIR}.tgz ${BUILD_OUTPUT_DIR}