repo sync 完成後,要設定 product 相關的設定。
rom-manager 好像是內鍵的,所以要先download apk.. vendor/cyanogen/get-rommanager.sh
然後一樣:
. build/envsetup.sh
lunch cm_hero-userdebug
這樣, script 會去 cyanogen 的 github download 該 target product 需要的 device/vendor/ 下的檔案。完成 lunch 的動作。
接下來作 lunch 時,發生錯誤。
ref: http://csidiropoulos.wordpress.com/2012/11/06/devicehtcaceace-mk-does-not-exist-stop-cyanogenmod/
修改 vendor/cyanogen/products/AndroidProducts.mk
只留下 hero 這個 mk 就可以。
其他行都刪掉。
-- 還有,是
lunch full_hero-userdebug
奇怪,要是用
lunch cyanogen_hero-userdebug
的話,就沒有 error 了呀。也不用改 AndroidProducts.mk
最後的 make hero 也不行,沒有 hero 這個 target。
要用
make otapackage
.. 當然,還是 fail...
改 checkout release version - gb-release-7.2
到 .repo/manifest 下,用 git diff origin/gb-release-7.2 看一下。
果然, 一堆 devices/htc/ 下的裝置目錄,在 gb-release-7.2 都有被加入。
所以 作 lunch 時,不會有 htc_ace.mk 找不到的問題。
看了一下 manifest 的 git log ,發現這個:
commit d33c1afc194cfc402f4e5edc37dbef1bafea35df Author: Ricardo CerqueiraDate: Sat Oct 6 04:01:53 2012 +0100 manifest: Remove repositories serviceable by roomservice Let's be nice to github (and avoid getting locked out again). CM7 has supported roomservice for months, there's no reason for its configuration to be different from CM9 and above. There's no need to pull these 88 repositories when bootstrapping CM7. It's over 6GB worth of data that's useless when you want to build a single device. Change-Id: I75cad7a78d41c2abe8db6f3443fa0efae8a50b32
應該就是這個,2012, 10 月,開始加入 roomservice,所以不必把所有的 device configuration file 都拉下來。
而且順便知道,CM9 沒有這個問題 -- 因為 CM9 早就 support roomservice
所以直接 init -b gb-release-7.2 ,然後 . build/envsetup 之後,lunch 就會出現一堆product可以選
.. 結果,使用 branch gb-release-7.2 也一樣,lunch full_hero-userdebug 有 error:
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[vendor/cyanogen/products/cyanogen_mecha.mk]]: "device/htc/mecha/device_mecha.mk" does not exist. Stop.
Device hero not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Found repository: android_device_htc_hero
Syncing repository to retrieve project.
Traceback (most recent call last):
File "/home/charles-chang/gb-release-7.2/.repo/repo/main.py", line 408, in
_Main(sys.argv[1:])
File "/home/charles-chang/gb-release-7.2/.repo/repo/main.py", line 388, in _Main
result = repo._Run(argv) or 0
File "/home/charles-chang/gb-release-7.2/.repo/repo/main.py", line 122, in _Run
copts, cargs = cmd.OptionParser.parse_args(argv)
File "/home/charles-chang/gb-release-7.2/.repo/repo/command.py", line 45, in OptionParser
self._Options(self._optparse)
File "/home/charles-chang/gb-release-7.2/.repo/repo/subcmds/sync.py", line 147, in _Options
self.jobs = self.manifest.default.sync_j
File "/home/charles-chang/gb-release-7.2/.repo/repo/manifest_xml.py", line 256, in default
self._Load()
File "/home/charles-chang/gb-release-7.2/.repo/repo/manifest_xml.py", line 304, in _Load
self._ParseManifest(nodes)
File "/home/charles-chang/gb-release-7.2/.repo/repo/manifest_xml.py", line 389, in _ParseManifest
(project.name, self.manifestFile))
error.ManifestParseError: duplicate project CyanogenMod/android_device_htc_hero in /home/charles-chang/gb-release-7.2/.repo/manifest.xml
Done!
build/core/product_config.mk:196: *** _nic.PRODUCTS.[[vendor/cyanogen/products/cyanogen_mecha.mk]]: "device/htc/mecha/device_mecha.mk" does not exist. Stop.
缺 cyanogen_mecha.mk,只好去把她從 AndroidProduct.mk 刪掉....結果還是有一堆:
diff --git a/products/AndroidProducts.mk b/products/AndroidProducts.mk
index 106dcbc..5425161 100644
--- a/products/AndroidProducts.mk
+++ b/products/AndroidProducts.mk
@@ -36,7 +36,6 @@ PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/cyanogen_leo.mk \
$(LOCAL_DIR)/cyanogen_liberty.mk \
$(LOCAL_DIR)/cyanogen_mango.mk \
- $(LOCAL_DIR)/cyanogen_mecha.mk \
$(LOCAL_DIR)/cyanogen_mesmerizemtd.mk \
$(LOCAL_DIR)/cyanogen_mimmi.mk \
$(LOCAL_DIR)/cyanogen_morrison.mk \
@@ -55,9 +54,6 @@ PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/cyanogen_sholes.mk \
$(LOCAL_DIR)/cyanogen_showcasemtd.mk \
$(LOCAL_DIR)/cyanogen_smb_a1002.mk \
- $(LOCAL_DIR)/cyanogen_smb_a1004.mk \
- $(LOCAL_DIR)/cyanogen_smb_a1011.mk \
- $(LOCAL_DIR)/cyanogen_smb_b9701.mk \
$(LOCAL_DIR)/cyanogen_smultron.mk \
$(LOCAL_DIR)/cyanogen_speedy.mk \
$(LOCAL_DIR)/cyanogen_supersonic.mk \
這樣改以後,lunch 選完就不會有 error 了。
沒有留言:
張貼留言