简体   繁体   English

在Android Lollipop上通过SSH编译并运行ARM汇编代码

[英]Compile and run ARM assembly code via SSH on Android Lollipop

I am trying to run some ARM assembly codes on Snapdragon 810 development board to evaluate performance on Cortex-A53 and A57 processors. 我正在尝试在Snapdragon 810开发板上运行一些ARM汇编代码,以评估Cortex-A53和A57处理器的性能。 My codes are nothing to do with android applications and they are C/Assembly coeds. 我的代码与android应用程序无关,它们是C / Assembly代码。 Moreover, I want to get remote access to the board preferably via SSH and run gcc commands. 此外,我想最好通过SSH远程访问开发板并运行gcc命令。 The board default OS in Android Lollipop and my first intention was to install Linux on it to make things work desirably. Android Lollipop中的主板默认操作系统,我的第一个意图是在其上安装Linux以使一切正常运行。 However, Qualcomm customer support informed me that Linux isn't supported by this board and I have to deal with Android. 但是,高通公司的客户支持告知我该主板不支持Linux,因此我必须处理Android。

I've already searched over various forums. 我已经搜索了各种论坛。 Some of them suggest to root the Android device, install QuickSSHD or SSHDroid on the device and simply SSH to it. 他们中的一些人建议将Android设备植根 ,在设备上安装QuickSSHDSSHDroid并简单地通过SSH对其进行操作。 However, I am not sure if the provided console has the capability of running gcc commands, generating executable and running it. 但是,我不确定所提供的控制台是否具有运行gcc命令,生成可执行文件并运行它的功能。 Others, suggest to generate executable using cross-compilation and push the executable via adb console and run it on the Android device. 其他人则建议使用交叉编译生成可执行文件,并通过adb控制台推送可执行文件并在Android设备上运行它。 This approach makes more sense, but I need to have remote access via SSH to the board and edit my code on the device continuously. 这种方法更有意义,但是我需要通过SSH远程访问开发板并在设备上连续编辑代码。

My question is, what is the best and easiest approach to get remote access via SSH to this device, compile and run C/ARM Assembly code, transfer files and get the real timing of my codes?! 我的问题是,什么是通过SSH对此设备进行远程访问,编译和运行C / ARM汇编代码,传输文件并获取我的代码的真实时间的最佳和最简便的方法?

Cross compile is the easiest option to generate the executable. 交叉编译是生成可执行文件的最简单选项。 Else you will have to port GCC to the target first. 否则,您将必须首先将GCC移植到目标。 Don't even bother. 甚至不用理会。

And Adb is a lot better when dealing with Android devices as you need not install any additional applications/executables to get it working. 而且,与Android设备打交道时,Adb会好很多,因为您无需安装任何其他应用程序/可执行文件即可使其正常运行。 Adb can work on TCP connection as well. Adb也可以在TCP连接上工作。 So there is no need of SSH for the task. 因此,该任务不需要SSH。 And if the device is rooted, "adb root" followed by "adb shell" would give you the root console. 如果设备已植根,则“ adb root”后跟“ adb shell”将为您提供根控制台。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM