0

I am a beginner with gem5 but I want to know how I can run an application on gem5. I want to run a smartphone app on the gem5. I checked the gem5 website but I have not found any explanation.

Ciro Santilli
  • 3,693
  • 1
  • 18
  • 44
Ali Ahmad
  • 47
  • 3
  • Have you checked the Learning gem5 tutorial (https://www.gem5.org/documentation/learning_gem5/introduction/)? It explains what is gem5, how it works, and how to work with it. Then, to build Android you can follow the steps in https://www.gem5.org/documentation/general_docs/fullsystem/building_android_m. Finally, it should be "straightforward" (there may be some bumps along the road) to run it with the tips provided by Ciro. – Daniel Carvalho Jun 21 '20 at 13:41

1 Answers1

0

Boot Android and run your app on it.

There are no Android automated setups that I know of, but in theory it is the same as regular Linux build. Except that it is way slower because userland init is huge, and the Android build system is clunky when you want to e.g. add your app to the image: How do I add APKs in an AOSP build?

Start with a Linux minimal setup to learn the basics. Sample setup here.

I'd also Android boot on QEMU first to make sure the image is working working since QEMU is way faster: https://stackoverflow.com/a/48310014/895245

It would be cool to do it in syscall emulation as well, but likely not feasible for real apps since they require heavily on services running on the background. Which is why userland init is way slower.

Ciro Santilli
  • 3,693
  • 1
  • 18
  • 44