1. 程式人生 > >[RK3399][Android7.1] 除錯筆記 --- 模組編譯32位動態庫

[RK3399][Android7.1] 除錯筆記 --- 模組編譯32位動態庫

Platform: RK3399
OS: Android 7.1
Board: Firefly-RK3399

需求
系統HAL的camera庫camera.rk30board.so使用的是32位版本的。
而單獨編譯模組(命令是#make camera.rk30board_32 -j8 )出來卻只有64位版本,位於 system/lib64/hw下面。

理論上根據Android.mk的規則應該是32和64都會編譯的,不過單獨編譯模組的時候可能只包含了64位版本的處理。如官方的一句話所說:

這裡寫圖片描述

Android.mk

ifneq ($(strip $(TARGET_2ND_ARCH)
), ) LOCAL_MULTILIB := both //表示3264版本都編譯 endif

解決方法

#make camera.rk30board_32 -j8

Build Log:

[ 64% 9/14] target SharedLib: camera.rk30board_32 (out/target/product/rk3399_firefly_edp_box/obj_arm/SHARED_LIBRARIES/camera.rk30board_intermediates/LINKED/camera.rk30board.so)
[ 71% 10/14] target Pack Relocations: camera.rk
30board_32 (out/target/product/rk3399_firefly_edp_box/obj_arm/SHARED_LIBRARIES/camera.rk30board_intermediates/PACKED/camera.rk30board.so) [ 78% 11/14] target Symbolic: camera.rk30board_32 (out/target/product/rk3399_firefly_edp_box/symbols/system/lib/hw/camera.rk30board.so) [ 85% 12/14] target Strip: camera.rk30board_32 (out
/target/product/rk3399_firefly_edp_box/obj_arm/lib/camera.rk30board.so) [100% 14/14] Install: out/target/product/rk3399_firefly_edp_box/system/lib/hw/camera.rk30board.so [100% 14/14] build out/target/product/rk3399_firefly_edp_box/obj_arm/lib/camera.rk30board.so.toc