我一直在尝试为OnePlus Two构建AOSP ROM。
我在working-dir
中创建了一个ubuntu's home
文件夹。安装了所有必需的工具和脚本,如java,python,make,git和一些lib文件。
我已经下载了压缩源(包括No .repo
文件夹),所以我只有aosp5.1.0
个文件夹。我在这里下载了它们。 (Heavily Compressed Android Sources)。使用终端将其提取到working-dir
。
我已从此存储库克隆device tree
https://github.com/krishna422/android_device_oneplus_oneplus2进入working-dir / device / oneplus / oneplus2
kernel source
https://github.com/krishna422/android_kernel_oneplus_msm8994进入working-dir / kernel / oneplus / oneplus2
vendor tree
https://github.com/krishna422/proprietary_vendor_oneplus进入working-dir / vendor / oneplus / oneplus2
所以working-dir
中的文件是,
aosp5.1.0,设备,内核,供应商
aosp5.1.0
中的文件是
我已经复制了
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$
请帮忙
答案 0 :(得分:5)
您需要在设备树中有一个名为AndroidProducts.mk
的文件。在其中添加如下内容。
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/oneplus2.mk
它应与vendorsetup.sh
中的内容相匹配,oneplus2.mk
应该存在。