本帖最后由 huts 于 2013-6-14 19:52 編輯
環境:
debian 6
gcc 4.7
1, 構建自己的git源碼服務器
詳見以前我寫的:在本地建立android源碼鏡像
(http://www.zg4o1577.cn/bbs/dpj-19130-1.html)只是這里不是android.git.kernel.org/platform/manifest.git
而是github.com/OpenEtna/android_manifest.git
2, 修改android_manifest
## 克隆項目
git clone -b froyofile:///home/fi9/android/git-server/github.com/OpenEtna/android_manifest.git
cd android_manifest
vi default.xml ## 編輯
修改git服務地址
<remote name="korg"
fetch="file:///home/fi9/android/git-server/android.git.kernel.org/"
review="review.source.android.com" />
<remote name="github"
fetch="file:///home/fi9/android/git-server/github.com/"review="review.cyanogenmod.com" />
屏掉android_device_advent_vega
<!-- <project path="device/advent/vega"
name="CyanogenMod/android_device_advent_vega" remote="github"
revision="master" /> -->
## 提交
git commit -a
## 上傳
git push
3, 下來就是參照openetna的手冊進行取源碼、編譯
詳見:http://code.google.com/p/openetna/wiki/BuildFromSource
其中有如下不同:
A, 安裝一些工具
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl sun-java6-jdk zlib1g-dev gcc-multilib g++-multilib \
x11proto-core-dev \
libx11-dev lzma
sudo update-java-alternatives -s java-6-sun ## 換java和javac
B, 取源碼(我們的源碼服務器已經在本地):
repo init-ufile:///home/fi9/android/git-server/github.com/OpenEtna/android_manifest.git -b froyo
4, 由于我使用的debian版本比較新,gcc的版本也就很新,是4.7,而以前都是用4.4,因此編譯中出現了不少問題:
A, 根據https://groups.google.com/forum/ ... uilding/2EwtWQTqjdI中的fix 1, 2, 3 解決了三問題
B, 根據https://github.com/CyanogenMod/a ... eb8d1ffe13e95445af3的patch 解決了以下出現的webkit問題
target Generated: libwebcore <=
external/webkit/WebCore/xml/XSLTProcessor.idl
target Generated: libwebcore <=
external/webkit/WebCore/dom/make_names.pl
target Generated: libwebcore <=
external/webkit/WebCore/dom/make_names.pl
target Generated: libwebcore <=
external/webkit/WebCore/dom/make_names.pl
Unknown parameter a interfaceName for tags/attrs
make: ***
[out/target/product/eve/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/JSHTMLElementWrapperFactory.h]
Error
255
make: *** Waiting for unfinished jobs....
Unknown parameter a interfaceName for tags/attrs
make: ***
[out/target/product/eve/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLElementFactory.h]
Error
255
Unknown parameter a interfaceName for tags/attrs
make: ***
[out/target/product/eve/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/HTMLNames.h]
Error
255
...
C, 自行解決了以下的問題(其實就是和A問題一樣)
Install: out/host/linux-x86/bin/mkbootimg
host C++: mksnapshot <= external/v8/src/accessors.cc
In file included from external/v8/src/v8.h:63:0,
from external/v8/src/accessors.cc:28:
external/v8/src/objects.h: In instantiation of
‘v8::internal::PropertyDetails v8::internal::Dictionary<Shape,
Key>::DetailsAt(int) [with Shape =
v8::internal::StringDictionaryShape; Key = v8::internal::String*]’:
external/v8/src/property.h:189:62: required from here
external/v8/src/objects.h:2140:71: error: ‘get’ was not declared in
this scope, and no declarations were found by argument-dependent lookup
at the point of instantiation [-fpermissive]
external/v8/src/objects.h:2140:71: note: declarations in dependent base
‘v8::internal::FixedArray’ are not found by unqualified lookup
external/v8/src/objects.h:2140:71: note: use ‘this->get’ instead
external/v8/src/objects.h: In instantiation of ‘v8::internal::Object*
v8::internal::Dictionary<Shape, Key>::ValueAt(int) [with Shape =
v8::internal::StringDictionaryShape; Key = v8::internal::String*]’:
external/v8/src/property.h:248:78: required from here
external/v8/src/objects.h:2128:60: error: ‘get’ was not declared in
this scope, and no declarations were found by argument-dependent lookup
at the point of instantiation [-fpermissive]
....
fix:
vi external/v8/Android.mksnapshot.mk
Add '-fpermissive' to line 60
LOCAL_CFLAGS := \
-Wno-endif-labels \
-Wno-import \
-Wno-format \
-ansi \
-fno-rtti \
-DENABLE_DEBUGGER_SUPPORT \
-DV8_NATIVE_REGEXP -fpermissive
DONE! 完成ROM的編譯.
下來就是把openeve的kernel與openetna的FS結合起來
再再下來就是看如何調試
再再再下來就是添刪改調
....
|