5
droid Cross Build and SUSI_3.02 Environments Settin Modify the file android_env.mak to fit your Android version and source path $vim SUSI_3.02/ WinXP/@Trunk /android_env.mak 1. If have new version android add VER,version, ifeq ,endif and source path VER40 = 4.0 ifeq ($(VER40), $(VER)) ANDROID_SRC =/home/xxxx/ics-x86-20120415 endif 2. If use different product name to build android also need to modify it TARGET_PRODUCT := eeepc 3. Set CROSS_TOOLCHAIN path ifeq ($(VER40), $(VER)) CROSS_TOOLCHAIN = $(ANDROID_SRC)/prebuilt/linux-x86/toolchain/i686- android-linux-4.4.3 endif

Android Cross Build and SUSI_3.02 Environments Settings Modify the file android_env.mak to fit your Android version and source path $vim SUSI_3.02/ WinXP/@Trunk

Embed Size (px)

Citation preview

Page 1: Android Cross Build and SUSI_3.02 Environments Settings Modify the file android_env.mak to fit your Android version and source path $vim SUSI_3.02/ WinXP/@Trunk

Android Cross Build and SUSI_3.02 Environments Settings

Modify the file android_env.mak to fit your Android version and source path$vim SUSI_3.02/ WinXP/@Trunk /android_env.mak

1. If have new version android add VER,version, ifeq ,endif and source pathVER40 = 4.0ifeq ($(VER40), $(VER))ANDROID_SRC =/home/xxxx/ics-x86-20120415 endif

2. If use different product name to build android also need to modify itTARGET_PRODUCT := eeepc

3. Set CROSS_TOOLCHAIN pathifeq ($(VER40), $(VER))CROSS_TOOLCHAIN = $(ANDROID_SRC)/prebuilt/linux-x86/toolchain/i686-

android-linux-4.4.3endif

Page 2: Android Cross Build and SUSI_3.02 Environments Settings Modify the file android_env.mak to fit your Android version and source path $vim SUSI_3.02/ WinXP/@Trunk

4. Set CROSS_COMPILE nameifeq ($(VER40), $(VER))CROSS_COMPILE = $(CROSS_TOOLCHAIN_BIN)/i686-android-linux-endif

5. Add extra CFLAGSifeq ($(VER40), $(VER))CFLAGS += \ -Ulinux \ -mbionicendif

6. Set Android NDK include and library pathifeq ($(VER40), $(VER))NDK_INC = $(ANDROID_SRC)/prebuilt/ndk/android-ndk-r6/platforms/android-

9/arch-$(ARCH)/usr/includeNDK_LIB = $(ANDROID_SRC)/prebuilt/ndk/android-ndk-r6/platforms/android-

9/arch-$(ARCH)/usr/libendif

Page 3: Android Cross Build and SUSI_3.02 Environments Settings Modify the file android_env.mak to fit your Android version and source path $vim SUSI_3.02/ WinXP/@Trunk

7. Set Java SDK path to build FrameworkJAVA_UBUNTU=/usr/lib/jvm/jdk1.6.0_31

Page 4: Android Cross Build and SUSI_3.02 Environments Settings Modify the file android_env.mak to fit your Android version and source path $vim SUSI_3.02/ WinXP/@Trunk

Modify the Driver make file for android$vim SUSI_3.02/ WinXP/@Trunk /Drivers/Make_android

1. Driver ccflags –y need to checkccflags-y += -fno-pic -mtune=generic -msse

-fno-pic : solve NDK Toolchain and "Unknown symbol _GLOBAL_OFFSET_TABLE_" in kernel module for Android 4.0 and GCC 4.4.3

-mtune=generic –msse : solve warning: SSE instruction set disabled, using 387 arithmetics (Not use 387 in driver! 387 is 80bits but float is 64bits )

Page 5: Android Cross Build and SUSI_3.02 Environments Settings Modify the file android_env.mak to fit your Android version and source path $vim SUSI_3.02/ WinXP/@Trunk

Modify the Libary make file for android$vim SUSI_3.02/ WinXP/@Trunk /Libraries/SUSI Library/Make_android

1. Add Log library use logcat in Android to debugLOCAL_LDLIBS := -L$(ANDROID_OBJ_LIB)/ -llog

Modify the JNI Libary make file for android$vim SUSI_3.02/ WinXP/@Trunk /Libraries/Android JNI Library/Make_android

1. Set package name if need and default is com.Advantech.SUSIPACK := com.Advantech.SUS

2. Set application name if need and default is SUSILIBPACK := SUSILIB

3. Add Log library use logcat in Android to debugLOCAL_LDLIBS += -L$(ANDROID_OBJ_LIB)/ -llog