|
2011-11-05
, 13:00
|
|
Posts: 770 |
Thanked: 558 times |
Joined on Mar 2010
@ Abidjan
|
#2
|
|
2011-11-05
, 17:09
|
Posts: 176 |
Thanked: 190 times |
Joined on Jun 2011
@ Italy
|
#3
|
The Following User Says Thank You to blackjack4it For This Useful Post: | ||
|
2011-11-05
, 17:48
|
|
Posts: 855 |
Thanked: 612 times |
Joined on Oct 2010
@ Germany
|
#4
|
|
2011-11-05
, 23:26
|
Posts: 176 |
Thanked: 190 times |
Joined on Jun 2011
@ Italy
|
#5
|
|
2011-11-06
, 09:59
|
Posts: 1,397 |
Thanked: 2,126 times |
Joined on Nov 2009
@ Dublin, Ireland
|
#6
|
|
2011-11-06
, 10:07
|
Posts: 176 |
Thanked: 190 times |
Joined on Jun 2011
@ Italy
|
#7
|
The Following User Says Thank You to blackjack4it For This Useful Post: | ||
|
2011-11-08
, 23:17
|
Posts: 176 |
Thanked: 190 times |
Joined on Jun 2011
@ Italy
|
#8
|
|
2011-11-09
, 00:23
|
Posts: 638 |
Thanked: 1,692 times |
Joined on Aug 2009
|
#9
|
|
2011-11-09
, 08:11
|
Posts: 176 |
Thanked: 190 times |
Joined on Jun 2011
@ Italy
|
#10
|
Get in the team I wrote a how-to-compile Nitdroid on Ubuntu 11.10 for errors and hints contact me and I'll update the guide
HOW TO COMPILE NITDROID GINGERBREAD AND ICS IN UBUNTU 64 BIT 11.10
***Let's begin with build environment***
1a) Open terminal as root
2a) add-apt-repository "deb http://archive.canonical.com/ lucid partner"
3a) add-apt-repository "ppa:ferramroberto/java" (thanks to mornage for hint)
4a) apt-get update
5a) apt-get install sun-java6-jdk
6a) apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev libreadline-gplv2-dev lib32z-dev lib32readline-gplv2-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils
7a) create a file /etc/udev/rules.d/51-android.rules, paste this and save:
# adb protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>"
# fastboot protocol on passion (Nexus One)
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>"
# adb protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>"
# fastboot protocol on crespo/crespo4g (Nexus S)
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>"
***Now, let's prepare Nitdroid environment...***
1b) Open a terminal as root
2b) mkdir ~/bin
3b) PATH=~/bin:$PATH
4b) curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
5b) chmod a+x ~/bin/repo
6b) cd /home/<username>/Documents (replace <username> with your Ubuntu username)
7b) mkdir nitdroid
8b) cd nitdroid
At this point my guide splits into two parts (one for gingerbread and one for the highly experimental ics branch).
As stated here:
http://e2e.ti.com/support/embedded/a...aspx?pi24527=2
the libs for AM35x are out, so SGX support for n14 is available now here but there is the need to tweak correctly the system to use them:
http://gitorious.org/rowboat/hardwar...gx_sdk-ddk_1.8
***Steps for Gingerbread Branch***
1c) repo init -u git://gitorious.org/android-n900/nitdroid_platform_manifest.git -b gingerbread
2c) repo sync
3c) source build/envsetup.sh
4c) lunch n900-userdebug
5c) gedit frameworks/base/libs/utils/Android.mk and replace:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
with:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
6c) gedit build/core/combo/HOST_linux-x86.mk and replace
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
with
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
7c) mv /hardware/alsa_sound/Android.mk /hardware/alsa_sound/Android.mkbk
***Steps for Ice Cream Sandwich Branch***
1c) repo init -u git://gitorious.org/android-n900/nitdroid_platform_manifest.git -b ics
2c) repo sync
3c) source build/envsetup.sh
4c) lunch full-userdebug (not sure about this, have to ask e-yes because n900-userdebug does not work in ics branch and I'm not sure that full-userdebug produce the same n14_dev_snapshot content)
5c) gedit frameworks/base/libs/utils/Android.mk and replace:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)
with:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) -fpermissive
6c) gedit build/core/combo/HOST_linux-x86.mk and replace
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
with
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
7c) gedit external/mesa3d/src/glsl/linker.cpp and add this:
#include <stddef.h>
after the other #include
8c) gedit external/oprofile/libpp/format_output.h and delete at line 94 only the word "mutable"
9c) gedit external/gtest/include/gtest/internal/gtest-param-util.h and add this:
#include <cstddef>
after the other include
10c) gedit external/llvm/lib/Support/Android.mk and add the following lines:
LOCAL_C_INCLUDES += system/core/include/cutils
LOCAL_SHARED_LIBRARIES := libcutil
in the section "for the host" and in the section "for the device"
11c) gedit external/llvm/lib/Support/Mutex.cpp and after the other include add this:
#include <threads.h>
12c) gedit external/llvm/llvm-host-build.mk and add:
LOCAL_LDLIBS := -lpthread -ldl
13c) gedit external/llvm/lib/Support/Threading.cpp and after the other include add this:
#include <threads.h>
14c) gedit frameworks/compile/slang/Android.mk and replace:
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror
with
local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
15c) gedit build/core/combo/javac.mk and replace:
COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -Xmaxerrs 9999999
with
COMMON_JAVAC := javac -J-Xmx512M -target 1.5 -source 1.5 -Xmaxerrs 9999999
16c) gedit libcore/luni/src/main/java/java/lang/Enum.java and replace:
return ordinal - o.ordinal
with
return ordinal - o.ordinal ();
17c) gedit external/gtest/include/gtest/internal/gtest-param-util.h and add, after #include vector:
#include <cstddef>
***The next steps are in common for both Gingerbread and Ics branch and have to be used AFTER the previous steps of my guide***
1d) make -j 3 (loooong time to compile all sources)
2d) Install Eclipse Classic from here:
http://www.eclipse.org/downloads/
3d) Open Eclipse, choose your workspace folder and go to "Help" -> Install New Software
4d) Click Add in the top-right corner
5d) In the Add Repository dialog write "ADT Plugin" in the field "Name" and the following URL for the field "Location":
https://dl-ssl.google.com/android/eclipse/
then click OK
6d) When the "Pending" text disappears, select the checkbox of Developer Tools and click "Next" (if it asks of unsigned software installation ignore the warning and let it continue the installation)
7d) In the next window click again Next
8d) In the next window accept all License Agreements and click on Finish
9d) Restart Eclipse.
10d) When Eclipse restart, it'll ask to download a version of Android SDK necessary for the ADT Plugin. Choose to download the latest version, not the 2.1
11d) To be able to access adb anytime and anywhere from Ubuntu's Terminal, add the following to the end of either your ~/.bashrc or ~/.profile or ~/.bash_profile configuration files:
export PATH=${PATH}:/home/<yourubuntuusername>/android-sdks/tools:/home/<yourubuntuusername>/android-sdks/platform-tools
12d) Turn on the N900 in Nitdroid/Gingerbread
13d) Connect the USB cable to PC
14d) Check that N900 is recognized by the PC by typing “adb devices” in terminal...it should respond:
0123456789ABCDEF device
15d) Make the desired changes to the branch
16d) To apply your changes, do "make -j 3" again
17d) adb -p ~/nitdroid/out/target/product/n900 sync
18d) restart N900
Everytime you update your work on nitdroid files, you have only to follow the steps from 12d to 18d
Hint1:
If it gives “adb: command not found” you don't have android sdk properly configured, follow steps 2d-11d.
If adb can't find your device, try to kill the adb server and start it again (adb kill-server and adb start-server, thanks to vakkov for hint)
Hint2 (tested only for gingerbread branch):
If it gives some errors about libcamera.so copy files from the zip attachment (taken from my 2.3.7 nitdroid) into out/target/product/n900/system/lib and run "make -j 3" again (thanks to vakkov for testing this solution)
Credits for this guide goes to:
e-yes, ammyt, Google (how-to prepare android build environment), CyanogenMod, blackjack4it, XeonDead, jdm13,vakkov,xda-developers and all the mantainers of the Nitdroid project. If I forgot someone tell me and I'll add to the credits
Last edited by blackjack4it; 2012-06-05 at 12:00.