How to build .so file on Android 6.0 source

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to build .so file on Android 6.0 source

1,342 Views
wangvictor
Contributor III

Hi All,

I'm using iMX6 sabresd and building image for Android 6.0.

Here is my Android.mk.

hardware/ril/ublox_ril/CORE/Android.mk

#
# Copyright 2010 Intrinsyc Software International, Inc. All rights reserved.
#

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
ND/te_base.cpp \
ND/te.cpp \
ND/systemmanager.cpp \
ND/radio_state.cpp \
silo.cpp \
ND/silo_voice.cpp \
ND/silo_network.cpp \
ND/misc.c \
ND/silo_sim.cpp \
ND/silo_data.cpp \
ND/silo_phonebook.cpp \
ND/silo_sms.cpp \
ND/channel_nd.cpp \
channelbase.cpp \
channel_atcmd.cpp \
channel_data.cpp \
channel_DLC2.cpp \
channel_DLC6.cpp \
channel_DLC8.cpp \
port.cpp \
ND/callbacks.cpp \
ND/file_ops.cpp \
ND/rildmain.cpp \
ND/sync_ops.cpp \
ND/thread_ops.cpp \
ND/ril_result_nd.cpp \
cmdcontext.cpp \
command.cpp \
globals.cpp \
rilchannels.cpp \
response.cpp \
request_info_table.cpp \
thread_manager.cpp \
ND/silo_factory.cpp \
ND/MODEMS/te_inf_u120.cpp \
ND/MODEMS/te_cdma.cpp \
ND/MODEMS/te_modem_toby_R2.cpp \
ND/MODEMS/silo_voice_inf.cpp \
ND/MODEMS/silo_sim_inf.cpp \
ND/MODEMS/silo_sms_inf.cpp \
ND/MODEMS/silo_data_inf.cpp \
ND/MODEMS/silo_network_inf.cpp \
ND/MODEMS/silo_phonebook_inf.cpp

LOCAL_SHARED_LIBRARIES := \
libcutils libutils

#librilutils is required for Android 4.4 and above
ifeq (1,$(strip $(shell expr $(PLATFORM_VERSION) \>= 4.4)))
LOCAL_SHARED_LIBRARIES += librilutils
endif

LOCAL_CFLAGS = -DRIL_RADIO_RESILIENCE

LOCAL_CFLAGS += -DDEBUG
#LOCAL_CFLAGS += -DRIL_ENABLE_CHANNEL_DATA1
LOCAL_CFLAGS += -DRIL_ENABLE_SIMTK
LOCAL_CFLAGS += -DUSE_STK_RAW_MODE
#LOCAL_CFLAGS += -DRIL_JB_RAT_REMAPPING

#PLATFORM_VERSION is checked at compile-time and the corresponding flag is defined
# Setting flags for android jellybeans (4.1 - 4.3)
ifeq (1,$(strip $(shell expr $(PLATFORM_VERSION) \>= 4.1)))
ifeq (1,$(strip $(shell expr $(PLATFORM_VERSION) \< 4.4)))
LOCAL_CFLAGS += -DANDROID_JB
endif
endif

# Setting flags for android kitkat (4.4.x)
ifneq ($(shell echo '$(PLATFORM_VERSION)' | grep '^4.4'),)
LOCAL_CFLAGS += -DANDROID_KK
endif

# Setting flags for android lollipop (5.x.x)
ifneq ($(shell echo '$(PLATFORM_VERSION)' | grep '^5'),)
LOCAL_CFLAGS += -DANDROID_LP
endif

# Setting flags for android marshmallow (6.x.x)
ifneq ($(shell echo '$(PLATFORM_VERSION)' | grep '^6'),)
LOCAL_CFLAGS += -DANDROID_MM
$(warning "winmate victor the value of LOCAL_PATH is $(LOCAL_MODULE)")
endif

#include this if you want a TIMEBOMB.
#LOCAL_CFLAGS += -DTIMEBOMB

LOCAL_C_INCLUDES := \
$(KERNEL_HEADERS) \
$(LOCAL_PATH)/ND \
$(LOCAL_PATH)/ND/MODEMS \
$(LOCAL_PATH)/MODEMS \
$(LOCAL_PATH)/../INC \
$(LOCAL_PATH)/../OEM/ND \
$(LOCAL_PATH)/../UTIL/ND


#build shared library
LOCAL_PRELINK_MODULE := false
LOCAL_STRIP_MODULE := true
LOCAL_SHARED_LIBRARIES += \
librapid-ril-util \
librapid-ril-oem
#LOCAL_LDLIBS += -lpthread
#Modification required by Android 4.3
LOCAL_LDLIBS += -llog
LOCAL_CFLAGS += -DRIL_SHLIB -Os
LOCAL_MODULE:= librapid-ril-core
$(warning "winmate victor the value of LOCAL_PATH is $(LOCAL_MODULE)")
LOCAL_MODULE_TAGS:= optional
include $(BUILD_SHARED_LIBRARY)

And it suppose to build the librapid-ril-core.so out and put it under folder out/.

But I can't build any.

The weird thing is when I compiling there is no error came out.

I'm sure that computer did run into this file cause I had print the log.

Why can't I build the librapid-ril-core.so out?

Labels (4)
0 Kudos
Reply
3 Replies

1,055 Views
jamesbone
NXP TechSupport
NXP TechSupport

Firstly your .mk file  should be included by your last dir.

Secondly, you should add in librapid PRODUCT_PACKAGE which is in  device/fsl/imx6/imx6.mk

0 Kudos
Reply

1,055 Views
wangvictor
Contributor III

I add it in this file device/fsl/FM100A/BoardConfig.mk

.
.
.

RIL_COM_INTERFACE := usb
PRODUCT_PACKAGES += librapid-ril-core \
gsm0710muxd \
chat

PRODUCT_PACKAGES += rild
PRODUCT_COPY_FILES += \
system/core/rootdir/init.usb.rc:root/init.usb.rc \
system/core/rootdir/init.trace.rc:root/init.trace.rc \
build/target/product/rootdir/etc/init.gprs-pppd:system/bin/init.gprs-pppd \
build/target/product/rootdir/etc/init_data_android_6:system/bin/init_data \
build/target/product/rootdir/etc/stop_data_android_6:system/bin/stop_data \
build/target/product/rootdir/etc/ppp/chap-secrets:system/etc/ppp/chap-secrets \
build/target/product/rootdir/etc/ppp/ip-down:system/bin/ip-down \
build/target/product/rootdir/etc/ppp/ip-up:system/bin/ip-up \
build/target/product/rootdir/etc/ppp/chap-secrets:system/etc/ppp/pap-secrets \
build/target/product/rootdir/etc/ppp/stop_pppd:system/bin/stop_pppd \
build/target/product/rootdir/etc/uril/repository.txt:system/etc/uril/repository.txt \
build/target/product/rootdir/etc/uril-repo.sh:system/bin/uril-repo.sh \
build/target/product/rootdir/etc/static_apn:system/bin/static_apn

PRODUCT_COPY_FILES += \
build/target/product/rootdir/etc/stop_muxd:system/bin/stop_muxd \
build/target/product/rootdir/etc/ppp/cdma-chat-isp:/system/etc/ppp/cdma-chat-isp \
build/target/product/rootdir/etc/ppp/peers/cdma-usb-gprs1:system/etc/ppp/peers/cdma-usb-gprs1 \
build/target/product/rootdir/etc/ppp/chat-isp1:/system/etc/ppp/chat-isp1 \
build/target/product/rootdir/etc/ppp/chat-isp2:/system/etc/ppp/chat-isp2 \
build/target/product/rootdir/etc/ppp/chat-isp3:/system/etc/ppp/chat-isp3 \
build/target/product/rootdir/etc/ppp/chat-isp4:/system/etc/ppp/chat-isp4 \
build/target/product/rootdir/etc/ppp/peers/usb-gprs1:system/etc/ppp/peers/usb-gprs1 \
build/target/product/rootdir/etc/ppp/peers/usb-gprs2:system/etc/ppp/peers/usb-gprs2 \
build/target/product/rootdir/etc/ppp/peers/usb-gprs3:system/etc/ppp/peers/usb-gprs3 \
build/target/product/rootdir/etc/ppp/peers/usb-gprs4:system/etc/ppp/peers/usb-gprs4

I did have add the PRODUCT_PACKAGES and I also check that compiler did run this file.

Any help?

Thanks in Advanced!

0 Kudos
Reply

1,055 Views
wangvictor
Contributor III

jamesbone

First: What did you mean included by my last dir?

Second : I've check the PRODUCT_PACKAGE is already write in the device/fsl/FM100A/BoardConfig.mk which is my customize file.

0 Kudos
Reply