android 2.3.4 移植 到tiny6410

來源:互聯網
上載者:User

在Fedora 14(32位)上編譯android2.3.4 源碼,定製廠商 編譯記錄。

準備 : 下載android 2.3.4的源碼,友善t提供的2.3.4 的源碼。

工具:友善交叉編譯工具

首先看編譯源碼

#source build/envsetup.sh 
#make

出錯
Checking build tools versions...
build/core/main.mk:76: ************************************************************
build/core/main.mk:77: You are attempting to build on a 32-bit system.
build/core/main.mk:78: Only 64-bit build environments are supported beyond froyo/2.2.
build/core/main.mk:79: ************************************************************
build/core/main.mk:80: *** stop.  Stop.

修改build/core/main.mk檔案將
#ifneq (64,$(findstring 64,$(build_arch)))
改為
ifneq (i686,$(findstring i686,$(build_arch)))
修改external/clearsilver/cs
external/clearsilver/cgi
external/clearsilver/java-jni
external/clearsilver/util
中的
#LOCAL_CFLAGS += -m64
#LOCAL_LDFLAGS += -m64
改為
LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32

再編譯
#make
幾小時後,出錯:
sh: gperf: command not found
calling gperf failed: 32512 at ./makeprop.pl line 96.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h] Error 25
make: *** Deleting file `out/target/product/generic/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/CSSPropertyNames.h'

安裝gperf
#yum install gperf
再次編譯
#make

成功產生
Generated: (out/target/product/generic/android-info.txt)

二 定製

建立vendor檔案夾及相關子目錄檔案。參考友善vendor/friendly-arm/mini6410

改成自己想要的名稱

/home/android-20120519/Android-2.3.4 友善源碼檔案路徑 //用armv6-vfp,從友善的源碼中拷貝。
cp /home/android-20120519/Android-2.3.4/build/core/combo/arch/arm/armv6-vfp.mk build/core/combo/arch/arm/
cp /home/android-20120519/Android-2.3.4/build/core/vm build/core/

拷貝友善的編譯指令碼和JDK

拷貝 /home/android-20120519/Android-2.3.4/jdk1.6.0_23.tar.gz 

 /home/android-20120519/Android-2.3.4/setenv

 /home/android-20120519/Android-2.3.4/ genimages.sh

 /home/android-20120519/Android-2.3.4/ build-android

到自己編譯源碼目錄

進入自己源碼根目錄

#build-android

出錯
make: *** No rule to make target `out/target/product/DXQ6410/obj/lib/libaudio.so', needed by `out/target/product/DXQ6410/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/LINKED/libaudioflinger.so'.  Stop.

cp /home/android-20120519/Android-2.3.4/external/android-vnc-server/ ./ -rf
cp /home/android-20120519/Android-2.3.4/external/alsa-* ./ -rf
#make clean
#build-android

出錯
system/core/debuggerd/vfp.S:21: Error: selected processor does not support `fconstd d15,#15'
make: *** [out/target/product/DXQ6410/obj/EXECUTABLES/vfp-crasher_intermediates/vfp.o] Error 1
make: *** Waiting for unfinished jobs....
修改system/core/debuggerd/vfp.S,加上 #ifdef __ARM_ARCH_7__ endif

#build-android 成功

燒錄,啟動失敗
在system/core/init/init.c 中508行增加:
if (!cur_command->func)
return;

在system/core/rootdir/Android.mk 中修改
file := $(TARGET_ROOT_OUT)/ueventd.rc
$(file) : $(LOCAL_PATH)/ueventd.rc | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
$(INSTALLED_RAMDISK_TARGET): $(file)
改為:
ifneq ($(TARGET_PROVIDES_UEVENTD_RC),true)
file := $(TARGET_ROOT_OUT)/ueventd.rc
$(file) : $(LOCAL_PATH)/ueventd.rc | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
$(INSTALLED_RAMDISK_TARGET): $(file)
endif
#make 成功
燒錄,啟動失敗

修改build/core/combo/select.mk 58行
$(combo_target)PRELINKER_MAP := $(BUILD_SYSTEM)/prelink-$(combo_os_arch).map
改為
ifeq ($($(combo_target)PRELINKER_MAP),)
$(combo_target)PRELINKER_MAP := $(BUILD_SYSTEM)/prelink-$(combo_os_arch).map
endif

將友善的build/core/prelink-linux-arm.map 拷貝覆蓋到源碼相應目錄
將友善的external/libusb 複製到源碼的external 目錄
#make
燒錄,啟動到android_ 畫面,迴圈列印init: untracked pid 1815 exited
通過logcat 
發現出錯在:

I/Zygote  ( 1816): Accepting command socket connections
D/AndroidRuntime( 1836): Shutting down VM
W/dalvikvm( 1836): threadid=1: thread exiting with uncaught exception (group=0x40263560)
E/AndroidRuntime( 1836): *** FATAL EXCEPTION IN SYSTEM PROCESS: main
E/AndroidRuntime( 1836): java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1962]:  request_suspend_state: wakeup (0->0) at 301834277699 (2013-01-07 09:29:35.480607789 UTC)
init: untracked pid 1815 exited
1816 could not load needed library 'libsystem_server.so' for 'libandroid_servers.so' (link_image[1962]:  1816 could not load needed library 'libaudioflinger.so' for 'libsystem_server.so' (link_image[1962]:  1816 could not load needed library 'libaudio.so' for
'libaudioflinger.so' (link_image[1962]:  1816 could not load needed library 'liba2dp.so' for 'libaudio.so' (load_library[1104]: Library 'liba2dp.so' not found))))
E/AndroidRuntime( 1836):        at java.lang.Runtime.loadLibrary(Runtime.java:455)
E/AndroidRuntime( 1836):        at java.lang.System.loadLibrary(System.java:554)
E/AndroidRuntime( 1836):        at com.android.server.SystemServer.main(SystemServer.java:624)
E/AndroidRuntime( 1836):        at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1836):        at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 1836):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 1836):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 1836):        at dalvik.system.NativeStart.main(Native Method)
I/Process ( 1836): Sending signal. PID: 1836 SIG: 9
E/AndroidRuntime( 1836): Error reporting crash
E/AndroidRuntime( 1836): java.lang.NullPointerException
E/AndroidRuntime( 1836):        at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:76)
E/AndroidRuntime( 1836):        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:854)
E/AndroidRuntime( 1836):        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:851)
E/AndroidRuntime( 1836):        at dalvik.system.NativeStart.main(Native Method)
I/Zygote  ( 1816): Exit zygote because system server (1836) has terminated

由於在 BoardConfig.mk 中我將# Bluetooth 設定為false,導致編譯沒有產生liba2dp.so 

更改後

BOARD_HAVE_BLUETOOTH := true
重新編譯,系統可以啟動。
但啟動中列印出一些錯誤:
binder: release 1576:1576 transaction 830 out, still active
binder: 1487:1493 transaction failed 29189, size 4-0
binder: send failed reply for transaction 830, target dead
binder: release 1636:1636 transaction 1109 out, still active
binder: 1487:1493 transaction failed 29189, size 14600-0

binder: send failed reply for transaction 1109, target dead

後續再研究。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.