emulator: ERROR: bad workspace: cannot find prebuilt kernel in: /aosp/prebuilt/android-arm/kernel/kernel-qemu-armv7

2,477 views
Skip to first unread message

John Smith

unread,
Jan 9, 2012, 2:28:22 PM1/9/12
to Android Building
Hi, everybody!

I am new to android building, so please excuse me if my question is
too easy :)

After following instructions in [1] and [2] exactly the build process
seemed to be successful, however the "emulator" command fails with
this error:

emulator: ERROR: bad workspace: cannot find prebuilt kernel in: /aosp/
prebuilt/android-arm/kernel/kernel-qemu-armv7

I indeed have not built the kernel itself, as this step seems to be
optional - maybe this was the error?

However I found a directory with the kernel-qemu-armv7 binary - but
this is in

/aosp/prebuilts/qemu-kernel/arm/kernel-qemu-armv7

please mind the letter s at the end of the prebuilts directory - so I
have one prebuilt and one prebuilts directory in my workspace - this
smells like a typo - or is this ok?

if I try to do this:

emulator -kernel prebuilts/qemu-kernel/arm/kernel-qemu-armv7

I get

emulator: ERROR: No initial system image for this configuration!

I am currently not deep enough involved into AOSP to be able to solve
the problem myself and did not find anything searching the groups, so
I need to ask these questions here:

1. What did I do wrong?
2. Is building the kernel mandatory?
3. If I want to build the kernel, where do I have to clone the
repository exactly?
4. How could I have solved this problem myself?


[1] http://source.android.com/source/downloading.html
[2] http://source.android.com/source/building.html

more information that might be helpful:

xxx@ubuntu:/media/data/android/aosp$ uname -a
Linux ubuntu 3.0.0-14-generic #23~lucid1-Ubuntu SMP Thu Dec 8 13:07:28
UTC 2011 x86_64 GNU/Linux

/aosp/ is just a shortcut to my workdir used in this post - it looks
like this after the build process:

xxx@ubuntu:/media/data/android/aosp$ ls
abi bionic bootable build cts dalvik development device docs
external frameworks hardware libcore Makefile ndk out packages
prebuilt prebuilts sdk system

the repo sync and download process was successful.

android sdk tools do work as expected.

java seems to be ok:

xxx@ubuntu:/media/data/android/aosp$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

xxx@ubuntu:/media/data/android/aosp$ javac -version
javac 1.6.0_26

some related env vars after build process:

ANDROID_BUILD_PATHS=:/media/data/android/aosp/out/host/linux-x86/bin:/
media/data/android/aosp/prebuilt/linux-x86/toolchain/arm-linux-
androideabi-4.4.x/bin:/media/data/android/aosp/development/emulator/
qtools:/media/data/android/aosp/prebuilt/linux-x86/toolchain/arm-linux-
androideabi-4.4.x/bin:/media/data/android/aosp/prebuilt/linux-x86/
toolchain/arm-eabi-4.4.3/bin
ANDROID_BUILD_TOP=/media/data/android/aosp
ANDROID_EABI_TOOLCHAIN=/media/data/android/aosp/prebuilt/linux-x86/
toolchain/arm-linux-androideabi-4.4.x/bin
ANDROID_HOME=/media/data/android/sdk
ANDROID_HOST_OUT=/media/data/android/aosp/out/host/linux-x86
ANDROID_JAVA_TOOLCHAIN=/usr/lib/jdk/java-6-oracle/bin
ANDROID_PRE_BUILD_PATHS=/usr/lib/jdk/java-6-oracle/bin:
ANDROID_PRODUCT_OUT=/media/data/android/aosp/out/target/product/
generic
ANDROID_QTOOLS=/media/data/android/aosp/development/emulator/qtools
ANDROID_SDK_HOME=/media/data/android/avd
ANDROID_TOOLCHAIN=/media/data/android/aosp/prebuilt/linux-x86/
toolchain/arm-linux-androideabi-4.4.x/bin
ARM_EABI_TOOLCHAIN=/media/data/android/aosp/prebuilt/linux-x86/
toolchain/arm-eabi-4.4.3/bin
TARGET_BUILD_APPS=
TARGET_BUILD_TYPE=release
TARGET_BUILD_VARIANT=eng
TARGET_PRODUCT=full
prebuiltdir=/media/data/android/aosp/prebuilt/linux-x86
toolchaindir=toolchain/arm-eabi-4.4.3/bin

you need some more info?

Thank you very much for your attention!
John


Jean-Baptiste Queru

unread,
Jan 10, 2012, 10:59:09 AM1/10/12
to android-...@googlegroups.com
We're in the process of making changes in that exact area, and it's a bit rocky.

The difference between prebuilt/ and prebuilts/ is intentional. We're
getting rid of prebuilt/ (which is a giant monolithic project) and
replacing it with multiple projects under prebuilts/. Since the source
tree layout hasn't changed in 3 1/2 years, there are surprisingly many
places that hard-code the old location.

I thought I had fixed this issue at some point last Friday, but maybe
I didn't (I've literally been battling broken builds in half a dozen
branches for a whole week, and I'm losing track of which branch has
what).

JBQ

> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Jean-Baptiste Queru

unread,
Jan 10, 2012, 11:55:56 AM1/10/12
to android-...@googlegroups.com
I've just done a clean build with the latest master and didn't run
into this issue. It's possible that you synced your client during the
window when it was broken (from about 1pm to 6pm PST last Friday).

JBQ

Seenu Upadhya

unread,
Feb 8, 2012, 6:56:00 PM2/8/12
to android-...@googlegroups.com
Do you have an android development environment (android-sdk) already set up on the same machine? It's possible that your PATH contains an entry to the android-sdk/tools directory ahead of the entry for the source's out directory, and so it's trying to launch the wrong emulator.

Quick check - do 'echo $PATH' at the command prompt and see what result you get. Your path will also have entries for a number of directories under source/ (like source/out/.., source/prebuilt/...).

The '/out/host/linux-x86/bin' directory is likely to contain your emulator executable.

Reply all
Reply to author
Forward
0 new messages