Hello NXP Team,
I am trying to cross-compile NXP_WTS_DUT_AGENT (version 1.8) for the Android Platform. I am using a W8897 Wifi-BT chipset and a non-NXP processor running Android OS.
I am able to compile for a Linux Host machine but not able to cross-compile for Android. I need your help with the same. I have referred the Release Notes but could not find relevant information for my issue.
Thanks & Regards
Meetali Patel
Hello @weidong_sun,
Is it required to enable the DMV_PLATFORM_ANDROID flag in Makefile.inc, when compiling/cross-compiling the WTS DUT Agent for the android platform?
Please refer to the attached screenshot for the steps to build given in the release notes of the package.
Is this flag required only for specific platforms or it is for any android device?
Enabling the DMV_PLATFORM_ANDROID flag will also enable other flags in the Makefile.inc file. Please share the flags required to compile/cross-compile the WTS DUT Agent source for the android platform. Attaching the Makefile.inc for your reference.
Thanks and Regards,
Nandan Khant
Hello @weidong_sun ,
I followed the same steps mentioned in the document shared by you for i.MX8MQ processor and Android 11_2.6.0.
I am able to generate the binaries of aarch64 architecture.
When I copied the same binaries and tried to execute the binaries I got the error /system/bin/sh: ./wfa_dut: No such file or directory. Attaching a screenshot for your reference.
Can you please help to create binaries that are executing on the target platform?
Hello @nandan-khant ,
Probably you should give it executive feature like this:
# chmod a+x ./wfa_dut
then try to execute it.
Regards,
weidong
Hello @weidong_sun,
The files already have the executable permissions.
I have tried the command shared by you again, but the result is the same. Getting error of /system/bin/sh: ./wfa_dut: No such file or directory
Attaching a screenshot for your reference.
Thanks & Regards,
Nandan Khant
Hello @nandan-khant ,
It seems that you want to run it on android command line, right?
If yes, don't do it like this.
you can use adb on linux terminal or windows cmd, then enter into android command line using "sudo adb shell".
Regards,
weidong
@weidong_sun We tried the updated steps but the result is the same. The binaries that are generated are for x86 architecture and not ARM.
Do we need to modify anything in "Makefile.inc" file for the Android platform?
Hello @meetalipatel ,
In Makefile.inc,
CC = $(CROSS_COMPILE)gcc -I /opt/android-aarch64-linux-gnu/gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include
regards,
weidong
@weidong_sun Yes we tried that. What I meant is apart from this change any other CFLAGS related change?
Hello @meetalipatel ,
I didn't modify others in Makefile.
what I used is arm 8.3 cross compiler and clang.
Regards,
weidong
Thanks for the response @weidong_sun.
I did try to perform the steps you mentioned, but the binary which is generated is for x86 and not for ARM.
Please note that we are setting up the android build environment as given in this link: https://source.android.com/docs/setup/build/building
1. source build/envsetup.sh
2. lunch <our-device>
Hello @meetalipatel ,
I spent some time in cross compiling the version WTS source code on linux & android, and wrote a document, for you reference.
See attachment, please!
Sorry! Removed and updated it.
Regards,
weidong