Android x86?

1,662 views
Skip to first unread message

David Simmons

unread,
Oct 21, 2008, 12:44:42 PM10/21/08
to android-porting
Has anyone looked into what it would take to port Android to x86? I'm
interested in taking a crack at porting Android to an x86-based
embedded platform I work with. I'm going to download the source later
today and have a look. My main concern is that Dalvik may be tied to
special ARM optimizations...

David

Srinath T V

unread,
Oct 21, 2008, 4:41:59 PM10/21/08
to android-porting
By porting to X86, do you mean running on smart devices like PDA and
others?

I was also looking at porting into some special hardware and add
specific applications on top of it. I assume that android does a
pretty good job of doing power management and would like to see how it
performs compared to other special OS.

Srinath

Zach Hobbs

unread,
Oct 21, 2008, 5:10:35 PM10/21/08
to android...@googlegroups.com
I'd like to port it to x86 to have the dalvik virtual machine running directly
on my linux PC instead of having it run in qemu emulating the ARM arch.

Any idea where to get started with this? Obviously it's ok if most (all) of
the telephony features don't work...

--

Zach Hobbs
HelloAndroid.com
Android OS news, tutorials, downloads

Jay Freeman (saurik)

unread,
Oct 21, 2008, 5:17:59 PM10/21/08
to android...@googlegroups.com
I believe the magic step two between "step one: download code" and "step
three: profit" is just "build code". It seems to already be ported quite
well to x86, and even has user-space reimplementations of kernel extensions
like ashmem ready to go. -J

--------------------------------------------------
From: "Zach Hobbs" <ho...@helloandroid.com>
Sent: Tuesday, October 21, 2008 2:10 PM
To: <android...@googlegroups.com>
Subject: [android-porting] Re: Android x86?

Brian Swetland

unread,
Oct 21, 2008, 8:22:41 PM10/21/08
to android...@googlegroups.com
["Jay Freeman (saurik)" <sau...@saurik.com>]

>
> I believe the magic step two between "step one: download code" and "step
> three: profit" is just "build code". It seems to already be ported quite
> well to x86, and even has user-space reimplementations of kernel extensions
> like ashmem ready to go. -J

Be aware that the SIMULATOR target (where the system sorta builds a
single big linux app) is deprecated and has a lot of problems.

That said, it should be possible to get things running on x86. We've
had somebody in-house tinkering with an x86 native port but he's on
vacation this week, so I'm not sure what the state of that is.

Brian

Jay Freeman (saurik)

unread,
Oct 21, 2008, 8:35:50 PM10/21/08
to android...@googlegroups.com
Fair enough. I got a lot of Dalvik compiling on x86 before starting on it
with my iPhone toolchain, and it at least /seemed/ complete ;P. I didn't
actually bother getting it to a runnable state or I might have noticed that
it actually wasn't. (I'm on 64-bit Debian and I didn't want to spend the
time installing 32-bit libcrypto so I could finish my -m32 build of it all.)

I had completely bypassed the build environment (I usually do so on my first
pass through so I can better isolate build environment challenges from code
challenges and also get a feel for how the codebase is organized). If it, in
fact, isn't already setup for this then other people may find that useful to
dig into things faster, so here is that script. I believe the only thing
between this and linking is having the native libcore parts compiled in
(which had enough random dependencies that I figured I'd bail before I ran
into 32-bit compatibility hell ;P, example: libcrypto).

-J

#!/bin/bash
set -e

libdex=(dalvik/libdex/*.c)
liblog=(system/core/liblog/logd_write.c)
libcutils=(system/core/libcutils/{ashmem-host,atomic,dlmalloc_stubs,mspace}.c)
bionic=(bionic/libc/bionic/dlmalloc.c)
vm=(dalvik/vm/{.,alloc,analysis,arch/generic,interp,jdwp,mterp,oo,reflect,test}/*.c)
vm[${#vm[@]}]=dalvik/vm/mterp/out/InterpC-desktop.c
libnativehelper=(dalvik/libnativehelper/*.c)
libcore=($(find dalvik/libcore -name '*.c'))

include=(-Idalvik -Iframeworks/base/include -Isystem/core/include -Iexternal/safe-iop/include
-Idalvik/libnativehelper/include/nativehelper -Idalvik/vm -Iexternal/icu4c/common
-Iexternal/icu4c/i18n)

define[${#define[@]}]=-include
gcc='gcc -m32'
define[${#define[@]}]=system/core/include/arch/linux-x86/AndroidConfig.h
define[${#define[@]}]=dalvik/vm/mterp/out/InterpAsm-desktop.S

${gcc} -o dalvikvm dalvik/dalvikvm/*.c "${libcutils[@]}"
"${libnativehelper[@]}" "${bionic[@]}" "${libdex[@]}" "${vm[@]}"
"${liblog[@]}" "${include[@]}" "${define[@]}" -lm -pthread -ldl -lz -lffi
${gcc} -o dexdump dalvik/dexdump/*.c "${liblog[@]}" "${libdex[@]}"
"${include[@]}" "${define[@]}" -lz

-J

--------------------------------------------------
From: "Brian Swetland" <swet...@google.com>
Sent: Tuesday, October 21, 2008 5:22 PM


To: <android...@googlegroups.com>
Subject: [android-porting] Re: Android x86?

>

Joe Onorato

unread,
Oct 21, 2008, 8:39:48 PM10/21/08
to android...@googlegroups.com
The x86 port is on a different branch that we haven't released yet, that has a bunch of other experimental and future work.  What's out there right now is pretty close to what's on the G1.  

We'll have that out soon hopefully, but I don't know about the time frame for sure.  We'll probably let what's out there settle down before we try to do that integration.  It'll be a fair bit of work to get that branch synced up with what we released.

-joe

fadden

unread,
Oct 23, 2008, 12:06:30 PM10/23/08
to android-porting
On Oct 21, 5:35 pm, "Jay Freeman \(saurik\)" <sau...@saurik.com>
wrote:
> Fair enough. I got a lot of Dalvik compiling on x86 before starting on it
> with my iPhone toolchain, and it at least /seemed/ complete ;P. I didn't
> actually bother getting it to a runnable state or I might have noticed that
> it actually wasn't. (I'm on 64-bit Debian and I didn't want to spend the
> time installing 32-bit libcrypto so I could finish my -m32 build of it all.)

The only part of Dalvik that isn't portable is the JNI call bridge
(see dalvik/vm/arch directory). We currently use libffi for that on
non-ARM platforms, which is a bit of a performance drag, but on most
non-ARM platforms you don't care as much. :-) I can confirm that it
runs well on x86, and once upon a time we had it running on PPC (which
is mostly interesting because it's big-endian).

The VM runtime has very few external dependencies. The core libraries
have a bit more reach. :-)

kapare

unread,
Oct 23, 2008, 12:52:13 PM10/23/08
to android-porting
Nice

Can you give me clue or example of how to compile the dalvik for x86
or PPC.

simple command line

thx

fadden

unread,
Oct 23, 2008, 7:26:42 PM10/23/08
to android-porting
On Oct 23, 9:52 am, kapare <kevyn.alexandre.p...@gmail.com> wrote:
> Can you give me clue or example of how to compile the dalvik for x86
> or PPC.

Start with:

. build/envsetup.sh
lunch 2

This configures you to build for the desktop, linking against glibc.
This mode is NOT recommended for anything but experimental use. It
may go away. Don't use it; forget you saw it. Thanks.

Build the world:

make

When that completes, you have a working dalvikm on your desktop
machine:

% dalvikvm
E/dalvikvm(19521): ERROR: must specify non-'.' bootclasspath
W/dalvikvm(19521): JNI_CreateJavaVM failed
Dalvik VM init failed (check log file)

To actually do something, you need to specify the bootstrap class path
and give it a place to put DEX data that it uncompresses from jar
files. You can do that with a script like this:

----- snip & save -----
#!/bin/sh

# base directory, at top of source tree; replace with absolute path
base=`pwd`

# configure root dir of interesting stuff
root=$base/out/debug/host/linux-x86/product/sim/system
export ANDROID_ROOT=$root

# configure bootclasspath
bootpath=$root/framework
export BOOTCLASSPATH=$bootpath/core.jar:$bootpath/ext.jar:$bootpath/
framework.jar:$bootpath/android.policy.jar:$bootpath/services.jar

# this is where we create the dalvik-cache directory; make sure it
exists
export ANDROID_DATA=/tmp/dalvik_$USER
mkdir -p $ANDROID_DATA/dalvik_cache

exec dalvikvm $@
-----

Of course, you can't just run this against javac output, since it's
not a Java VM. You have to run your class files through "dx":

% cat > Foo.java
class Foo { public static void main(String[] args) {
System.out.println("Hello, world");
} }
(ctrl-D)
% javac Foo.java
% dx --dex --output=foo.jar Foo.class
% ./rund -cp foo.jar Foo
Hello, world
I/dalvikvm(19564): DestroyJavaVM shutting VM down

(I really ought to get rid of that DestroyJavaVM line -- it's supposed
to be in the log file, but on the desktop the "log file" is stderr.)

Get some info about valid arguments like this:

% ./rund -help

This also shows what options the VM was configured with. The "lunch
2" build has all sorts of additional assertions and checks enabled,
which slows the VM down, but since this is just for experiments it
doesn't matter.

All of the above applies to x86 Linux. Anything else will likely
require a porting effort.

Filipe Abrantes

unread,
Oct 29, 2008, 11:55:23 AM10/29/08
to android-porting
Sorry for the basic question, but what is the lunch command, I've
looked for it in the android tree and google it but was unable to find
any meaningful reference.

Thanks,
Filipe
> All of the above applies tox86Linux.  Anything else will likely
> require a porting effort.

Filipe Abrantes

unread,
Oct 29, 2008, 11:59:59 AM10/29/08
to android-porting
Sorry, I just realised "lunch 2" are the arguments of the envsetup
script :~, nice :P

Cheers,
Filipe


On Oct 23, 11:26 pm, fadden <thefad...@gmail.com> wrote:
> All of the above applies tox86Linux.  Anything else will likely
> require a porting effort.

Jim Ancona

unread,
Oct 29, 2008, 9:28:44 PM10/29/08
to android-porting


On Oct 23, 7:26 pm, fadden <thefad...@gmail.com> wrote:
> On Oct 23, 9:52 am, kapare <kevyn.alexandre.p...@gmail.com> wrote:
>
> > Can you give me clue or example of how to compile the dalvik for x86
> > or PPC.
>
> Start with:
>
>   .build/envsetup.sh
>   lunch 2
>
> This configures you tobuildfor the desktop, linking against glibc.
> This mode is NOT recommended for anything but experimental use.  It
> may go away.  Don't use it; forget you saw it.  Thanks.
>
> Buildthe world:
>
>   make

When I try this (on Ubuntu 8.04, 32 bit), I get a bunch of errors
similar to this:

out/debug/host/linux-x86/product/sim/obj/SHARED_LIBRARIES/
libmedia_intermediates/mediametadataretriever.o:/media/disk/jim/
projects/mydroid/external/skia/include/corecg/SkMath.h:180: more
undefined references to `Android_SkDebugf(char const*, int, char
const*, char const*, ...)' follow
collect2: ld returned 1 exit status
make: *** [out/debug/host/linux-x86/product/sim/obj/SHARED_LIBRARIES/
libmedia_intermediates/LINKED/libmedia.so] Error 1

I can fix them by adding

LOCAL_SHARED_LIBRARIES += libcorecg

to the relevant Android.mk files, but I'm curious if anyone else is
seeing this, or if this is a problem with my environment.

Thanks,

Jim

freedom

unread,
Oct 30, 2008, 2:54:53 AM10/30/08
to android-porting

I ran into similar problem, too. And yes, something similar to
LOCAL_SHARED_LIBRARIES += libcorecg
can solve it.

linp...@gmail.com

unread,
Oct 30, 2008, 5:24:20 AM10/30/08
to android-porting
I have complied the source code for x86 platform,and it seems that it
comlied successfully,but has problems in link libz.so.
the result shows as follow:
============================================
TARGET_PRODUCT=generic
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86
TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
========================================================================================
TARGET_PRODUCT=generic
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86
TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
============================================
target SharedLib: libz (out/host/linux-x86/product/generic/obj/
SHARED_LIBRARIES/libz_intermediates/LINKED/libz.so)
make: *** No rule to make target `build/core/prelink-linux-x86.map',
needed by `out/host/linux-x86/product/generic/symbols/system/lib/
libz.so'. Stop.target SharedLib: libz (out/host/linux-x86/product/
generic/obj/SHARED_LIBRARIES/libz_intermediates/LINKED/libz.so)
make: *** No rule to make target `build/core/prelink-linux-x86.map',
needed by `out/host/linux-x86/product/generic/symbols/system/lib/
libz.so'. Stop.




there is not "prelink-linux-x86.map" in "build/core/" actually but
just the "prelink-linux-x86.arm". Is the "prelink-linux-x86.map
"created automatically?
so any ideas?




Filipe Abrantes

unread,
Oct 30, 2008, 6:37:59 AM10/30/08
to android...@googlegroups.com
same here...

Cheers,
Filipe

dannie

unread,
Oct 30, 2008, 7:11:35 AM10/30/08
to android-porting
Got the same errors with LOCAL_SHARED_LIBRARIES,
fixed them and it seems all was compiled/linked successfully.

Ubuntu 8.04

============================================
TARGET_PRODUCT=sim
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=debug

dannie

unread,
Oct 30, 2008, 7:28:53 AM10/30/08
to android-porting
I'm getting the following error when trying to run dalvik:

~/temp/and$ ./rund -cp foo.jar Foo
E/dalvikvm( 313): Can't open dex cache '/tmp/dalvik_dannie/dalvik-
cache/home@dannie@temp@and@system@framework@core...@classes.dex': No
such file or directory
I/dalvikvm( 313): Unable to open or create cache for /home/dannie/
temp/and/system/framework/core.jar
W/dalvikvm( 313): JNI_CreateJavaVM failed
Dalvik VM init failed (check log file)

But... why? =)

Filipe Abrantes

unread,
Oct 30, 2008, 9:11:10 AM10/30/08
to android-porting
Hi, its a small typo on the rund script, just replace

mkdir -p $ANDROID_DATA/dalvik_cache

with

mkdir -p $ANDROID_DATA/dalvik-cache

and it will (hopefully :P) run

Cheers,
Filipe



On Oct 30, 11:28 am, dannie <dannie....@gmail.com> wrote:
> I'm getting the following error when trying to run dalvik:
>
> ~/temp/and$ ./rund -cp foo.jar Foo
> E/dalvikvm(  313): Can't open dex cache '/tmp/dalvik_dannie/dalvik-
> cache/home@dannie@temp@and@system@framew...@core.jar@classes.dex': No

dannie

unread,
Oct 30, 2008, 9:25:41 AM10/30/08
to android-porting
What's a weird mistake! =)

./rund -cp foo.jar Foo
Hello, world
I/dalvikvm(26218): DestroyJavaVM shutting VM down

So... It's working.

freedom

unread,
Oct 30, 2008, 9:53:15 AM10/30/08
to android-porting

a quick fix to the problem is "choosetype release" after
"lunch 2" because in release mode "SkDebugf()" is an
empty function instead of "Android_SkDebugf()"

On Oct 30, 9:28 am, Jim Ancona <j...@anconafamily.com> wrote:

Filipe Abrantes

unread,
Nov 5, 2008, 9:34:16 AM11/5/08
to android-porting
Hi all,

The target simulator compilation method for x86 works and we are able
to run dalvik. However I am trying to compile android with all its
components natively for x86. To do so I set up the repo thing as
usually and then run make (without any "lunch") as

make TARGET_ARCH=x86

it goes through quite a few modules but eventually it complains about
the lack of rule to make emulator. I dig through a few files in build/
(core and others) to try to understand how I could change this but I
was not successfull. The output error is:

Install: out/host/linux-x86/bin/dexlist
host Prebuilt: dexpreopt (out/host/linux-x86/obj/EXECUTABLES/
dexpreopt_intermediates/dexpreopt.py)
make: *** No rule to make target `out/host/linux-x86/bin/emulator',
needed by `out/host/linux-x86/bin/dexpreopt.py'. Stop.

Any help is much appreciated, Cheers,
Filipe

freedom

unread,
Nov 7, 2008, 4:22:41 AM11/7/08
to android-porting

Try
make TARGET_ARCH=x86 TARGET_BUILD_TYPE=release TARGET_PRODUCT=sim

Filipe Abrantes

unread,
Nov 7, 2008, 6:32:56 AM11/7/08
to android-porting
Ok, but that will compile for the target 'SIMULATOR' right? My idea
was compile everything for an x86 device. I don't fully understand the
differences between the simulator target and the other ones... for
instance I understand that on the simulator target dalvik is compiled
against the 'standard' glibc but what else is different?

Cheers,
Filipe

Brian Swetland

unread,
Nov 7, 2008, 6:36:40 AM11/7/08
to android...@googlegroups.com
[Filipe Abrantes <filipe....@gmail.com>]
>
> Ok, but that will compile for the target 'SIMULATOR' right? My idea
> was compile everything for an x86 device. I don't fully understand the
> differences between the simulator target and the other ones... for
> instance I understand that on the simulator target dalvik is compiled
> against the 'standard' glibc but what else is different?

The SIMULATOR target tries to build the entire system more like an
application. Things don't really run in multiple processes. A lot of
things don't work the way they would on a real devices. It still exists
as a debugging aid (you can run it all under valgrind which is kinda
handy at times) but it's deprecated and will be going away (as soon as
we get valgrind type functionality with the emulator or on-device). It
is the source of a lot of cruft in the build.

Filipe Abrantes

unread,
Nov 7, 2008, 6:53:18 AM11/7/08
to android...@googlegroups.com
Thanks for the clarification Brian. The big app you mention is the
'dalvikvm' binary? Could you point us how we could get, for instance,
the android home app running with this dalvikvm binary? Is it even
possible to do this... I mean we were able to run a simple hello world
java app, but I could not get any of the Android jars (e.g.
out/target/common/obj/APPS/Home_intermediaries/classes.jar) running.

Cheers,
Filipe


Could you help us understand what is required to get, for instance, the
home app running on

DYChen

unread,
Nov 7, 2008, 9:40:07 PM11/7/08
to android-porting
Brian,

You mentioned on Oct 21 that Google has done some native x86 port of
Android. Do you know when the code related to the native x86 port will
be released to the Android Open Source Project? We are interested in
getting Android to run on various x86-based devices and are willing to
contiribute toward the native x86 port effort. But it will be better
to base it on top of the native x86 port that Google has done.

Thanks,
Dong-Yuan

Brian Swetland

unread,
Nov 7, 2008, 9:42:32 PM11/7/08
to android...@googlegroups.com
[DYChen <dong-yu...@intel.com>]

The engineer responsible for this project has been out of the office for
a couple weeks and is travelling this week. He's working with our team
to get his patches into the open source tree, but I think we're still a
couple weeks away from completion there. We know people are excited
about building android for x86 targets and will try to get this code
cleaned up and submitted soon.

Brian

DYChen

unread,
Nov 9, 2008, 4:01:45 AM11/9/08
to android-porting


On Nov 7, 6:42 pm, Brian Swetland <swetl...@google.com> wrote:
>
> The engineer responsible for this project has been out of the office for
> a couple weeks and is travelling this week.  He's working with our team
> to get his patches into the open source tree, but I think we're still a
> couple weeks away from completion there.  We know people are excited
> about building android for x86 targets and will try to get this code
> cleaned up and submitted soon.

Brian,

Thanks for the update. I look forward to the release of x86 patches
that will enable us to run Android natively on x86 devices or PC.

Do you know how the project repositories will be structured to
accommodate the support of various x86 devices or targets? Are we
going to see different branches for x86 port? Are we expect to see
macros (such as #ifdef X86) guarding x86 related code in the source?
I'm looking for some guidelines on how x86 related code should be
integrated with the existing Android source. I haven't seen any
guideline regarding coding style or repository structures for hosting
device or architecture specific code yet. Maybe I haven't looked hard
enough. Any pointer is greatly appreciated.

Thanks,
Dong-Yuan

David Turner

unread,
Nov 11, 2008, 4:28:27 AM11/11/08
to android...@googlegroups.com
Just to make it clear, the x86 Android port, at that point, requires running an Android kernel on a x86 device with flash storage.
This is very different from running Dalvik under Windows or a pre-existing Linux installation (though with time these things
will be possible to)

Gergely Kis

unread,
Nov 13, 2008, 3:39:28 AM11/13/08
to android...@googlegroups.com
Hello,

Why is flash storage necessary? We were able to run Android over NFS,
and others have used ext2 or ext3. So there should be no direct
requirement for using a flash device specific filesystem like yaffs.
As far as I know the only specific requirement is that read-write mmap
has to be possible.

Are there other dependencies on flash storage?

Best Regards,
Gergely

On Tue, Nov 11, 2008 at 10:28 AM, David Turner <di...@android.com> wrote:
> Just to make it clear, the x86 Android port, at that point, requires running
> an Android kernel on a x86 device with flash storage.
> This is very different from running Dalvik under Windows or a pre-existing
> Linux installation (though with time these things
> will be possible to)
>
> On Sun, Nov 9, 2008 at 10:01 AM, DYChen <dong-yu...@intel.com> wrote:

[...]

David Turner

unread,
Nov 13, 2008, 2:28:38 PM11/13/08
to android...@googlegroups.com
I just mean that it's the only option that has really been tested in real life :-)

markgross

unread,
Nov 13, 2008, 8:04:36 PM11/13/08
to android-porting
We have been looking into this and we are in the process of internal
legal review and will be starting an AndroidOnIA project within the
context of the Android open source project soon.

We have a few interesting targets we are working on, but initially we
hope to get a KVM (or your VTx enabled VMM of choice) guest image
build working for people to play with,and then start pushing out
targets for real hardware.

--mgross

On Oct 21, 8:44 am, David Simmons <simm...@davidsimmons.com> wrote:
> Has anyone looked into what it would take to port Android to x86? I'm
> interested in taking a crack at porting Android to an x86-based
> embedded platform I work with. I'm going to download the source later
> today and have a look. My main concern is that Dalvik may be tied to
> special ARM optimizations...
>
> David

Gang lee

unread,
Nov 13, 2008, 8:52:01 PM11/13/08
to android-porting
Hi all:

Although I can compile with the command line:
make -j2 TARGET_ARCH=x86 TARGET_PRODUCT=generic
TARGET_SIMULATOR=true TARGET_BUILD_TYPE=release TARGET_OS=linux
LOCAL_PRELINK_MODULE=false

but I found lot of modules cannot be compiled with
"TARGET_SIMULATOR=true", if set false,the bionic(libc) met some files
(.h files) missing and compile failed.
Has anyone compiled the bionic successful?

Another question, Does any one knows more detail information about the
official x86 porting? for example:
Does the x86 porting support OpenGL?
Does the x86 porting still use openCore as the Media Framework? and
the openCore can be replaced by others(just like Hilex or GStreamer)?

David Turner

unread,
Nov 14, 2008, 6:24:08 AM11/14/08
to android...@googlegroups.com
Do not use TARGET_SIMULATOR=true, this flag should only be set when building the Android simulator,
which doesn't require all system libraries and runs the Android "system" into a single process on the host
machine.

that's why you have problems when building certain libraries (e.g. the simulator uses the host's C library, not Bionic)

the x86 port only uses Android's own software OpenGL renderer. There is no support for hardware-accelerated graphics
yet (and it's not like there is any kind of standard API for that on Linux). OpenCore is supposed to be portable, so I
assume it runs (but I may be mistaken)

you can't easily replace OpenCore with something else, unless you modify all the framework code that depends on it.
(this has never been tested internally)

Gang lee

unread,
Nov 16, 2008, 9:05:19 PM11/16/08
to android-porting
Hi David,

Think you for your answer.

I'm sorry for my copy&paste mistake.
I can compile with TARGET_SIMULATOR=true without any problem.
but when set "TARGET_SIMULATOR=false" in compile command, error below
happend
make: *** No rule to make target `out/host/linux-x86/bin/emulator',
needed by `out/host/linux-x86/bin/dexpreopt.py'. Stop.

Then I want to compile the bionic first.I did as follow.
1. Modify the Android.mk in mydroid/bionic to compile bionic in
simulator target
2. Compile all again with TARGET_SIMULATOR=true
the output as follow:
-------------------output------------------------
target thumb C: linker <= bionic/linker/linker.c
target thumb C: linker <= bionic/linker/dlfcn.c
bionic/linker/linker.c:15:25: error: sys/atomics.h: No such file or
directory
bionic/linker/linker.c:16:21: error: sys/tls.h: No such file or
directory
In file included from bionic/linker/dlfcn.c:18:
bionic/linker/linker.h:20: error: expected specifier-qualifier-list
before 'uintptr_t'
In file included from bionic/linker/linker.c:18:
bionic/linker/linker.h:20: error: expected specifier-qualifier-list
before 'uintptr_t'
bionic/linker/linker.h:50: error: expected specifier-qualifier-list
before 'uintptr_t'
bionic/linker/linker.h:50: error: expected specifier-qualifier-list
before 'uintptr_t'
---------------copy end(firest several lines)------------------

How can I compile bionic and other modules(init etc.)??

On 11月14日, 下午7时24分, "David Turner" <di...@android.com> wrote:
> Do not use TARGET_SIMULATOR=true, this flag should only be set when building
> the Android simulator,
> which doesn't require all system libraries and runs the Android "system"
> into a single process on the host
> machine.
>
> that's why you have problems when building certain libraries (e.g. the
> simulator uses the host's C library, not Bionic)
>
> the x86 port only uses Android's own software OpenGL renderer. There is no
> support for hardware-accelerated graphics
> yet (and it's not like there is any kind of standard API for that on Linux).
> OpenCore is supposed to be portable, so I
> assume it runs (but I may be mistaken)
>
> you can't easily replace OpenCore with something else, unless you modify all
> the framework code that depends on it.
> (this has never been tested internally)
>

Gang lee

unread,
Nov 16, 2008, 9:27:56 PM11/16/08
to android-porting
Hi David

A few additional information.

when I compiled whit TARGET_SIMULATOR=false, the output said "find:
prebuilt/android-x86: No such file or directory"
the make try to find prebuilt/android-x86 directory, and there is no
such directory,only have linux-x86 directory.
In the mydroid/build/core/envsetup.mk
--------------------------------
envsetup.mk-----------------------------
ifeq ($(TARGET_SIMULATOR),true)
TARGET_PREBUILT_TAG := $(TARGET_OS)-$(TARGET_ARCH)
else
TARGET_PREBUILT_TAG := android-$(TARGET_ARCH)
endif
--------------------------------copy end-----------------------------
Say in other words,If I set TARGET_SIMULATOR=false, I cannot use the
prebuild content??


On 11月14日, 下午7时24分, "David Turner" <di...@android.com> wrote:
> Do not use TARGET_SIMULATOR=true, this flag should only be set when building
> the Android simulator,
> which doesn't require all system libraries and runs the Android "system"
> into a single process on the host
> machine.
>
> that's why you have problems when building certain libraries (e.g. the
> simulator uses the host's C library, not Bionic)
>
> the x86 port only uses Android's own software OpenGL renderer. There is no
> support for hardware-accelerated graphics
> yet (and it's not like there is any kind of standard API for that on Linux).
> OpenCore is supposed to be portable, so I
> assume it runs (but I may be mistaken)
>
> you can't easily replace OpenCore with something else, unless you modify all
> the framework code that depends on it.
> (this has never been tested internally)
>

Filipe Abrantes

unread,
Nov 19, 2008, 7:28:34 PM11/19/08
to android...@googlegroups.com
This would be very interesting. Any word on timing?

Cheers,
Filipe

neo

unread,
Dec 1, 2008, 1:12:22 AM12/1/08
to android-porting
Good afternoon everyone,
there is a problem during my Android kernel compiling .
I followed the guideline which is
https://sites.google.com/a/android.com/opensource/download
and searched google for the answer, but still it cannot be solved.

===
Cannot locate File/ Basename.pm in @INC
( @INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/
share
/perl/5.8.8 /usr/lib/perl5 /usr/lib/perl/5.8 /usr/share/perl/
5.8 /usr/local
/lib/site_perl. )
at external/webkit/JavaScriptCore/pcre/dftables line 47

BEGIN failed--compilation aborted at external/webkit/JavaScriptCore/
pcre/dftables line 47

make" ***[out/target/product/generic/obj/STATIC_LIBRARIES/
libkjs_intermediates/chartables.c]Error2
===
Can anyone give me some advice? I'll appreciate u very much.

thanks for reading

Lucky-dog

unread,
Dec 1, 2008, 8:30:56 AM12/1/08
to android-porting
My ubuntu is 8.10. I try the tips to compile android for x86. But it
seem envsetup.sh does not work. Would you like to help me? Thank you
very much. The log is as below.
thomast@ubuntu:~/mydroid/build$ echo $SHELL
/bin/bash
thomast@ubuntu:~/mydroid/build$ bash --version
GNU bash, version 3.2.39(1)-release (i486-pc-linux-gnu)
Copyright (C) 2007 Free Software Foundation, Inc.
thomast@ubuntu:~/mydroid/build$ ./envsetup.sh lunch 2
thomast@ubuntu:~/mydroid/build$ ./envsetup.sh help
thomast@ubuntu:~/mydroid/build$



On Oct 24, 7:26 am, fadden <thefad...@gmail.com> wrote:
> On Oct 23, 9:52 am, kapare <kevyn.alexandre.p...@gmail.com> wrote:
>
> > Can you give me clue or example of how to compile the dalvik for x86
> > or PPC.
>
> Start with:
>
>   . build/envsetup.sh
>   lunch 2
>
> This configures you to build for the desktop, linking against glibc.
> This mode is NOT recommended for anything but experimental use.  It
> may go away.  Don't use it; forget you saw it.  Thanks.
>
> Build the world:
>
>   make
>
> When that completes, you have a working dalvikm on your desktop
> machine:
>
> % dalvikvm
> E/dalvikvm(19521): ERROR: must specify non-'.' bootclasspath
> W/dalvikvm(19521): JNI_CreateJavaVM failed
> Dalvik VM init failed (check log file)
>
>   % ./rund -cp foo.jar Foo
>   Hello, world

Urs Grob

unread,
Dec 1, 2008, 8:38:07 AM12/1/08
to android...@googlegroups.com
$ . build/envsetup.sh
$ lunch 2

are two separate commands. The first one sets up the environment and
the second one sets which configuration you want to build.

Lucky-dog

unread,
Dec 3, 2008, 9:12:57 AM12/3/08
to android-porting
hi all
when i try to compile the source on DEBUG x86. A error is reported
out as below. Would you like to let me know how to fix it? Thank you
very much.
thomast@ubuntu:~/mydroid$ make
build/core/product_config.mk:229: WARNING: adding test OTA key
build/core/main.mk:177: implicitly installing apns-conf_sdk.xml
============================================
TARGET_PRODUCT=sim
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=debug
TARGET_ARCH=x86
TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
============================================
target thumb C++: libkjs <= external/webkit/JavaScriptCore/bindings/
NP_jsobject.cpp
In file included from /usr/include/c++/4.3/bits/stl_pair.h:65,
from /usr/include/c++/4.3/utility:68,
from external/webkit/JavaScriptCore/wtf/
VectorTraits.h:27,
from external/webkit/JavaScriptCore/kjs/
LocalStorage.h:29,
from external/webkit/JavaScriptCore/kjs/
JSVariableObject.h:32,
from external/webkit/JavaScriptCore/kjs/
JSGlobalObject.h:26,
from external/webkit/JavaScriptCore/bindings/
NP_jsobject.cpp:32:
/usr/include/c++/4.3/bits/stl_move.h:80: error: redefinition of
‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
external/webkit/JavaScriptCore/../WebCore/platform/android/stl/
algorithm:65: error: ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
previously declared here
make: *** [out/debug/host/linux-x86/product/sim/obj/STATIC_LIBRARIES/
libkjs_intermediates/bindings/NP_jsobject.o] Error 1
thomast@ubuntu:~/mydroid$

thomast@ubuntu:~/mydroid$ make
build/core/product_config.mk:229: WARNING: adding test OTA key
build/core/main.mk:177: implicitly installing apns-conf_sdk.xml
============================================
TARGET_PRODUCT=sim
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=debug
TARGET_ARCH=x86
TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
============================================
target thumb C++: libkjs <= external/webkit/JavaScriptCore/bindings/
NP_jsobject.cpp
In file included from /usr/include/c++/4.3/bits/stl_pair.h:65,
from /usr/include/c++/4.3/utility:68,
from external/webkit/JavaScriptCore/wtf/
VectorTraits.h:27,
from external/webkit/JavaScriptCore/kjs/
LocalStorage.h:29,
from external/webkit/JavaScriptCore/kjs/
JSVariableObject.h:32,
from external/webkit/JavaScriptCore/kjs/
JSGlobalObject.h:26,
from external/webkit/JavaScriptCore/bindings/
NP_jsobject.cpp:32:
/usr/include/c++/4.3/bits/stl_move.h:80: error: redefinition of
‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
external/webkit/JavaScriptCore/../WebCore/platform/android/stl/
algorithm:65: error: ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
previously declared here
make: *** [out/debug/host/linux-x86/product/sim/obj/STATIC_LIBRARIES/
libkjs_intermediates/bindings/NP_jsobject.o] Error 1
thomast@ubuntu:~/mydroid$

thomast@ubuntu:~/mydroid$ make
build/core/product_config.mk:229: WARNING: adding test OTA key
build/core/main.mk:177: implicitly installing apns-conf_sdk.xml
============================================
TARGET_PRODUCT=sim
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=debug
TARGET_ARCH=x86
TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
============================================
target thumb C++: libkjs <= external/webkit/JavaScriptCore/bindings/
NP_jsobject.cpp
In file included from /usr/include/c++/4.3/bits/stl_pair.h:65,
from /usr/include/c++/4.3/utility:68,
from external/webkit/JavaScriptCore/wtf/
VectorTraits.h:27,
from external/webkit/JavaScriptCore/kjs/
LocalStorage.h:29,
from external/webkit/JavaScriptCore/kjs/
JSVariableObject.h:32,
from external/webkit/JavaScriptCore/kjs/
JSGlobalObject.h:26,
from external/webkit/JavaScriptCore/bindings/
NP_jsobject.cpp:32:
/usr/include/c++/4.3/bits/stl_move.h:80: error: redefinition of
‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
external/webkit/JavaScriptCore/../WebCore/platform/android/stl/
algorithm:65: error: ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
previously declared here
make: *** [out/debug/host/linux-x86/product/sim/obj/STATIC_LIBRARIES/
libkjs_intermediates/bindings/NP_jsobject.o] Error 1
thomast@ubuntu:~/mydroid$

thomast@ubuntu:~/mydroid$ make
build/core/product_config.mk:229: WARNING: adding test OTA key
build/core/main.mk:177: implicitly installing apns-conf_sdk.xml
============================================
TARGET_PRODUCT=sim
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=debug
TARGET_ARCH=x86
TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
============================================
target thumb C++: libkjs <= external/webkit/JavaScriptCore/bindings/
NP_jsobject.cpp
In file included from /usr/include/c++/4.3/bits/stl_pair.h:65,
from /usr/include/c++/4.3/utility:68,
from external/webkit/JavaScriptCore/wtf/
VectorTraits.h:27,
from external/webkit/JavaScriptCore/kjs/
LocalStorage.h:29,
from external/webkit/JavaScriptCore/kjs/
JSVariableObject.h:32,
from external/webkit/JavaScriptCore/kjs/
JSGlobalObject.h:26,
from external/webkit/JavaScriptCore/bindings/
NP_jsobject.cpp:32:
/usr/include/c++/4.3/bits/stl_move.h:80: error: redefinition of
‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
external/webkit/JavaScriptCore/../WebCore/platform/android/stl/
algorithm:65: error: ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
previously declared here
make: *** [out/debug/host/linux-x86/product/sim/obj/STATIC_LIBRARIES/
libkjs_intermediates/bindings/NP_jsobject.o] Error 1
thomast@ubuntu:~/mydroid$

Lucky-dog

unread,
Dec 4, 2008, 10:28:11 AM12/4/08
to android-porting
hi all
I fixed it with renaming swap to swapab. But now I have another
question needed your help. I can't let the following command get to be
run.
dx --dex --output=foo.jar Foo.class
What is the dx command and where is it? Would you like to help me
out? Thank you very much.

Lucky-dog

unread,
Dec 5, 2008, 6:49:41 PM12/5/08
to android-porting
I got it. it located in out/host/linux-x86/bin. Thanks.

squix

unread,
Dec 11, 2008, 11:53:19 AM12/11/08
to android-porting
Hi group

Does anyone have an idea why I get this error?
============================================
TARGET_PRODUCT=generic
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86
TARGET_OS=linux
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=TC3
============================================
host C++: simulator <= development/simulator/app/DeviceManager.cpp
In file included from /usr/include/wx-2.6/wx/memory.h:20,
from /usr/include/wx-2.6/wx/object.h:25,
from /usr/include/wx-2.6/wx/wx.h:16,
from development/simulator/app/DeviceManager.cpp:12:
/usr/include/wx-2.6/wx/string.h:771: error: âwxChar& wxString::operator
[](unsigned int)â cannot be overloaded
/usr/include/wx-2.6/wx/string.h:768: error: with âwxChar&
wxString::operator[](size_t)â
In file included from /usr/include/wx-2.6/wx/stream.h:26,
from /usr/include/wx-2.6/wx/image.h:24,
from /usr/include/wx-2.6/wx/gtk/cursor.h:23,
from /usr/include/wx-2.6/wx/cursor.h:24,
from /usr/include/wx-2.6/wx/event.h:32,
from /usr/include/wx-2.6/wx/wx.h:23,
from development/simulator/app/DeviceManager.cpp:12:
/usr/include/wx-2.6/wx/filefn.h:322: error: zero width for bit-field
âwxAssert_323::BadFileSizeTypeâ
In file included from /usr/include/wx-2.6/wx/utils.h:38,
from /usr/include/wx-2.6/wx/cursor.h:37,
from /usr/include/wx-2.6/wx/event.h:32,
from /usr/include/wx-2.6/wx/wx.h:23,
from development/simulator/app/DeviceManager.cpp:12:
/usr/include/wx-2.6/wx/longlong.h: In constructor
âwxLongLongNative::wxLongLongNative(long int, long unsigned int)â:
/usr/include/wx-2.6/wx/longlong.h:115: warning: left shift count >=
width of type
/usr/include/wx-2.6/wx/longlong.h: In member function âlong int
wxLongLongNative::GetHi() constâ:
pe
/usr/include/wx-2.6/wx/longlong.h: In constructor
âwxULongLongNative::wxULongLongNative(long unsigned int, long unsigned
int)â:
/usr/include/wx-2.6/wx/longlong.h:333: warning: left shift count >=
width of type
/usr/include/wx-2.6/wx/longlong.h: In member function âlong unsigned
int wxULongLongNative::GetHi() constâ:
/usr/include/wx-2.6/wx/longlong.h:351: warning: right shift count >=
width of type
In file included from development/simulator/app/LogWindow.h:13,
from development/simulator/app/MainFrame.h:11,
from development/simulator/app/MyApp.h:12,
from development/simulator/app/DeviceManager.cpp:17:
development/simulator/app/LogPrefsDialog.h: At global scope:
development/simulator/app/LogPrefsDialog.h:28: warning: âtypedefâ was
ignored in this declaration
make: *** [out/host/linux-x86/obj/EXECUTABLES/simulator_intermediates/
DeviceManager.o] Error 1


Is this maybe a x86_64 specific problem? I followed the description
for x86_64 and could do the "normal" build. But if I try to do the x86
"application-like" build I get that error... I'm trying this on a
Ubuntu 8.10 system...

Thanks, for any help

On Dec 6, 12:49 am, Lucky-dog <Honglian...@gmail.com> wrote:
> I got it. it located in out/host/linux-x86/bin. Thanks.
>
> On Dec 4, 10:28 am, Lucky-dog <Honglian...@gmail.com> wrote:
>
> > hi all
> >    I fixed it with renaming swap to swapab. But now I have another
> > question needed your help. I can't let the following command get to be
> > run.
> >    dx --dex --output=foo.jar Foo.class
> >    What is the dx command and where is it?  Would you like to help me
> > out? Thank you very much.
>
> > On Dec 3, 10:12 pm, Lucky-dog <Honglian...@gmail.com> wrote:
>
> > > hi all
> > >    when i try to compile the source on DEBUGx86. A error is reported

Piethein Strengholt

unread,
Dec 18, 2008, 3:10:03 PM12/18/08
to android-porting

Dima Zavin

unread,
Dec 18, 2008, 3:23:17 PM12/18/08
to android...@googlegroups.com
Try this (only tested on EeePC 701):

repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
repo sync
TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=true make -j8 installer_img
dd if=out/target/product/eee_701/installer.img of=/dev/<usbstick of your choice> ; sync

Boot from the usb stick. The installer is a bit crude, and needs polishing and generalizing but it works. Note: It WILL WIPE your EeePC drive. :)

--Dima


On Thu, Dec 18, 2008 at 12:10 PM, Piethein Strengholt <pietheins...@gmail.com> wrote:

Dima Zavin

unread,
Dec 18, 2008, 3:25:32 PM12/18/08
to android...@googlegroups.com
Argh, forgot to mention that you'll need a local_manifest.xml that looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="platform/vendor/asus/eee_701" path="vendor/asus/eee_701"/>
</manifest>

Chris

unread,
Dec 18, 2008, 3:39:29 PM12/18/08
to android-porting
Thanks Dima!

The most exciting update yet comes the day before I leave for a two
week vacation. Hopefully I will be able to try it before I leave. I
have been trying to repo init and repo sync to this since yesterday
but am getting a ton of socket errors. It could be an issue with our
SOCKs proxies but I have tried a number of different proxy servers in
our company (they do not usually all go down at the same time). I am
not sure how many others are having similar problems.

Thanks for the details,
Chris Elford
Intel Software Services Group

Filipe Abrantes

unread,
Dec 18, 2008, 4:47:26 PM12/18/08
to android...@googlegroups.com
Very cool, thanks for the effort! Can't wait to try it...

Cheers
Filipe

freedom

unread,
Dec 19, 2008, 2:04:48 AM12/19/08
to android-porting
after boot from my USB stick, I saw
init: Unable to open persisent property directory /data/property
errno: 2
and
I/installer( 1865): Waiting for device: /dev/block/sdb2
than some USB information, and shell prompt

my internal SSD was not touched at all, that is, it didn't start to
install

On Dec 19, 4:23 am, "Dima Zavin" <d...@android.com> wrote:
> Try this (only tested on EeePC 701):
>
> repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
> repo sync
> TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=true make -j8
> installer_img
> dd if=out/target/product/eee_701/installer.img of=/dev/<usbstick of your
> choice> ; sync
>
> Boot from the usb stick. The installer is a bit crude, and needs polishing
> and generalizing but it works. Note: It WILL WIPE your EeePC drive. :)
>
> --Dima
>
> On Thu, Dec 18, 2008 at 12:10 PM, Piethein Strengholt <
>

Huan Truong

unread,
Dec 19, 2008, 2:26:24 PM12/19/08
to android-porting
I could not compile the cupcake branch as of 1:20PM CST. There seems
to be some error while compiling fst.o

external/srec/tools/thirdparty/OpenFst/fst/lib/../../fst/lib/vector-
fst.h:404: error: ‘memcpy’ was not declared in this scope
external/srec/tools/thirdparty/OpenFst/fst/lib/../../fst/lib/vector-
fst.h: In member function ‘W fst::WeightFromString<W>::operator()
(const std::string&) [with W = fst::LogWeight]’:
external/srec/tools/thirdparty/OpenFst/fst/lib/../../fst/lib/vector-
fst.h:412: error: ‘memcpy’ was not declared in this scope
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/
libfst_intermediates/symbol-table.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/
libfst_intermediates/fst.o] Error 1


Any suggestions?

On Dec 18, 2:23 pm, "Dima Zavin" <d...@android.com> wrote:
> Try this (only tested on EeePC 701):
>
> repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake
> repo sync
> TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=true make -j8
> installer_img
> dd if=out/target/product/eee_701/installer.img of=/dev/<usbstick of your
> choice> ; sync
>
> Boot from the usb stick. The installer is a bit crude, and needs polishing
> and generalizing but it works. Note: It WILL WIPE your EeePC drive. :)
>
> --Dima
>
> On Thu, Dec 18, 2008 at 12:10 PM, Piethein Strengholt <
>

Dima Zavin

unread,
Dec 19, 2008, 3:05:41 PM12/19/08
to android...@googlegroups.com

after boot from my USB stick, I saw
 init: Unable to open persisent property directory /data/property
errno: 2
and

This is harmless in this case.
 
 I/installer( 1865): Waiting for device: /dev/block/sdb2
than some USB information, and shell prompt
 
my internal SSD was not touched at all, that is, it didn't start to
install

As I mentioned, the installer is definitely not robust. It assumes that sda will be the internal SSD, and sdb will be the usbstick (iirc). You might need to hack in the bios to make sure that the devices are assigned properly (in the order that we want them).

The real solution is to pull in volume-id stuff from udev (drop it somewhere into external/, and add it to the build), have init call out to it when a new block device shows up, and have it drop the right device node into /dev/block-by-volid/...

Then the installer can refer to the right volume by volumeid, and can avoid this device name hardcoding mess. When we build the images, we include the appropriate volume id already, I just didn't get a chance to get the init side of things done. Patches are welcome.

Thanks.

--Dima

squix

unread,
Dec 19, 2008, 3:57:24 PM12/19/08
to android-porting
I had the same problem. It has to to with the gcc version your using
and the header refactoring that they did for that version. You can fix
errors like that by simply adding the right includes in the file
complaining.
In 90% I had to add one of these
#include <cstdlib>
#include <cstring>
but there were other cases as well.

After fixing many of these issues I finally could build the installer
image. But when I run it on my very old machine (Geode GX1) only GRUB
is printed and a blinking cursor. What might be here the problem? I
thought besides less important things the eee 701 is just a standard
x86 system, or am I wrong. Is there another product I should build it
for?

Chris

unread,
Dec 19, 2008, 4:44:33 PM12/19/08
to android-porting
I have been able to successfully run the eee701 cupcake build on an
MSI Wind. I have a _VERY_ preliminary script that takes the
installer.img and a USB stick and creates a "live" USB stick that can
be booted. Running off of USB will make some apps timeout a bit more
because its not as fast as internal storage but it makes it easy to
try it out.

If anyone is interested in the liveUSB conversion script, I can submit
a changeset (probably to put in vendor/asus/eee_701 for now). Bear in
mind this version of the script is very preliminary and I plan to
update it some after my vacation.

Thx,

Chris Elford
Intel Software Services Group

Huan Truong

unread,
Dec 19, 2008, 5:05:06 PM12/19/08
to android-porting
Chris et al,

Can you tell me the version of gcc you're using to compile. Seems like
gcc-4.3 has many problems with cupcake.

Chris

unread,
Dec 19, 2008, 5:14:07 PM12/19/08
to android-porting
/usr/lib/gcc/i486-linux-gnu/4.2.3/cc1plus

It seems to be using the gcc that I happen to have installed on my
Ubuntu 8.04 system...

celford@celford-ubuntu:~/cupcake$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c+
+,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-
system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-
threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2
--program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --
enable-objc-gc --enable-mpfr --enable-targets=all --enable-
checking=release --build=i486-linux-gnu --host=i486-linux-gnu --
target=i486-linux-gnu
Thread model: posix
gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

Part of the build may also be using the bits at cupcake/prebuilt/linux-
x86/toolchain/i686-unknown-linux-gnu-4.2.1...

Thx,
Chris

Chris

unread,
Dec 19, 2008, 11:00:22 PM12/19/08
to android-porting
Note that cupcake seems to have been integrated into master now.
(See this thread http://groups.google.com/group/repo-discuss/browse_thread/thread/7951d0391b87aad5?pli=1).
Note that it looks like a lot more stuff now builds with the gcc in
prebuilds /home/celford/mydroid/prebuilt/linux-x86/toolchain/i686-
unknown-linux-gnu-4.2.1/bin/ than before when more stuff seemed to be
using the gcc on my system. This could just be the phase of the build
that I checked it at though.

I have been trying to repo upload the script to take the installer.img
file and make a live-usb key as a changeset to vendor/asus/eee_701 but
am still running into some issues that look like kernel.org
configuration errors. I'll check back during my vacation for a
response to that thread and if it is resolved so I can repo upload.
In the meantime, folks have asked for the script now so, I've created
a bugtracker and put the early script there at
http://code.google.com/p/android/issues/detail?id=1598.

basic usage details are documented in the script for now.

Thx,
Chris Elford
Intel Software Services Group

Huan Truong

unread,
Dec 20, 2008, 1:38:54 AM12/20/08
to android-porting
Thanks Chris!

Looks like specifying CC to gcc-4.2 resolves most of the errors while
compiling with gcc-4.3. So just to take a note for those who received
same errors I had.

- Huan T.

Brock

unread,
Dec 20, 2008, 8:45:32 AM12/20/08
to android-porting
Where should the local_manifest.xml file be placed?

On Dec 18, 2:25 pm, "Dima Zavin" <d...@android.com> wrote:
> Argh, forgot to mention that you'll need a local_manifest.xml that looks
> something like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <manifest>
>   <project name="platform/vendor/asus/eee_701" path="vendor/asus/eee_701"/>
> </manifest>
>

Brock

unread,
Dec 20, 2008, 9:17:28 AM12/20/08
to android-porting
Nevermind, I figured it out. In case anyone is looking for this
information in the future, it appears it needs to go in .repo,
followed by a repo sync.

Huan Truong

unread,
Dec 21, 2008, 12:43:06 AM12/21/08
to android-porting
WARNING: As Chris said, the installer will wipe your hard drive, and
no, it won't ask you a single thing. Remember, take your hard drive
OUT physically, not just in the BIOS. Even if you disabled the hard
drive in BIOS setup, the installer will still erase your hard drive. I
learned it the hard way, with my eee 900HA.

Huan Truong

unread,
Dec 21, 2008, 3:00:22 AM12/21/08
to android-porting
I tried to install from the install USB disk to my other USB disk on
my eeePC 900HA (with my hard drive taken out), and I am currently
stuck shortly after the screen changed to 1024x600 fb:
http://i43.tinypic.com/25p4cqc.jpg

Looks like we need to wait a little bit more before we try to mount
the USB drive because the USB drive is detected at 7sec, while the
read process was started at 3sec. If I am right, how can I do that?

mizmit1222

unread,
Dec 21, 2008, 4:14:29 AM12/21/08
to android-porting
Hi,

Can you add rootdelay option to kernel cmdline? like, rootdelay=8?

Dima Zavin

unread,
Dec 21, 2008, 4:44:37 AM12/21/08
to android...@googlegroups.com
Can you add rootdelay option to kernel cmdline? like, rootdelay=8?

That will probably help. I'd still really like to see us creating the volume_id named block device nodes somewhere in /dev/block-volid/. Perhaps I'll see if I can find some time over the holidays to mess around with it.

--Dima

freedom

unread,
Dec 21, 2008, 8:15:11 PM12/21/08
to android-porting

Thanks, the problem I ran into was that /dev/block/sdb was
the card reader and the USB stick was sdc. After changing
the argument for installer to /dev/block/sdc2, I got it
installed.

Huan Truong

unread,
Dec 21, 2008, 9:09:29 PM12/21/08
to android-porting
Mizmit and Dima,

Thanks for your suggestions, I tried adding rootdelay to the system
volume, but seems like it didn't help. Looks like appending it to the
cmdline didn't make any differences at all. I appended the option at
the end of the cmdline file in my usb stick. Did I do something wrong?

- Huan T.

Huan Truong

unread,
Dec 22, 2008, 12:38:28 AM12/22/08
to android-porting
FYI: This is the dmesg log:

http://pastebin.com/m73537fac

I don't know if it was wrong at any point. Any help is appreciated.

Dima Zavin

unread,
Dec 22, 2008, 12:34:24 PM12/22/08
to android...@googlegroups.com
what does logcat say?

--Dima

Filipe Abrantes

unread,
Dec 22, 2008, 4:11:15 PM12/22/08
to android...@googlegroups.com, filipe....@gmail.com
Hi all,

First of all let me thank Dima, Chris (and everyone else involved) for
their x86 porting work. This is a much anticipated step, one which will
help make Android very useful outside the mobile phone world.

So... I have tried the installer on a small desktop PC - a Asus Nova Lite:

http://www.asus.com/news_show.aspx?id=11565

and the installer seems as it has run its course well (although it took
a lot of time - namely resizing the 250 GB partition), and the nova lite
pc now boots from the hard drive.

However, Android is not able to boot completely. After a few seconds,
the screen goes completely black and never proceeds. By pressing alt+f1
I am able to access the system console (however the system keeps trying
to initialize the graphic interface, and I have to press alt+f1 every
few seconds to access the console).

I apologize for not presenting the dmesg and logcat complete output but
I could not figure a quick way to get it out of the box (no network
interfaces are recognized and I was unable to mount the usbstick on the
console). The errors shown are:

dmesg:

the surfaceflinger activity has exited due to a segfault - and I can see
from the log that it keeps retrying forever.

Logcat :

/dev/pmem could not be found, as well as lighgl.so.
validate_display_surface has failed with error 300 (BAD_DISPLAY_SURFACE)
call to OpenGL API has been done with no current context.

Do you have any clue of what might be causing the surfaceflinger to fail
(is it the lack of drivers?)? Also what do you recommend to troubleshoot
these situations (how to get the complete logs out of the test box, and
what other troubleshooting tools are available in the android console).

Cheers,
Filipe

Dima Zavin

unread,
Dec 22, 2008, 5:46:29 PM12/22/08
to android...@googlegroups.com, filipe....@gmail.com
So... I have tried the installer on a small desktop PC - a Asus Nova Lite:

http://www.asus.com/news_show.aspx?id=11565

Heh, cute. I should mention that we really should not be reusing the same installer images as a "general purpose" installer for anything x86. It really is meant to be configured individually for every target device for reproducible builds/installs, per-device tweaks, etc.

and the installer seems as it has run its course well (although it took
a lot of time - namely resizing the 250 GB partition), and the nova lite
pc now boots from the hard drive.

resize2fs is really really slow. I didn't get a chance to dig into it to figure out why. It could probably be improved significantly with a little TLC.


However, Android is not able to boot completely. After a few seconds,
the screen goes completely black and never proceeds. By pressing alt+f1
I am able to access the system console (however the system keeps trying
to initialize the graphic interface, and I have to press alt+f1 every
few seconds to access the console).

Are the framebuffer drives loading correctly? The prebuilt drivers were only verified to work on the i945g chipset that's in the eeepc 701 (though it "probably" works on many other i915 derivatives?). As mentioned I have only verified this on my eeepc, so ymmv.

It's a bit of a pain right now since the drm/i915 modules need to be built outside the kernel tree, and I really didn't want to mirror the f.o drm trees since its under development, and I dont have the time to keep up with it at the moment. I just threw together the precompiled bins for convenience. The f.o guys are doing great work, and once their stuff is pushed into mainline (.29ish timeframe i think?), the fb drivers will be part of the kernel build and there will be much rejoicing. It will be great.

dmesg:

the surfaceflinger activity has exited due to a segfault - and I can see
from the log that it keeps retrying forever.

Logcat :

/dev/pmem could not be found, as well as lighgl.so.
validate_display_surface has failed with error 300 (BAD_DISPLAY_SURFACE)
call to OpenGL API has been done with no current context.

The pmem and hgl messages are non fatal in this case. Surfaceflinger should fall-back onto ashmem heaps (iirc) and sw gl. It probably goes haywire since your fb driver is not operational?
 

Do you have any clue of what might be causing the surfaceflinger to fail
(is it the lack of drivers?)? Also what do you recommend to troubleshoot
these situations (how to get the complete logs out of the test box, and
what other troubleshooting tools are available in the android console).

If this is not one of those silly umpc/netbook thingies and it has a normal serial port, i would recommend hooking up to it. It will give you a working shell, and let you debug a lot easier than on a flickering console :)

You should also build your own kernel and make sure you have the right ethernet drivers to get access to it from the network. You can then run adb over the network and essentially get a remote console.

Hope this helps.

--Dima
 

Cheers,
Filipe








Filipe Abrantes

unread,
Dec 22, 2008, 7:44:34 PM12/22/08
to android...@googlegroups.com
Hi,
Although the nova lite has a i945 intel board chipset, it uses an 620gle
ati graphics card... that's probably a, or the, problem. Does the kernel
of the installer include any ati drivers?

> dmesg:
>
> the surfaceflinger activity has exited due to a segfault - and I
> can see
> from the log that it keeps retrying forever.
>
> Logcat :
>
> /dev/pmem could not be found, as well as lighgl.so.
> validate_display_surface has failed with error 300
> (BAD_DISPLAY_SURFACE)
> call to OpenGL API has been done with no current context.
>
>
> The pmem and hgl messages are non fatal in this case. Surfaceflinger
> should fall-back onto ashmem heaps (iirc) and sw gl. It probably goes
> haywire since your fb driver is not operational?
>
>
>
> Do you have any clue of what might be causing the surfaceflinger
> to fail
> (is it the lack of drivers?)? Also what do you recommend to
> troubleshoot
> these situations (how to get the complete logs out of the test
> box, and
> what other troubleshooting tools are available in the android
> console).
>
>
> If this is not one of those silly umpc/netbook thingies and it has a
> normal serial port, i would recommend hooking up to it. It will give
> you a working shell, and let you debug a lot easier than on a
> flickering console :)

:-)

>
> You should also build your own kernel and make sure you have the right
> ethernet drivers to get access to it from the network. You can then
> run adb over the network and essentially get a remote console.
>
> Hope this helps.

It does! Thanks! I tried this since I don't have a eee/netbook PC and
was too anxious to see Android splashing on the big screen :-)... sorry
for the trouble...

Cheers,
Filipe

>
> --Dima
>
>
>
> Cheers,
> Filipe
>
>
>
>
>
>
> >
>

Dima Zavin

unread,
Dec 22, 2008, 8:43:10 PM12/22/08
to android...@googlegroups.com

Although the nova lite has a i945 intel board chipset, it uses an 620gle
ati graphics card... that's probably a, or the, problem.

That would do it :)
 
Does the kernel
of the installer include any ati drivers?

Kernel of the installer? The kernel provided is configured with EeePC in mind. You are welcome to build your own kernel that has any drivers you like :)

--Dima

squix

unread,
Dec 23, 2008, 6:35:57 AM12/23/08
to android-porting
Sorry for such a stupid question, but is the kernel provided in anyway
patched for the use with android or is it basically a standard x86
kernel? What do I have to do to build a kernel for an older target
like a Geode GX1?

Dani

Dima Zavin

unread,
Dec 23, 2008, 2:26:35 PM12/23/08
to android...@googlegroups.com
Sorry for such a stupid question, but is the kernel provided in anyway
patched for the use with android or is it basically a standard x86
kernel? What do I have to do to build a kernel for an older target
 
The kernel is built from the android tree. All you have to do is check out the kernel/common.git repository and just select the android drivers (ashmem, logger, power, binder, etc.). You choose whatever architecture you actually want to build for. The eeepc repo has a kernel config you can start with and go from there if you like.

--Dima

DHar...@googlemail.com

unread,
Dec 23, 2008, 4:01:46 PM12/23/08
to android-porting
> The kernel is built from the android tree. All you have to do is check out
> the kernel/common.git repository and just select the android drivers
> (ashmem, logger, power, binder, etc.). You choose whatever architecture you
> actually want to build for. The eeepc repo has a kernel config you can start
> with and go from there if you like.

Ok, I've got Android running on the Asus EEEPC 1000H. But as I want to
be able to
use audio and networking I have the following problems:

The music player seems to play music and dmesg indicates that the
INTEL HDA Audio
chip is correctly loaded. Could it be that everything is fine and just
the volume is turned off?
If this is the case how can I turn it on? :)

Another problem ist the RT2860 driver which I've successfully build
against the 2.6.25 kernel tree
but no device is available... - any hints?

Thanks,

Daniel

Sunset

unread,
Dec 24, 2008, 10:12:31 AM12/24/08
to android-porting
The ramdisk may void the rootwait option, thus it won't solve the
issue.

Several approaches can be used to solve the issue.
1. extract the ramdisk on your usb disk to a separate empty parition
and specify the root in the cmdline, be sure to add the rootwait (or
rootdelay) option.
2. I remembered that that some one has posted the usleep support in
init program on the code review site, but i don't know where it is now
and it seems the code is in current updated source yet. Here is one
similar patch, and with that, you can add one line in your init.rc:

on early-init
sleep 7

diff -uNr init.orig/builtins.c init/builtins.c
--- init.orig/builtins.c 2008-12-20 01:16:51.000000000 +0800
+++ init/builtins.c 2008-12-24 23:07:10.000000000 +0800
@@ -496,3 +496,12 @@
decode_uid(args[4]), prefix);
return 0;
}
+
+int do_sleep(int nargs, char **args)
+{
+ if(nargs == 2) {
+ sleep(atoi(args[1]));
+ return 0;
+ } else
+ return -1;
+}

diff -uNr init.orig/keywords.h init/keywords.h
--- init.orig/keywords.h 2008-12-20 01:16:51.000000000 +0800
+++ init/keywords.h 2008-12-24 23:07:10.000000000 +0800
@@ -24,6 +24,7 @@
int do_chown(int nargs, char **args);
int do_chmod(int nargs, char **args);
int do_loglevel(int nargs, char **args);
+int do_sleep(int nargs, char **args);
int do_device(int nargs, char **args);
#define __MAKE_KEYWORD_ENUM__
#define KEYWORD(symbol, flags, nargs, func) K_##symbol,
@@ -56,6 +57,7 @@
KEYWORD(setkey, COMMAND, 0, do_setkey)
KEYWORD(setprop, COMMAND, 2, do_setprop)
KEYWORD(setrlimit, COMMAND, 3, do_setrlimit)
+ KEYWORD(sleep, COMMAND, 1, do_sleep)
KEYWORD(socket, OPTION, 0, 0)
KEYWORD(start, COMMAND, 1, do_start)
KEYWORD(stop, COMMAND, 1, do_stop)
diff -uNr init.orig/parser.c init/parser.c
--- init.orig/parser.c 2008-12-20 01:16:51.000000000 +0800
+++ init/parser.c 2008-12-24 23:07:10.000000000 +0800
@@ -179,6 +179,7 @@
if (!strcmp(s, "etkey")) return K_setkey;
if (!strcmp(s, "etprop")) return K_setprop;
if (!strcmp(s, "etrlimit")) return K_setrlimit;
+ if (!strcmp(s, "leep")) return K_sleep;
if (!strcmp(s, "tart")) return K_start;
if (!strcmp(s, "top")) return K_stop;

Hope it helps!
--
Chen

Chen YANG

unread,
Dec 24, 2008, 10:18:43 AM12/24/08
to android-porting
Forgot to add one better soultion by using Chris's script make-live:
http://code.google.com/p/android/issues/detail?id=1598
--
Chen
> > read process was started at 3sec. If I am right, how can I do that?- Hide quoted text -
>
> - Show quoted text -

squix

unread,
Dec 26, 2008, 12:54:14 PM12/26/08
to android-porting
Thanks for your answer. When I try to compile the kernel with the
config file from the eee project I get the following error and I have
no clue how to solve it:
CC=gcc-4.2 CXX=g++-4.2 make ARCH=x86 CROSS-COMPILE=
CHK include/linux/version.h
CHK include/linux/utsrelease.h
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC drivers/misc/pmem.o
drivers/misc/pmem.c:440: error: conflicting types for
‘phys_mem_access_prot’
include/asm/pgtable.h:299: error: previous declaration of
‘phys_mem_access_prot’ was here
drivers/misc/pmem.c: In function ‘flush_pmem_fd’:
drivers/misc/pmem.c:833: error: implicit declaration of function
‘dmac_flush_range’
drivers/misc/pmem.c: In function ‘pmem_setup’:
drivers/misc/pmem.c:1293: error: implicit declaration of function
‘ioremap_cached’
drivers/misc/pmem.c:1294: warning: assignment makes pointer from
integer without a cast
make[2]: *** [drivers/misc/pmem.o] Error 1
make[1]: *** [drivers/misc] Error 2
make: *** [drivers] Error 2

Dima Zavin

unread,
Dec 26, 2008, 6:00:23 PM12/26/08
to android...@googlegroups.com
You shouldn't be building pmem for x86. Its not needed, and i think there are a few ARMisms in there that we haven't had a chance to clean it up.
Take it out of your config file (it's is not in the kernel.config in the eee701.git repo).

--Dima

Dima Zavin

unread,
Dec 26, 2008, 6:10:22 PM12/26/08
to android...@googlegroups.com
The music player seems to play music and dmesg indicates that the
INTEL HDA Audio
chip is correctly loaded. Could it be that everything is fine and just
the volume is turned off?
If this is the case how can I turn it on? :)

For audio, you'll need the alsa stuffs. You'll also probably need the correct defines in your board file. Search around for windriver alsa contribution, you'll probably find a howto as well. If you didn't build and include alsa, chances are you are using the emulation audio, and thus volume tweaking won't help :)

Another problem ist the RT2860 driver which I've successfully build
against the 2.6.25 kernel tree
but no device is available... - any hints?

Could you be more specific? Does the driver get loaded? Does the driver come up and not find the hardware? what does netcfg say?

--Dima
 

Thanks,

Daniel


Andriod Developer

unread,
Dec 31, 2008, 2:39:56 AM12/31/08
to android-porting
Hi freedom,
I am running this image under Sun VirtualBox and I ran into the same
issue (i.e. /dev/block/sdb2)
How do i resolve this? how do i provide the installer with arugments?

thanks

On Dec 21, 5:15 pm, freedom <koansin....@gmail.com> wrote:
> Thanks, the problem I ran into was that /dev/block/sdbwas
> the card reader and the USB stick was sdc. After changing
> the argument for installer to /dev/block/sdc2, I got it
> installed.
>
> On Dec 20, 4:05 am, "Dima Zavin" <d...@android.com> wrote:
>
> > > after boot from my USB stick, I saw
> > >  init: Unable to open persisent property directory /data/property
> > > errno: 2
> > > and
>
> > This is harmless in this case.
>
> > >  I/installer( 1865): Waiting for device: /dev/block/sdb2
> > > than some USB information, and shell prompt
>
> > > my internal SSD was not touched at all, that is, it didn't start to
> > > install
>
> > As I mentioned, the installer is definitely not robust. It assumes that sda
> > will be the internal SSD, andsdbwill be the usbstick (iirc). You might

Dima Zavin

unread,
Jan 2, 2009, 1:14:50 AM1/2/09
to android...@googlegroups.com
init starts the installer. Try editing init.conf.

freedom

unread,
Jan 4, 2009, 7:53:32 PM1/4/09
to android-porting
if you didn't get around this problem yet, try
1. 'ps' to list the installer process and 'kill' it
2. run '/system/bin/installer -p /dev/block/
YOUR_SECOND_PARTITION_ON_USB_STICK' (e.g., I used /dev/block/sdc2 and /
dev/block/sdd2 for my EeePC 701 and 900 respectively)

On Dec 31 2008, 3:39 pm, Andriod Developer <andrd.dv...@gmail.com>
wrote:

Martin

unread,
Jan 6, 2009, 5:05:40 PM1/6/09
to android-porting
Hello Chris, did you change anything to get wifi and bluetooth working
on the wind? Thanks in advance, Martin.

On Dec 19 2008, 9:44 pm, Chris <chris.l.elf...@intel.com> wrote:
> I have been able to successfully run the eee701 cupcake build on an
> MSI Wind.  I have a _VERY_ preliminary script that takes the
> installer.img and a USB stick and creates a "live" USB stick that can
> be booted.  Running off of USB will make some apps timeout a bit more
> because its not as fast as internal storage but it makes it easy to
> try it out.
>
> If anyone is interested in the liveUSB conversion script, I can submit
> a changeset (probably to put in vendor/asus/eee_701 for now).  Bear in
> mind this version of the script is very preliminary and I plan to
> update it some after my vacation.
>
> Thx,
>
> Chris Elford
> Intel Software Services Group
>
> On Dec 19, 12:57 pm, squix <dani.eichh...@squix.ch> wrote:
>
> > I had the same problem. It has to to with the gcc version your using
> > and the header refactoring that they did for that version. You can fix
> > errors like that by simply adding the right includes in the file
> > complaining.
> > In 90% I had to add one of these
> > #include <cstdlib>
> > #include <cstring>
> > but there were other cases as well.
>
> > After fixing many of these issues I finally could build the installer
> > image. But when I run it on my very old machine (Geode GX1) only GRUB
> > is printed and a blinking cursor. What might be here the problem? I
> > thought besides less important things the eee 701 is just a standard
> > x86 system, or am I wrong. Is there another product I should build it
> > for?
>
> > Huan Truong wrote:
> > > I could not compile the cupcake branch as of 1:20PM CST. There seems
> > > to be some error while compiling fst.o
>
> > > external/srec/tools/thirdparty/OpenFst/fst/lib/../../fst/lib/vector-
> > > fst.h:404: error: memcpy was not declared in this scope
> > > external/srec/tools/thirdparty/OpenFst/fst/lib/../../fst/lib/vector-
> > > fst.h: In member function W fst::WeightFromString<W>::operator()
> > > (const std::string&) [with W = fst::LogWeight] :
> > > external/srec/tools/thirdparty/OpenFst/fst/lib/../../fst/lib/vector-
> > > fst.h:412: error: memcpy was not declared in this scope
> > > make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/
> > > libfst_intermediates/symbol-table.o] Error 1
> > > make: *** Waiting for unfinished jobs....
> > > make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/
> > > libfst_intermediates/fst.o] Error 1
>
> > > Any suggestions?

Chris

unread,
Jan 6, 2009, 7:23:16 PM1/6/09
to android-porting
Hi Martin,

I have not tried wifi or bluetooth yet on the Wind. This is one of
the reasons that Dima mentioned that in the end, we'll need to have
different targets for these different devices because components,
drivers, etc will be different. Even though wpa_supplicant is used
for wireless and blue-z is used for bluetooth, the actual device
driver to load/unload is somewhat device specific. We are working to
finalize some patches that allows system properties to be used to
specify the relevant device drivers which should simplify creating
device specific targets.

Thanks,
Chris
> > > > > >http://source.android.com/roadmap/cupcake- Hide quoted text -

Martin

unread,
Jan 6, 2009, 8:32:20 PM1/6/09
to android-porting
Thanks for the reply chris, I shall keep an eye out for that, will you
post the results here? Thanks, Martin.
> > > > > > >http://source.android.com/roadmap/cupcake-Hide quoted text -

Chris

unread,
Jan 14, 2009, 6:40:01 PM1/14/09
to android-porting
I will remind the guys to follow up here.

Thx,
Chris

On Jan 6, 5:32 pm, Martin <m.e.da...@googlemail.com> wrote:
> Thanks for the replychris, I shall keep an eye out for that, will you
> post the results here? Thanks, Martin.
>
> On Jan 7, 12:23 am,Chris<chris.l.elf...@intel.com> wrote:
>
>
>
> > Hi Martin,
>
> >   I have not tried wifi or bluetooth yet on the Wind.  This is one of
> > the reasons that Dima mentioned that in the end, we'll need to have
> > different targets for these different devices because components,
> > drivers, etc will be different.  Even though wpa_supplicant is used
> > for wireless and blue-z is used for bluetooth, the actual device
> > driver to load/unload is somewhat device specific.  We are working to
> > finalize some patches that allows system properties to be used to
> > specify the relevant device drivers which should simplify creating
> > device specific targets.
>
> > Thanks,
> >Chris
>
> > On Jan 6, 2:05 pm, Martin <m.e.da...@googlemail.com> wrote:
>
> > > HelloChris, did you change anything to get wifi and bluetooth working
> > > on the wind? Thanks in advance, Martin.
>
> > > > > > > >http://source.android.com/roadmap/cupcake-Hidequoted text -
>
> > > - Show quoted text -- Hide quoted text -

ashish...@gmail.com

unread,
Jan 25, 2009, 9:16:57 AM1/25/09
to android-porting
swap has been included twoce. It is there in standard stl libs. This
problem is visible with gcc4.3.x.

open /$ANDROID_SOURCE_ROOT/external/webkit/WebKit/android/stl/
algorithm in editor and comment lines 76 -83

//template<typename _Tp>
//inline void
//swap(_Tp& __a, _Tp& __b)
//{
// _Tp __tmp = __a;
//__a = __b;
// __b = __tmp;
//}


On Dec 11 2008, 9:53 pm, squix <dani.eichh...@squix.ch> wrote:
> Hi group
>
> Does anyone have an idea why I get this error?
> ============================================
> TARGET_PRODUCT=generic
> TARGET_SIMULATOR=
> TARGET_BUILD_TYPE=release
> TARGET_ARCH=x86
> TARGET_OS=linux
> HOST_ARCH=x86
> HOST_OS=linux
> HOST_BUILD_TYPE=release
> BUILD_ID=TC3
> ============================================
> host C++: simulator <= development/simulator/app/DeviceManager.cpp
> In file included from /usr/include/wx-2.6/wx/memory.h:20,
>                  from /usr/include/wx-2.6/wx/object.h:25,
>                  from /usr/include/wx-2.6/wx/wx.h:16,
>                  from development/simulator/app/DeviceManager.cpp:12:
> /usr/include/wx-2.6/wx/string.h:771: error: âwxChar& wxString::operator
> [](unsigned int)â cannot be overloaded
> /usr/include/wx-2.6/wx/string.h:768: error: with âwxChar&
> wxString::operator[](size_t)â
> In file included from /usr/include/wx-2.6/wx/stream.h:26,
>                  from /usr/include/wx-2.6/wx/image.h:24,
>                  from /usr/include/wx-2.6/wx/gtk/cursor.h:23,
>                  from /usr/include/wx-2.6/wx/cursor.h:24,
>                  from /usr/include/wx-2.6/wx/event.h:32,
>                  from /usr/include/wx-2.6/wx/wx.h:23,
>                  from development/simulator/app/DeviceManager.cpp:12:
> /usr/include/wx-2.6/wx/filefn.h:322: error: zero width for bit-field
> âwxAssert_323::BadFileSizeTypeâ
> In file included from /usr/include/wx-2.6/wx/utils.h:38,
>                  from /usr/include/wx-2.6/wx/cursor.h:37,
>                  from /usr/include/wx-2.6/wx/event.h:32,
>                  from /usr/include/wx-2.6/wx/wx.h:23,
>                  from development/simulator/app/DeviceManager.cpp:12:
> /usr/include/wx-2.6/wx/longlong.h: In constructor
> âwxLongLongNative::wxLongLongNative(long int, long unsigned int)â:
> /usr/include/wx-2.6/wx/longlong.h:115: warning: left shift count >=
> width of type
> /usr/include/wx-2.6/wx/longlong.h: In member function âlong int
> wxLongLongNative::GetHi() constâ:
> pe
> /usr/include/wx-2.6/wx/longlong.h: In constructor
> âwxULongLongNative::wxULongLongNative(long unsigned int, long unsigned
> int)â:
> /usr/include/wx-2.6/wx/longlong.h:333: warning: left shift count >=
> width of type
> /usr/include/wx-2.6/wx/longlong.h: In member function âlong unsigned
> int wxULongLongNative::GetHi() constâ:
> /usr/include/wx-2.6/wx/longlong.h:351: warning: right shift count >=
> width of type
> In file included from development/simulator/app/LogWindow.h:13,
>                  from development/simulator/app/MainFrame.h:11,
>                  from development/simulator/app/MyApp.h:12,
>                  from development/simulator/app/DeviceManager.cpp:17:
> development/simulator/app/LogPrefsDialog.h: At global scope:
> development/simulator/app/LogPrefsDialog.h:28: warning: âtypedefâ was
> ignored in this declaration
> make: *** [out/host/linux-x86/obj/EXECUTABLES/simulator_intermediates/
> DeviceManager.o] Error 1
>
> Is this maybe a x86_64 specific problem? I followed the description
> for x86_64 and could do the "normal" build. But if I try to do the x86
> "application-like" build I get that error... I'm trying this on a
> Ubuntu 8.10 system...
>
> Thanks, for any help
>
> On Dec 6, 12:49 am, Lucky-dog <Honglian...@gmail.com> wrote:> I got it. it located in out/host/linux-x86/bin. Thanks.
>
> > On Dec 4, 10:28 am, Lucky-dog <Honglian...@gmail.com> wrote:
>
> > > hi all
> > >    I fixed it with renaming swap to swapab. But now I have another
> > > question needed your help. I can't let the following command get to be
> > > run.
> > >    dx --dex --output=foo.jar Foo.class
> > >    What is the dx command and where is it?  Would you like to help me
> > > out? Thank you very much.
>
> > > On Dec 3, 10:12 pm, Lucky-dog <Honglian...@gmail.com> wrote:
>
> > > > hi all
> > > >    when i try to compile the source on DEBUGx86. A error is reported
> > > > out as below. Would you like to let me know how to fix it? Thank you
> > > > very much.
> > > > thomast@ubuntu:~/mydroid$ make
> > > > build/core/product_config.mk:229: WARNING: adding test OTA key
> > > > build/core/main.mk:177: implicitly installing apns-conf_sdk.xml
> > > > ============================================
> > > > TARGET_PRODUCT=sim
> > > > TARGET_SIMULATOR=true
> > > > TARGET_BUILD_TYPE=debug
> > > > TARGET_ARCH=x86
> > > > TARGET_OS=linux
> > > > HOST_ARCH=x86
> > > > HOST_OS=linux
> > > > HOST_BUILD_TYPE=release
> > > > BUILD_ID=TC3
> > > > ============================================
> > > > target thumb C++: libkjs <= external/webkit/JavaScriptCore/bindings/
> > > > NP_jsobject.cpp
> > > > In file included from /usr/include/c++/4.3/bits/stl_pair.h:65,
> > > >                  from /usr/include/c++/4.3/utility:68,
> > > >                  from external/webkit/JavaScriptCore/wtf/
> > > > VectorTraits.h:27,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > LocalStorage.h:29,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > JSVariableObject.h:32,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > JSGlobalObject.h:26,
> > > >                  from external/webkit/JavaScriptCore/bindings/
> > > > NP_jsobject.cpp:32:
> > > > /usr/include/c++/4.3/bits/stl_move.h:80: error: redefinition of
> > > > ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
> > > > external/webkit/JavaScriptCore/../WebCore/platform/android/stl/
> > > > algorithm:65: error: ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
> > > > previously declared here
> > > > make: *** [out/debug/host/linux-x86/product/sim/obj/STATIC_LIBRARIES/
> > > > libkjs_intermediates/bindings/NP_jsobject.o] Error 1
> > > > thomast@ubuntu:~/mydroid$
>
> > > > thomast@ubuntu:~/mydroid$ make
> > > > build/core/product_config.mk:229: WARNING: adding test OTA key
> > > > build/core/main.mk:177: implicitly installing apns-conf_sdk.xml
> > > > ============================================
> > > > TARGET_PRODUCT=sim
> > > > TARGET_SIMULATOR=true
> > > > TARGET_BUILD_TYPE=debug
> > > > TARGET_ARCH=x86
> > > > TARGET_OS=linux
> > > > HOST_ARCH=x86
> > > > HOST_OS=linux
> > > > HOST_BUILD_TYPE=release
> > > > BUILD_ID=TC3
> > > > ============================================
> > > > target thumb C++: libkjs <= external/webkit/JavaScriptCore/bindings/
> > > > NP_jsobject.cpp
> > > > In file included from /usr/include/c++/4.3/bits/stl_pair.h:65,
> > > >                  from /usr/include/c++/4.3/utility:68,
> > > >                  from external/webkit/JavaScriptCore/wtf/
> > > > VectorTraits.h:27,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > LocalStorage.h:29,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > JSVariableObject.h:32,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > JSGlobalObject.h:26,
> > > >                  from external/webkit/JavaScriptCore/bindings/
> > > > NP_jsobject.cpp:32:
> > > > /usr/include/c++/4.3/bits/stl_move.h:80: error: redefinition of
> > > > ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
> > > > external/webkit/JavaScriptCore/../WebCore/platform/android/stl/
> > > > algorithm:65: error: ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
> > > > previously declared here
> > > > make: *** [out/debug/host/linux-x86/product/sim/obj/STATIC_LIBRARIES/
> > > > libkjs_intermediates/bindings/NP_jsobject.o] Error 1
> > > > thomast@ubuntu:~/mydroid$
>
> > > > thomast@ubuntu:~/mydroid$ make
> > > > build/core/product_config.mk:229: WARNING: adding test OTA key
> > > > build/core/main.mk:177: implicitly installing apns-conf_sdk.xml
> > > > ============================================
> > > > TARGET_PRODUCT=sim
> > > > TARGET_SIMULATOR=true
> > > > TARGET_BUILD_TYPE=debug
> > > > TARGET_ARCH=x86
> > > > TARGET_OS=linux
> > > > HOST_ARCH=x86
> > > > HOST_OS=linux
> > > > HOST_BUILD_TYPE=release
> > > > BUILD_ID=TC3
> > > > ============================================
> > > > target thumb C++: libkjs <= external/webkit/JavaScriptCore/bindings/
> > > > NP_jsobject.cpp
> > > > In file included from /usr/include/c++/4.3/bits/stl_pair.h:65,
> > > >                  from /usr/include/c++/4.3/utility:68,
> > > >                  from external/webkit/JavaScriptCore/wtf/
> > > > VectorTraits.h:27,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > LocalStorage.h:29,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > JSVariableObject.h:32,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > JSGlobalObject.h:26,
> > > >                  from external/webkit/JavaScriptCore/bindings/
> > > > NP_jsobject.cpp:32:
> > > > /usr/include/c++/4.3/bits/stl_move.h:80: error: redefinition of
> > > > ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
> > > > external/webkit/JavaScriptCore/../WebCore/platform/android/stl/
> > > > algorithm:65: error: ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
> > > > previously declared here
> > > > make: *** [out/debug/host/linux-x86/product/sim/obj/STATIC_LIBRARIES/
> > > > libkjs_intermediates/bindings/NP_jsobject.o] Error 1
> > > > thomast@ubuntu:~/mydroid$
>
> > > > thomast@ubuntu:~/mydroid$ make
> > > > build/core/product_config.mk:229: WARNING: adding test OTA key
> > > > build/core/main.mk:177: implicitly installing apns-conf_sdk.xml
> > > > ============================================
> > > > TARGET_PRODUCT=sim
> > > > TARGET_SIMULATOR=true
> > > > TARGET_BUILD_TYPE=debug
> > > > TARGET_ARCH=x86
> > > > TARGET_OS=linux
> > > > HOST_ARCH=x86
> > > > HOST_OS=linux
> > > > HOST_BUILD_TYPE=release
> > > > BUILD_ID=TC3
> > > > ============================================
> > > > target thumb C++: libkjs <= external/webkit/JavaScriptCore/bindings/
> > > > NP_jsobject.cpp
> > > > In file included from /usr/include/c++/4.3/bits/stl_pair.h:65,
> > > >                  from /usr/include/c++/4.3/utility:68,
> > > >                  from external/webkit/JavaScriptCore/wtf/
> > > > VectorTraits.h:27,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > LocalStorage.h:29,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > JSVariableObject.h:32,
> > > >                  from external/webkit/JavaScriptCore/kjs/
> > > > JSGlobalObject.h:26,
> > > >                  from external/webkit/JavaScriptCore/bindings/
> > > > NP_jsobject.cpp:32:
> > > > /usr/include/c++/4.3/bits/stl_move.h:80: error: redefinition of
> > > > ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
> > > > external/webkit/JavaScriptCore/../WebCore/platform/android/stl/
> > > > algorithm:65: error: ‘template<class _Tp> void std::swap(_Tp&, _Tp&)’
> > > > previously declared here
> > > > make: *** [out/debug/host/linux-x86/product/sim/obj/STATIC_LIBRARIES/
> > > > libkjs_intermediates/bindings/NP_jsobject.o] Error 1
> > > > thomast@ubuntu:~/mydroid$

EricaJoy

unread,
Jan 28, 2009, 1:56:16 AM1/28/09
to android-porting
Hi all,

I made this "how to" doc in the hopes that it would make it easier for
someone to build Android for the Eee 701.

http://docs.google.com/Doc?id=ajdmx8kfg357_81cmpr56f6

Please let me know if you would like edit rights, especially if you'd
like to add information about how to build for a different x86
platform.

Thanks,
Erica

On Jan 25, 6:16 am, "ashish.kre...@gmail.com"
> ...
>
> read more »

Dima Zavin

unread,
Jan 28, 2009, 2:22:23 PM1/28/09
to android...@googlegroups.com
Actually, you don't need the -b cupcake anymore. It's been merged down to master, so please update the doc :)

Thanks.

--Dima

Erica Baker ♛

unread,
Jan 28, 2009, 2:24:20 PM1/28/09
to android...@googlegroups.com
Done, thanks Dima!

NimeshChanchani

unread,
May 24, 2010, 2:12:23 PM5/24/10
to Dima Zavin, android...@googlegroups.com
Hi Dima,

its been a while .. any updates on X86 porting?

I'm adding support for WebM to "StageFright" and my purpose is to
build and debug the "StageFright" multimedia framework natively using
the stagefright executable in the cmds folder. Currently i'm using
logcat to debug.

I have 2 questions:

1. is it possible , i know it is , but has someone tried to port
android and run the android kernel on a desktop PC?
if yes what is the procedure?
If the android kernel is up and running on a PC can I use gdb to debug
any executable for eg stagefright test app in cmds?

2. If one used ubuntu what are the build macros:
TARGET_PRODUCT=sim
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=debug

is the TARGET_BUILD_TYPE debug and release similar to the windows
concept of building debug with O0( no compiler optimization ) option
and -g ( symbolic debug information enabled ) and release with O3
( maximul compiler optimization )

Also what is TARGET_PRODUCT=sim vs generic ? for eg we execcute the

nimesh@nimesh-desktop:~/android$ emulator

from the command line similarly where is the simulator located? and
how do i use the simulator instead of the emulator?

Best Regards,
Nimesh
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -

--
unsubscribe: android-porti...@googlegroups.com
website: http://groups.google.com/group/android-porting

Yi Sun

unread,
May 25, 2010, 1:05:39 AM5/25/10
to nimeshc...@gmail.com, Dima Zavin, android...@googlegroups.com
Www.android-x86.org



On 2010-5-24, at 11:12, NimeshChanchani <nimeshc...@gmail.com>
wrote:

NimeshChanchani

unread,
May 25, 2010, 2:34:59 AM5/25/10
to Yi Sun, android...@googlegroups.com
thanks sun... but i was looking at how to use the :
TARGET_PRODUCT=sim
TARGET_SIMULATOR=true
TARGET_BUILD_TYPE=debug

options on ubuntu-virtual box.

also what is the difference between TARGET_BUILD_TYPE=debug and
TARGET_BUILD_TYPE=release ? in terms of compiler optimization and
symbolic debug info?




On May 25, 10:05 am, Yi Sun <beyo...@gmail.com> wrote:
> Www.android-x86.org
>
> On 2010-5-24, at 11:12, NimeshChanchani <nimeshchanch...@gmail.com>  

David Turner

unread,
May 25, 2010, 4:37:09 PM5/25/10
to bey...@gmail.com, nimeshc...@gmail.com, Dima Zavin, android...@googlegroups.com


On Mon, May 24, 2010 at 10:05 PM, Yi Sun <bey...@gmail.com> wrote:
Www.android-x86.org


NOTE: android-x86 is hardly anything officially supported.
                from development/simulator/app/DeviceManager.cpp:12:
/usr/include/wx-2.6/wx/string.h:771: error: âwxChar& wxString::operator

[](unsigned int)â cannot be overloaded
/usr/include/wx-2.6/wx/string.h:768: error: with âwxChar&
wxString::operator[](size_t)â
In file included from /usr/include/wx-2.6/wx/stream.h:26,
                from /usr/include/wx-2.6/wx/image.h:24,
                from /usr/include/wx-2.6/wx/gtk/cursor.h:23,
                from /usr/include/wx-2.6/wx/cursor.h:24,
                from /usr/include/wx-2.6/wx/event.h:32,
                from /usr/include/wx-2.6/wx/wx.h:23,
                from development/simulator/app/DeviceManager.cpp:12:

/usr/include/wx-2.6/wx/filefn.h:322: error: zero width for bit-field
âwxAssert_323::BadFileSizeTypeâ
In file included from /usr/include/wx-2.6/wx/utils.h:38,
                from /usr/include/wx-2.6/wx/cursor.h:37,
                from /usr/include/wx-2.6/wx/event.h:32,
                from /usr/include/wx-2.6/wx/wx.h:23,
                from development/simulator/app/DeviceManager.cpp:12:

/usr/include/wx-2.6/wx/longlong.h: In constructor
âwxLongLongNative::wxLongLongNative(long int, long unsigned int)â:
/usr/include/wx-2.6/wx/longlong.h:115: warning: left shift count >=
width of type
/usr/include/wx-2.6/wx/longlong.h: In member function âlong int
wxLongLongNative::GetHi() constâ:
pe
/usr/include/wx-2.6/wx/longlong.h: In constructor
âwxULongLongNative::wxULongLongNative(long unsigned int, long unsigned

int)â:
/usr/include/wx-2.6/wx/longlong.h:333: warning: left shift count >=
width of type
/usr/include/wx-2.6/wx/longlong.h: In member function âlong unsigned
int wxULongLongNative::GetHi() constâ:
/usr/include/wx-2.6/wx/longlong.h:351: warning: right shift count >=
width of type
In file included from development/simulator/app/LogWindow.h:13,
                from development/simulator/app/MainFrame.h:11,
                from development/simulator/app/MyApp.h:12,
                from development/simulator/app/DeviceManager.cpp:17:
development/simulator/app/LogPrefsDialog.h: At global scope:
development/simulator/app/LogPrefsDialog.h:28: warning: âtypedefâ was

NimeshChanchani

unread,
May 26, 2010, 6:19:35 AM5/26/10
to android-porting
Hey David!! I didn't get any text in your reply!!!

On May 26, 1:37 am, David Turner <di...@android.com> wrote:


> On Mon, May 24, 2010 at 10:05 PM, Yi Sun <beyo...@gmail.com> wrote:
> > Www.android-x86.org
>
> > NOTE: android-x86 is hardly anything officially supported.
>

Reply all
Reply to author
Forward
0 new messages