-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-ti437x-4.14.x.sh
executable file
·44 lines (37 loc) · 1.17 KB
/
build-ti437x-4.14.x.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
#!/bin/bash
ARCH=$(uname -m)
device="ti437x"
branch="ti-img-sgx/1.14.3699939/k4.14"
#branch="ti-img-sgx/1.17.4948957/k4.14"
if [ -f .builddir ] ; then
if [ -d ./src ] ; then
rm -rf ./src || true
fi
git clone -b ${branch} https://github.com/rcn-ee/ti-omap5-sgx-ddk-linux ./src --depth=1
cd ./src/
echo "patch -p1 < ../../0001-sgx-add-fno-PIE.patch"
patch -p1 < ../../0001-sgx-add-fno-PIE.patch
echo "patch -p1 < ../../0003-gcc8.patch"
patch -p1 < ../../0003-gcc8.patch
git diff
cd ../
if [ "x${ARCH}" = "xarmv7l" ] ; then
make_options="CROSS_COMPILE= KERNELDIR=/build/buildd/linux-src TARGET_PRODUCT=${device}"
else
x86_dir="`pwd`/../../normal"
if [ -f `pwd`/../../normal/.CC ] ; then
. `pwd`/../../normal/.CC
make_options="CROSS_COMPILE=${CC} KERNELDIR=${x86_dir}/KERNEL TARGET_PRODUCT=${device}"
fi
# x86_dir="`pwd`/../../rt"
# if [ -f `pwd`/../../rt/.CC ] ; then
# . `pwd`/../../rt/.CC
# make_options="CROSS_COMPILE=${CC} KERNELDIR=${x86_dir}/KERNEL TARGET_PRODUCT=${device}"
# fi
fi
cd ./src/eurasia_km/eurasiacon/build/linux2/omap_linux
make ARCH=arm ${make_options} clean
echo "make ARCH=arm ${make_options}"
make ARCH=arm ${make_options}
fi
#