omnirom编译过程中遇到的twrp编译不过的情况说明和解决方法

现象其实非常奇怪,之前都是好好的,突然之间报错如下:

<code>

yj@YJ /work/omnirom/bootable/recovery $ mm
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.4
TARGET_PRODUCT=omni_ef52l
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.15.7-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E3-1230_V2_@_3.30GHz-with-gentoo-2.2
HOST_BUILD_TYPE=release
BUILD_ID=KTU84P
OUT_DIR=/work/omnirom/out
============================================
PRODUCT_COPY_FILES device/pantech/ef52l/ramdisk/init.trace.rc:root/init.trace.rc ignored.
PRODUCT_COPY_FILES device/pantech/ef52l/ramdisk/init.usb.rc:root/init.usb.rc ignored.
PRODUCT_COPY_FILES device/pantech/ef52l/qwerty.kcm:system/usr/keychars/qwerty.kcm ignored.
PRODUCT_COPY_FILES device/pantech/ef52l/qwerty2.kcm:system/usr/keychars/qwerty2.kcm ignored.
PRODUCT_COPY_FILES device/pantech/ef52l/qwerty.idc:system/usr/idc/qwerty.idc ignored.
PRODUCT_COPY_FILES device/pantech/ef52l/qwerty2.idc:system/usr/idc/qwerty2.idc ignored.
PRODUCT_COPY_FILES device/pantech/ef52l/configs/init.ef52l.bt.sh:system/etc/init.qcom.bt.sh ignored.
PRODUCT_COPY_FILES device/pantech/ef52l/gps.conf:system/etc/gps.conf ignored.
No private recovery resources for TARGET_DEVICE ef52l
make: 进入目录“/work/omnirom”
Import includes file: /work/omnirom/out/target/product/ef52l/obj/EXECUTABLES/recovery_intermediates/import_includes
target thumb C++: recovery <= bootable/recovery/twrp.cpp
arm-linux-androideabi-g++: error: ": No such file or directory
make: *** [/work/omnirom/out/target/product/ef52l/obj/EXECUTABLES/recovery_intermediates/twrp.o] 错误 1
make: 离开目录“/work/omnirom”
</code>
看到了没有,非常奇怪的报错,在报错信息的error:后面有个引号。

没说的,首先干掉boot/recovery, 重新checkout,问题依旧
再干掉整个out目录重来,这个耗时比较长,问题依旧
......
再经过无数折腾,发现lunch另一机型进行make recoveryimage的时候能顺利编译完成,那么应该就是该机型的device代码造成的。
回退N个版本后发现编译通过,然后对比整个device/pantech/ef52l目录,发现在BoardConfig.mk文件中,如果添加了下面这句就会出现之前的编译错误: 
<code>
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file
</code>
这里等号后面用不用引号括起来都是一样的效果。
至此解决问题,具体原因未来得及查看twrp的源码。


你可能感兴趣的:(linux,android,recovery,omnirom,twrp)