diff --git a/build/envsetup.sh b/build/envsetup.sh index c70616c9eb0815fbc2d6f5bcebe5d7b4f2a266ef..633088e5eeb5224cb9ee0f404892a17e5c93a277 100644 --- a/build/envsetup.sh +++ b/build/envsetup.sh @@ -41,6 +41,9 @@ fi export GCOV_PREFIX=${MAPLE_ROOT}/report/gcda export GCOV_PREFIX_STRIP=7 +# display OS version +lsb_release -d + OS_VERSION=`lsb_release -r | sed -e "s/^[^0-9]*//" -e "s/\..*//"` if [ "$OS_VERSION" = "16" ] || [ "$OS_VERSION" = "18" ]; then OLD_OS=1 @@ -112,6 +115,7 @@ export TARGET_TOOLCHAIN=clang unset MAPLE_BUILD_TYPE export MAPLE_BUILD_TYPE=${TARGET_PROCESSOR}-${TARGET_TOOLCHAIN}-${TARGET_SCOPE} +echo "Build: $MAPLE_BUILD_TYPE" unset MAPLE_BUILD_OUTPUT export MAPLE_BUILD_OUTPUT=${MAPLE_ROOT}/output/${MAPLE_BUILD_TYPE} @@ -120,3 +124,9 @@ unset MAPLE_EXECUTE_BIN export MAPLE_EXECUTE_BIN=${MAPLE_ROOT}/output/${MAPLE_BUILD_TYPE}/bin export PATH=$PATH:${MAPLE_EXECUTE_BIN} + +if [ ! -f $MAPLE_ROOT/tools/qemu/package/usr/bin/qemu-aarch64 ]; then + echo " " + echo "!!! please run \"make setup\" to get proper qemu-aarch64" + echo " " +fi diff --git a/test/testsuite/run.py b/test/testsuite/run.py index 8b4b430682573d3a73a5a44b353ca8c0bdf032dc..760b09fa2a323793973a47dc36d94e07d7d23e8e 100644 --- a/test/testsuite/run.py +++ b/test/testsuite/run.py @@ -69,11 +69,12 @@ def construct_qemu_cmd(execute_cmd, execute_option): RUNTIME_SO = maple_out_path + "/ops/host-x86_64-" + execute_option["mrt_type"] APP_SO = os.getcwd() MPLSH = maple_out_path + "/ops/mplsh" + QEMU = maple_root + "/tools/qemu/package/usr/bin/qemu-aarch64" execute_cmd["run_case"] = ( - "/usr/bin/qemu-aarch64 " + "{QEMU} " "-L /usr/aarch64-linux-gnu -E LD_LIBRARY_PATH={LIBZ_SO}:{RUNTIME_SO}:{APP_SO} " "{MPLSH} -Xbootclasspath:libcore-all.so -cp {execute_files} " - "{execute_class} {execute_args}".format( + "{execute_class} {execute_args}".format(QEMU=QEMU, LIBZ_SO=LIBZ_SO, RUNTIME_SO=RUNTIME_SO, APP_SO=APP_SO, MPLSH=MPLSH, **execute_option ) diff --git a/tools/setup_tools.sh b/tools/setup_tools.sh index d92eca505e369dd0de7de3eeb1686f5e82246c2c..f12507754f0e553a9126e4a505bc7fc50fcdfc02 100755 --- a/tools/setup_tools.sh +++ b/tools/setup_tools.sh @@ -134,26 +134,14 @@ if [ ! -f $MAPLE_ROOT/third_party/libdex/prebuilts/aarch64-linux-gnu/libz.so.1.2 fi # install qemu-user 2.5.0 -installQemu="false"; -if [ ! -f /usr/bin/qemu-aarch64 ]; then - installQemu="true"; -else - version=`/usr/bin/qemu-aarch64 -version | sed "s/^.*version.\([0-9.]*\).*/\1/" | head -1` - if [ "$version" != "2.5.0" ]; then - installQemu="true"; - fi -fi -if [ "$installQemu" == "true" ]; then +if [ ! -f $TOOLS/qemu/package/usr/bin/qemu-aarch64 ]; then cd $TOOLS echo Start wget qemu-user ... rm -rf qemu git clone https://gitee.com/hu-_-wen/qemu.git cd qemu - echo Install qemu-aarch64 ... - # use the following to make sure only the specific version of qemu-user is isstalled - # the first version sometimes insists to install the system default qemu-user. - # sudo apt install ./qemu-user_2.5+dfsg-5ubuntu10.48_amd64.deb - sudo dpkg -i ./qemu-user_2.5+dfsg-5ubuntu10.48_amd64.deb || sudo apt install -f + mkdir -p package + dpkg-deb -R qemu-user_2.5+dfsg-5ubuntu10.48_amd64.deb package echo Installed qemu-aarch64 fi