用午餐构建非官方的 LineageOS 端口
Building unofficial LineageOS port with lunch
我正在为 Samsung Galaxy Ace 4 Neo SM-G316ML 开发一个非官方的 LOS 14.1 端口。我目前在 GitLab 中有 LOS 和内核源代码, 而不是 GitHub。
我创建了包含以下内容的 local_manifest.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="gitlab"
fetch="https://gitlab.com/"
revision="cm-14.1" />
<project name="Megver83/android_device_samsung_vivalto3mve3gltn" path="device/samsung/vivalto3mve3gltn" remote="gitlab" />
<project name="Megver83/android_kernel_samsung_vivalto3mve3gltn" path="kernel/samsung/vivalto3mve3gltn" remote="gitlab" />
</manifest>
效果很好(repo sync
同步良好)。然后(当然在 . build/envsetup.sh
之后)我添加了 luch 组合:
$ add_lunch_combo lineage_vivalto3mve3gltn-userdebug
但丑陋的部分来了:
$ lunch lineage_vivalto3mve3gltn-userdebug
build/core/config.mk:676: COMMON_GLOBAL_C(PP)FLAGS changed
build/core/config.mk:680: *** bailing.... Stop.
Device vivalto3mve3gltn not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Repository for vivalto3mve3gltn not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
build/core/config.mk:676: COMMON_GLOBAL_C(PP)FLAGS changed
build/core/config.mk:680: *** bailing.... Stop.
build/core/config.mk:676: COMMON_GLOBAL_C(PP)FLAGS changed
build/core/config.mk:680: *** bailing.... Stop.
** Don't have a product spec for: 'lineage_vivalto3mve3gltn'
** Do you have the right repo manifest?
我不明白,因为根据我的阅读here,这个函数用于编译非官方构建,但是错误消息说找不到设备 LineageOS 的Github .
那么,编译非官方 LOS 版本的正确方法是什么?
提前致谢
终于得到答案in this XDA thread
go to build/core and gedit config.mk.
Then add # to each line like shown below
only to these lines:
# ################################################## #############
# Set up final options.
# ################################################## #############
#ifneq ($(COMMON_GLOBAL_CFLAGS)$(COMMON_GLOBAL_CPPFLAGS), )
#$(warning COMMON_GLOBAL_C(PP)FLAGS changed)
#$(info *** Device configurations are no longer allowed to change the global flags.)
#$(info *** COMMON_GLOBAL_CFLAGS: $(COMMON_GLOBAL_CFLAGS))
#$(info *** COMMON_GLOBAL_CPPFLAGS: $(COMMON_GLOBAL_CPPFLAGS))
#$(error bailing...)
#endif
问题解决了。现在我可以 lunch
/breakfast
没有问题了。
我正在为 Samsung Galaxy Ace 4 Neo SM-G316ML 开发一个非官方的 LOS 14.1 端口。我目前在 GitLab 中有 LOS 和内核源代码, 而不是 GitHub。
我创建了包含以下内容的 local_manifest.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="gitlab"
fetch="https://gitlab.com/"
revision="cm-14.1" />
<project name="Megver83/android_device_samsung_vivalto3mve3gltn" path="device/samsung/vivalto3mve3gltn" remote="gitlab" />
<project name="Megver83/android_kernel_samsung_vivalto3mve3gltn" path="kernel/samsung/vivalto3mve3gltn" remote="gitlab" />
</manifest>
效果很好(repo sync
同步良好)。然后(当然在 . build/envsetup.sh
之后)我添加了 luch 组合:
$ add_lunch_combo lineage_vivalto3mve3gltn-userdebug
但丑陋的部分来了:
$ lunch lineage_vivalto3mve3gltn-userdebug
build/core/config.mk:676: COMMON_GLOBAL_C(PP)FLAGS changed
build/core/config.mk:680: *** bailing.... Stop.
Device vivalto3mve3gltn not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Repository for vivalto3mve3gltn not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
build/core/config.mk:676: COMMON_GLOBAL_C(PP)FLAGS changed
build/core/config.mk:680: *** bailing.... Stop.
build/core/config.mk:676: COMMON_GLOBAL_C(PP)FLAGS changed
build/core/config.mk:680: *** bailing.... Stop.
** Don't have a product spec for: 'lineage_vivalto3mve3gltn'
** Do you have the right repo manifest?
我不明白,因为根据我的阅读here,这个函数用于编译非官方构建,但是错误消息说找不到设备 LineageOS 的Github .
那么,编译非官方 LOS 版本的正确方法是什么?
提前致谢
终于得到答案in this XDA thread
go to build/core and gedit config.mk. Then add # to each line like shown below
only to these lines:
# ################################################## #############
# Set up final options.
# ################################################## #############
#ifneq ($(COMMON_GLOBAL_CFLAGS)$(COMMON_GLOBAL_CPPFLAGS), )
#$(warning COMMON_GLOBAL_C(PP)FLAGS changed)
#$(info *** Device configurations are no longer allowed to change the global flags.)
#$(info *** COMMON_GLOBAL_CFLAGS: $(COMMON_GLOBAL_CFLAGS))
#$(info *** COMMON_GLOBAL_CPPFLAGS: $(COMMON_GLOBAL_CPPFLAGS))
#$(error bailing...)
#endif
问题解决了。现在我可以 lunch
/breakfast
没有问题了。