-
Notifications
You must be signed in to change notification settings - Fork 1
/
compile.sh
executable file
·59 lines (53 loc) · 1.15 KB
/
compile.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
export CROSS_COMPILE_HOST=$CROSS_COMPILE
export CROSS_COMPILE_TA=$CROSS_COMPILE
if [ -z "$INSTALL_MOD_PATH" ];then
echo Please specify INSTALL_MOD_PATH; exit 1
fi
if [ "$1" != "clean" ]; then
if [ -d images ]; then
rm -rf images;
fi
echo "Building Secure Storage TA";
cd secure_storage_ta;
make clean;
make;
cd -;
echo ""
echo "Building Secure Key Kernel Module";
cd securekeydev;
make clean;
make;
make modules_install;
cd -;
echo "Building Secure Object Library";
cd securekey_lib;
make clean;
make;
cd -;
echo "Building Secure Object OpenSSL Engine";
cd secure_obj-openssl-engine;
make clean;
make;
cd -;
mkdir images;
cp secure_storage_ta/ta/b05bcf48-9732-4efa-a9e0-141c7c888c34.ta images;
cp securekey_lib/out/export/lib/libsecure_obj.so images;
cp securekey_lib/out/export/app/* images;
cp securekeydev/securekeydev.ko images;
cp secure_obj-openssl-engine/libeng_secure_obj.so secure_obj-openssl-engine/app/sobj_eng_app images;
else
echo "Cleaning TA, Secure Obj Lib and Securekeydev"
cd secure_storage_ta;
make clean;
cd -;
cd securekeydev;
make clean;
cd -;
cd securekey_lib;
make clean;
cd -;
cd secure_obj-openssl-engine;
make clean;
cd -;
rm -rf images;
fi