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
Can not locate config makefile for product "cm_oneplus2"
提问by Krishna Krish
I've been trying to build AOSP ROM for OnePlus Two.
我一直在尝试为 OnePlus Two 构建 AOSP ROM。
I've made a
working-dir
folder in myubuntu's home
. Installed all required tools and scripts like, java, python, make, git and some lib files.I've downloaded compressed sources(No
.repo
folder included), so I've onlyaosp5.1.0
folder with me. I've downloaded them form here. (Heavily Compressed Android Sources). Extracted them toworking-dir
using terminal.I've cloned
device tree
from this repository
我
working-dir
在我的ubuntu's home
. 安装了所有必需的工具和脚本,如 java、python、make、git 和一些 lib 文件。我已经下载了压缩源(不
.repo
包括文件夹),所以我只有aosp5.1.0
文件夹。我已经在这里下载了它们。(高度压缩的 Android 源)。将它们提取到working-dir
使用终端。我已经
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
- I've cloned
kernel source
from this repository
- 我已经
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
- I've cloned
vendor tree
from this repository
- 我已经
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-dir
are,
所以里面的文件working-dir
是,
aosp5.1.0, device, kernel, vendor
aosp5.1.0,设备,内核,供应商
files in aosp5.1.0
are
文件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.0
folder 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 lunch
I 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.mk
in 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.sh
and the oneplus2.mk
should exist.
它应该与您在 the 中拥有的vendorsetup.sh
和oneplus2.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