无法找到产品“cm_oneplus2”的config makefile

时间:2016-01-27 07:17:21

标签: android linux git makefile

我一直在尝试为OnePlus Two构建AOSP ROM。

  1. 我在working-dir中创建了一个ubuntu's home文件夹。安装了所有必需的工具和脚本,如java,python,make,git和一些lib文件。

  2. 我已经下载了压缩源(包括No .repo文件夹),所以我只有aosp5.1.0个文件夹。我在这里下载了它们。 (Heavily Compressed Android Sources)。使用终端将其提取到working-dir

  3. 我已从此存储库克隆device tree

  4. https://github.com/krishna422/android_device_oneplus_oneplus2进入working-dir / device / oneplus / oneplus2

    1. 我从此存储库中克隆了kernel source
    2. https://github.com/krishna422/android_kernel_oneplus_msm8994进入working-dir / kernel / oneplus / oneplus2

      1. 我从此存储库中克隆了vendor tree
      2. https://github.com/krishna422/proprietary_vendor_oneplus进入working-dir / vendor / oneplus / oneplus2

        所以working-dir中的文件是,

          

        aosp5.1.0,设备,内核,供应商

        aosp5.1.0中的

        文件是

        Files in aosp5.1.0 Screenshot

        我已经复制了

          

        working-dir / device / oneplus / folder进入aosp5.1.0 / device

        然后,我打开cmd,导航到aosp5.1.0文件夹,键入source build/envsetup.sh

        我得到了

        krishna@krishna:~/working-dir/aosp5.1.0$ source build/envsetup.sh
        
        including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
        including device/generic/mini-emulator-arm64/vendorsetup.sh
        including device/generic/mini-emulator-x86_64/vendorsetup.sh
        including device/generic/mini-emulator-x86/vendorsetup.sh
        including device/generic/mini-emulator-mips/vendorsetup.sh
        including evice/oneplus/android_device_oneplus_oneplus2/vendorsetup.sh
        including sdk/bash_completion/adb.bash
        

        然后我输入lunch我得到了,

        krishna@krishna:~/working-dir/aosp5.1.0$ lunch
        You're building on Linux
        
        Lunch menu... pick a combo:
             1. aosp_arm-eng
             2. aosp_arm64-eng
             3. aosp_mips-eng
             4. aosp_mips64-eng
             5. aosp_x86-eng
             6. aosp_x86_64-eng
             7. m_e_arm-userdebug
             8. mini_emulator_arm64-userdebug
             9. mini_emulator_x86_64-userdebug
             10. mini_emulator_x86-userdebug
             11. mini_emulator_mips-userdebug
             12. cm_oneplus2-user
             13. cm_oneplus2-userdebug
             14. cm_oneplus2-eng
        
        Which would you like?
        

        当我选择12,13,14时,我收到以下错误,其他错误正常。

        build/core/product_config.mk:222: *** Can not locate config makefile for product "cm_oneplus2".  Stop.
        
        ** Don't have a product spec for: 'cm_oneplus2'
        ** Do you have the right repo manifest?
        
        krishna@krishna:~/working-dir/aosp5.1.0$
        

        请帮忙

1 个答案:

答案 0 :(得分:5)

您需要在设备树中有一个名为AndroidProducts.mk的文件。在其中添加如下内容。

PRODUCT_MAKEFILES := \
    $(LOCAL_DIR)/oneplus2.mk

它应与vendorsetup.sh中的内容相匹配,oneplus2.mk应该存在。