-
Notifications
You must be signed in to change notification settings - Fork 1
How to: Crosscompile Demonstrator & Celix
We made simple shell scripts to do the cross-compiling for us. These scripts have been tested and confirmed working on Ubuntu 15 and Fedora systems. Page of source/compile scripts we used
Instead of the shell scripts it is also possible to cross-compile using Docker. This takes more time and is not recommended when you're editing the code often.
- Install Docker
- Download the Dockerfiles you need from below
- Make a directory on your file system where celix & demonstrator will be located
- Clone demonstrator
git clone https://github.com/INAETICS/demonstrator.git
- Checkout to the android branch
cd demonstrator && git checkout android && cd ..
- Clone Apache Celix
git clone https://github.com/apache/celix.git
- Checkout to the develop branch
cd celix && git checkout develop && cd ..
- Place the setup docker file anywhere you want on the file system (Don't put it in the folder containing celix & demonstrator)
- Build the setup ->
docker build -t setup_<cpu_abi> .
- < Dockerfile (Make sure you are in the folder where the dockerfile is and name it Dockerfile!) - Place the Build Dockerfile in the directory containing Celix and Demonstrator
- Edit the line that says
FROM
(line 16) toFROM setup_<cpu_abi>
where<cpu_abi>
can be armeabi, armeabi-v7a or aarch64 - Build it ->
docker build -t <image_name> .
(Have to be inside the directory) - Run it ->
docker run --name <container_name> <image_name>
- Copy the files from the builder to local file system ->
docker cp <container_name>:/demonstrator/deploy <path> && docker cp <container_name>:/build/output/celix <path>
Setup armeabi
Setup armeabi-v7a
Setup aarch64
Build
file foo.so
Output:
foo.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, not stripped
readelf -a -W foo.so | grep Tag
Output example
Tag Type Name/Value
Tag_CPU_name: "ARM v7"
Tag_CPU_arch: v7
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-2
Tag_FP_arch: VFPv3-D16
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_enum_size: int
Tag_ABI_HardFP_use: SP and DP
Tag_ABI_optimization_goals: Aggressive Speed
Tag_CPU_unaligned_access: v6