Android Add Board and Product




比較簡單的方式


直接複製 board product generic 目錄的檔案 ,再作一些修改




1)在 android 根目錄下執行


. build/envsetup.sh


2)建立自己的 board


copy build/target/board/generic to build/target/board/machine_name


修改 build/target/product/AndroidProduct.mk,增加


$(LOCAL_DIR)/machine_name.mk \


copy build/target/product/generic.mk to build/target/product/machine_name.mk


修改


# Overrides


PRODUCT_BRAND := machine_name


PRODUCT_DEVICE := machine_name


PRODUCT_NAME := machine_name


3tapas


tapas

第一步,選取標裝置


Build for the simulator or the device?


1. Device


2. Simulator


Which would you like? [1]


第二步,選取標程式碼格式:
Build type choices are:


1. release


2. debug


Which would you like? [1] 1


第三步,選取產品平台: 這裡如果有建立product 可以在這裡選
Which product would you like? [generic]
machine_name


第四步,在參數建立平台。
Variant choices are:


1. user 2. userdebug


3. eng


Which would you like? [eng]


============================================


PLATFORM_VERSION_CODENAME=Eclair


PLATFORM_VERSION=Eclair


TARGET_PRODUCT=machine_name


TARGET_BUILD_VARIANT=eng


TARGET_SIMULATOR=false


TARGET_BUILD_TYPE=release


TARGET_ARCH=arm


HOST_ARCH=x86


HOST_OS=linux


HOST_BUILD_TYPE=release


BUILD_ID=ECLAIR


============================================


以上只是簡單的複製generic,還需依照版子裝置作修改






編譯看看




......


target Non-prelinked: logwrapper (out/debug/target/product/machine_name/symbols/system/bin/logwrapper)


Install: out/debug/target/product/machine_name/system/bin/logwrapper


make: *** No rule to make target `out/debug/target/product/machine_name/obj/lib/libcamera.so', needed by `out/debug/target/product/machine_name/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so'. Stop.






須在你新增的machine_name目錄下的


BoardConfig.mk


新增




USE_CAMERA_STUB := true




再編譯一次吧

創作者介紹
創作者 立你斯 的頭像
立你斯

立你斯學習記錄

立你斯 發表在 痞客邦 留言(0) 人氣()