-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_arm64.sh
64 lines (52 loc) · 1.16 KB
/
make_arm64.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
# make_arm64.sh COPYRIGHT FUJITSU LIMITED 2019
#!/bin/sh
MCK_DIR=/work/mcktest/work/mck
export ARCH=$(case $(uname -p) in aarch64) echo arm64; ;; x86_64) echo x86; ;; esac)
export LIBIHK_DIR=${MCK_DIR}/lib64
export IHKUSR_INCLUDE_DIR=${MCK_DIR}/include
export LIBDIR=${MCK_DIR}/lib64
MAKECMD="make"
MAKEOPT="-j"
page_size=`getconf PAGE_SIZE`
case $page_size in
65536)
MAKEOPT+=" CPPFLAGS=\"-DCONFIG_ARM64_64K_PAGES=1\""
;;
4096)
;;
*)
echo "$(basename $0): ERROR: unsupported page size ($page_size)"
exit 1
;;
esac
if [ "$1" == "clean" ]; then
MAKECMD="make clean"
fi
while read line
do
[[ $ARCH == x86 ]] && [[ $line =~ "test_usr" ]] && continue
pushd ${line}
ADDITIONALOPT=
[[ -e Makefile.$ARCH ]] && ADDITIONALOPT="-f Makefile.$ARCH"
$MAKECMD $MAKEOPT $ADDITIONALOPT
if [ $? != 0 ]; then
exit 1
fi
popd
done < ./util/tp_list.txt
if [ "$1" == "clean" ]; then
rm -f ./bin/*
exit 0
fi
if [ ! -d ./bin ]; then
mkdir bin
fi
while read line
do
[[ $ARCH == x86 ]] && [[ $line =~ "test_usr" ]] && continue
cp ${line} ./bin/
done < ./util/bin_list.txt
for i in init exec fini check; do
install -d bin/$i
install util/$i/*.sh bin/$i/
done