git 无法找到产品“cm_oneplus2”的配置生成文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/35030987/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 11:44:13  来源:igfitidea点击:

Can not locate config makefile for product "cm_oneplus2"

androidlinuxgitmakefile

提问by Krishna Krish

I've been trying to build AOSP ROM for OnePlus Two.

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

  1. I've made a working-dirfolder in my ubuntu's home. Installed all required tools and scripts like, java, python, make, git and some lib files.

  2. I've downloaded compressed sources(No .repofolder included), so I've only aosp5.1.0folder with me. I've downloaded them form here. (Heavily Compressed Android Sources). Extracted them to working-dirusing terminal.

  3. I've cloned device treefrom this repository

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

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

  3. 我已经device tree从这个存储库克隆

https://github.com/krishna422/android_device_oneplus_oneplus2into working-dir/device/oneplus/oneplus2

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

  1. I've cloned kernel sourcefrom this repository
  1. 我已经kernel source从这个存储库克隆

https://github.com/krishna422/android_kernel_oneplus_msm8994into working-dir/kernel/oneplus/oneplus2

https://github.com/krishna422/android_kernel_oneplus_msm8994进入working-dir/kernel/oneplus/oneplus2

  1. I've cloned vendor treefrom this repository
  1. 我已经vendor tree从这个存储库克隆

https://github.com/krishna422/proprietary_vendor_oneplusinto working-dir/vendor/oneplus/oneplus2

https://github.com/krishna422/proprietary_vendor_oneplus进入working-dir/vendor/oneplus/oneplus2

So the files in working-dirare,

所以里面的文件working-dir是,

aosp5.1.0, device, kernel, vendor

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

files in aosp5.1.0are

文件aosp5.1.0

Files in aosp5.1.0 Screenshot

aosp5.1.0文件截图

I've copied

我复制了

working-dir/device/oneplus/ folder into aosp5.1.0/device

工作目录/设备/oneplus/文件夹到aosp5.1.0/device

then, I opened cmd, navigated to aosp5.1.0folder typed source build/envsetup.sh

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

I got

我有

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

then I typed lunchI got,

然后我打字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?

when I selected 12,13,14, I get the following error, others are working well.

当我选择时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$

Please help

请帮忙

回答by opticyclic

You need to have a file called AndroidProducts.mkin your device tree. Put something like the following in it.

您需要AndroidProducts.mk在设备树中调用一个文件。把类似下面的东西放进去。

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

It should match what you have in the vendorsetup.shand the oneplus2.mkshould exist.

它应该与您在 the 中拥有的vendorsetup.shoneplus2.mk应该存在的内容相匹配。

See the example in the LineageOS repo

请参阅 LineageOS 存储库中的示例

https://github.com/LineageOS/android_device_oneplus_oneplus2

https://github.com/LineageOS/android_device_oneplus_oneplus2