【发布时间】:2016-01-20 03:00:45
【问题描述】:
我的构建系统是 Android 6.0。我正在从源代码构建 AOSP。我想在生成的 system.img 中包含多个预构建文件。 我知道我可以使用 device.mk 中的 PRODUCT_COPY_FILES 来复制预建文件。但是,由于某些原因,我无法修改系统文件。 如何在 Android.mk 中做到这一点?
例如,我想将 test1.txt 和 test2.txt 复制到 /system/etc。我写了一个Android.mk,如下所示。
SMB_CONFIG_FILES := test1.txt test2.txt
SMB_CONFIG_TARGET := $(addprefix $(TARGET_OUT)/etc/, $(SMB_CONFIG_FILES))
ALL_PREBUILT += $(SMB_CONFIG_TARGET)
$(SMB_CONFIG_TARGET) : $(TARGET_OUT)/etc/% : $(LOCAL_PATH)/% | $(ACP)
$(transform-prebuilt-to-target)
然后我运行“make”来构建整个源代码,但它显示了
build/core/main.mk:517: *** Some files have been added to ALL_PREBUILT.
build/core/main.mk:518: *
build/core/main.mk:519: * ALL_PREBUILT is a deprecated mechanism that
build/core/main.mk:520: * should not be used for new files.
build/core/main.mk:521: * As an alternative, use PRODUCT_COPY_FILES in
build/core/main.mk:522: * the appropriate product definition.
build/core/main.mk:523: * build/target/product/core.mk is the product
build/core/main.mk:524: * definition used in all products.
build/core/main.mk:525: *
build/core/main.mk:526: * unexpected test1.txt in ALL_PREBUILT
build/core/main.mk:526: * unexpected test2.txt in ALL_PREBUILT
build/core/main.mk:527: *
build/core/main.mk:528: *** ALL_PREBUILT contains unexpected files. Stop.
似乎我无法在 Android 6.0 中使用 ALL_PREBUILT。 我该如何解决这个问题?谢谢。
【问题讨论】:
标签: android