Skip to content

Commit 8c726fd

Browse files
authoredOct 14, 2016
Build binary for Ostro Linux platform with Travis CI. (#21)
Fix Travis CI build error 'gradlew: command not found'.
1 parent 1f29b4a commit 8c726fd

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed
 

‎.travis.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ before_script:
3131
- cp ./cgi-getfield ../dest/arm/
3232
- rm -rf *
3333

34+
#build ostro binary
35+
- ../tools/install_ostro_sdk.sh
36+
- cmake -D CMAKE_TOOLCHAIN_FILE=../ostro_toolchain.cmake ..
37+
- make
38+
- cp ./tinyweb ../dest/ostro/
39+
- cp ./cgi-getcookie ../dest/ostro/
40+
- cp ./cgi-getfield ../dest/ostro/
41+
- rm -rf *
42+
3443
#build android ndk binary
3544
- cd ../tools
3645
- ./install_android_ndk.sh
@@ -48,7 +57,7 @@ before_script:
4857
## copy busybox dest
4958
- cp -r ../tools/busybox_dest/libs ./assets/system/
5059

51-
- gradlew build --stacktrace
60+
- ./gradlew build --stacktrace
5261
- cp -r build/outputs/apk ../dest/android_PIE/
5362
- cd ..
5463

@@ -66,7 +75,7 @@ before_script:
6675
## copy busybox dest
6776
- cp -r ../tools/busybox_dest/libs ./assets/system/
6877

69-
- gradlew build --stacktrace
78+
- ./gradlew build --stacktrace
7079
- cp -r build/outputs/apk ../dest/android_non_PIE/
7180
- cd ..
7281

‎dest/ostro/ostro_dest

Whitespace-only changes.

‎ostro_toolchain.cmake

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# this one is important
2+
SET(CMAKE_SYSTEM_NAME Linux)
3+
4+
# specify the cross compiler
5+
SET(CMAKE_C_COMPILER "/usr/local/ostroxt-x86_64/sysroots/x86_64-ostroxtsdk-linux/usr/bin/x86_64-ostro-linux/x86_64-ostro-linux-clang")
6+
SET(CMAKE_CXX_COMPILER "/usr/local/ostroxt-x86_64/sysroots/x86_64-ostroxtsdk-linux/usr/bin/x86_64-ostro-linux/x86_64-ostro-linux-clang++")
7+
8+
# where is the target environment
9+
SET(CMAKE_FIND_ROOT_PATH /usr/local/ostroxt-x86_64/sysroots/corei7-64-ostro-linux)
10+
11+
# search for programs in the build host directories
12+
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
13+
# for libraries and headers in the target directories
14+
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
15+
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
16+
17+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -mlittle-endian -lpthread")
18+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 -mlittle-endian -lpthread")

‎tools/install_ostro_sdk.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env sh
2+
3+
wget https://download.ostroproject.org/releases/ostro-os-xt/milestone/v1.0.0/sdk/intel-corei7-64/ostroxt-x86_64-corei7-64-toolchain-1.0+snapshot.sh
4+
5+
chmod a+x ostroxt-x86_64-corei7-64-toolchain-1.0+snapshot.sh
6+
7+
./ostroxt-x86_64-corei7-64-toolchain-1.0+snapshot.sh -y >/dev/null 2>&1

0 commit comments

Comments
 (0)
Please sign in to comment.