Is there an official recommended way of building vbox_x86-eng target?

3203 views
Skip to first unread message

Ron M

unread,
Nov 16, 2011, 10:57:07 AM11/16/11
to Android Building
Hi all,

I see that lunch has a vbox option (  lunch  vbox-x86-eng ), for which  applying a "make" is useless (Please correct me if I am wrong),
but rather a  "make  installer_vdi" should be run as the make target, otherwise I just get some other QEMU stuff (which would make the emulator-x86 get stuck at the Android splash screen)

However, I have not seen any reference or documentation for it either in the build system or in source.android.com
Is there such? All I saw was in the makefiles themselves at   bootable/diskinstaller/config.mk .

Just to double-check  I get it right, the way to build for vbox is indeed  " lunch vbox-x86-eng && make installer_vdi" right?


Thanks,
Ron

Nathaniel Husted

unread,
Nov 16, 2011, 1:24:35 PM11/16/11
to android-...@googlegroups.com
I used:

lunch vbox-x86-eng
make -j16
make install_vdi

Though the installer won't boot in Virtualbox. It complains about a
corrupted partition.

I've also tried:

lunch vbox-x86-eng
make -j16
make android_disk_vdi

But receive a kernel panic followed by:

"atkbd.c: Spurious ACK on isa0060/serio0. Some program might be trying
access hardware directly."

My only though is that I need to try this on a machine that supports
hardware virtualization... though I really hope it's not depending on
me have VT-d capabilities.

Cheers,
Nathaniel

> --
> 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
>

Doug Schaefer

unread,
Nov 16, 2011, 2:11:54 PM11/16/11
to android-...@googlegroups.com
These aren't the steps you were talking about in the other thread are
they? I'm mainly interested in how you set up the SATA devices and
what commands you used to get the installer running correctly.
Message has been deleted

Nathaniel Husted

unread,
Nov 16, 2011, 6:47:59 PM11/16/11
to android-...@googlegroups.com
This is the closest thing I've found in the archive that discusses
instructions for running the VirtualBox option. It appears that
Android just will not function with SATA drives. Virtualbox MUST be
set up with an IDE controller.

Link: https://groups.google.com/group/android-building/browse_thread/thread/5053edfbcfe9f057/8c98f10a1537e49e?lnk=gst&q=vbox+x86#8c98f10a1537e49e

Cheers,
Nathaniel

On Wed, Nov 16, 2011 at 4:45 PM, Mark Renouf <mre...@google.com> wrote:
> Here's what I'm seeing. I tried both the "Install to" option and the "Boot
> from" option.
> "Install to" stops, waiting for a /dev/sdb2 (which apparently never appears)
> "Boot from" fails to boot fully because there is no /system partition
> mounted (or so it seems).
>
> I've also included a screenshot of my VirtualBox settings, I believe I have
> these correct.
>
> I'm hoping somebody can figure this out :-)

Doug Schaefer

unread,
Nov 16, 2011, 8:23:22 PM11/16/11
to android-...@googlegroups.com
A-ha, that did it. Now back to your original point. How do I get a
mouse pointer.

One cool thing I saw on the first boot, it put me right into the home
screen and I was able to use the keyboard to select things, including
a very nice swap to another page that showed very acceptable graphics
performance. Now, just need to get a mouse pointer.

:D

Nathaniel Husted

unread,
Nov 16, 2011, 8:30:51 PM11/16/11
to android-...@googlegroups.com
I am currently having the exact same issue. I am in the middle of a
development server rebuild so I will not be able to play around with
Android and VirtualBox until tomorrow eve. However, if you happen to
find a solution I will be most interested. I'm curious as it does not
seem that the previous post I linked to earlier had the mouse issues.
I'd love to know what step I have either conveniently left out or if
there's something different about ICS when it comes to mouse
interaction.

Hopefully someone comes up with a solution for this one!

Cheers,
Nathaniel

Doug Schaefer

unread,
Nov 16, 2011, 9:17:46 PM11/16/11
to android-...@googlegroups.com
That and there's no network access (reinstalled to get back to the
home screen where keyboard navigation works).

It's use is pretty limited. I think this turns into an
android-porting, or android-x86.org discussion pretty quickly.

:D

dfages

unread,
Nov 17, 2011, 1:47:29 AM11/17/11
to Android Building
Hi,
the good news with the mouse is that ICS now includes all the
necessary code in the framework to support mouse type input devices
(with previous versions you had to hack the framework - you can check
what have been done on this in the android-x86 project).

Then, you can get the mouse pointer quite easily : you just have to
rebuild a kernel with the appropriate PS/2 mouse driver.
- Get the emulator kernel source "android-goldfish-2.6.29" (as stated
by JQB)
- Copy the arch/x86/configs/vbox_defconfig to .config
- "make ARCH=x86 menuconfig" and add the PS/2 mouse driver ("Device
Drivers"->"Input device support"->"Mice"->"PS/2 mouse"
- "make ARCH=x86"
- Get the arch/x86/boot/bzImage and replace the prebuilt vbox kernel
in your ICS source code tree (or create a dedicated device for this)
- Rebuild your android_disk.vdi as stated and use it :-)

If you have some difficulties to do it, I'll happily share my kernel
binary.

Concerning the network, it works well at a "system level" (on my side,
I've configured my Android VM in VBox to use a "Bridge" type of
virtual NIC - so that my Android directly access the network and uses
the DHCP server on my LAN). I'm able to ping from the shell. The
network is not available from the GUI because the "Ethernet" type of
network device doesn't seem to be supported in the Android framework -
I'll look if there's an easy solution on this.

Best regards,
Dan.

On 17 nov, 03:17, Doug Schaefer <cdtd...@gmail.com> wrote:
> That and there's no network access (reinstalled to get back to the
> home screen where keyboard navigation works).
>
> It's use is pretty limited. I think this turns into an
> android-porting, or android-x86.org discussion pretty quickly.
>
> :D
>
>
>
>
>
>
>
> On Wed, Nov 16, 2011 at 8:30 PM, Nathaniel Husted <nhus...@gmail.com> wrote:
> > I am currently having the exact same issue. I am in the middle of a
> > development server rebuild so I will not be able to play around with
> > Android and VirtualBox until tomorrow eve. However, if you happen to
> > find a solution I will be most interested. I'm curious as it does not
> > seem that the previous post I linked to earlier had the mouse issues.
> > I'd love to know what step I have either conveniently left out or if
> > there's something different about ICS when it comes to mouse
> > interaction.
>
> > Hopefully someone comes up with a solution for this one!
>
> > Cheers,
> > Nathaniel
>
> > On Wed, Nov 16, 2011 at 8:23 PM, Doug Schaefer <cdtd...@gmail.com> wrote:
> >> A-ha, that did it. Now back to your original point. How do I get a
> >> mouse pointer.
>
> >> One cool thing I saw on the first boot, it put me right into the home
> >> screen and I was able to use the keyboard to select things, including
> >> a very nice swap to another page that showed very acceptable graphics
> >> performance. Now, just need to get a mouse pointer.
>
> >> :D
>
> >> On Wed, Nov 16, 2011 at 6:47 PM, Nathaniel Husted <nhus...@gmail.com> wrote:
> >>> This is the closest thing I've found in the archive that discusses
> >>> instructions for running the VirtualBox option. It appears that
> >>> Android just will not function with SATA drives. Virtualbox MUST be
> >>> set up with an IDE controller.
>
> >>> Link:https://groups.google.com/group/android-building/browse_thread/thread...
>
> >>> Cheers,
> >>> Nathaniel

dfages

unread,
Nov 17, 2011, 4:03:57 AM11/17/11
to Android Building
Concerning the network access (and following my previous post on the
mouse), eth0 is on and configured for DHCP by default.
So, if you're using DHCP, you just have to manually set the DNS server
using the command line.
For example, "setprop net.dns1 8.8.8.8"
The DHCP client sets the net.eth0.dnsX properties which are not used
(certainly because Ethernet is not well supported).

Dan.

On 17 nov, 03:17, Doug Schaefer <cdtd...@gmail.com> wrote:
> That and there's no network access (reinstalled to get back to the
> home screen where keyboard navigation works).
>
> It's use is pretty limited. I think this turns into an
> android-porting, or android-x86.org discussion pretty quickly.
>
> :D
>
>
>
>
>
>
>
> On Wed, Nov 16, 2011 at 8:30 PM, Nathaniel Husted <nhus...@gmail.com> wrote:
> > I am currently having the exact same issue. I am in the middle of a
> > development server rebuild so I will not be able to play around with
> > Android and VirtualBox until tomorrow eve. However, if you happen to
> > find a solution I will be most interested. I'm curious as it does not
> > seem that the previous post I linked to earlier had the mouse issues.
> > I'd love to know what step I have either conveniently left out or if
> > there's something different about ICS when it comes to mouse
> > interaction.
>
> > Hopefully someone comes up with a solution for this one!
>
> > Cheers,
> > Nathaniel
>
> > On Wed, Nov 16, 2011 at 8:23 PM, Doug Schaefer <cdtd...@gmail.com> wrote:
> >> A-ha, that did it. Now back to your original point. How do I get a
> >> mouse pointer.
>
> >> One cool thing I saw on the first boot, it put me right into the home
> >> screen and I was able to use the keyboard to select things, including
> >> a very nice swap to another page that showed very acceptable graphics
> >> performance. Now, just need to get a mouse pointer.
>
> >> :D
>
> >> On Wed, Nov 16, 2011 at 6:47 PM, Nathaniel Husted <nhus...@gmail.com> wrote:
> >>> This is the closest thing I've found in the archive that discusses
> >>> instructions for running the VirtualBox option. It appears that
> >>> Android just will not function with SATA drives. Virtualbox MUST be
> >>> set up with an IDE controller.
>
> >>> Link:https://groups.google.com/group/android-building/browse_thread/thread...
>
> >>> Cheers,
> >>> Nathaniel

Ron M

unread,
Nov 17, 2011, 5:49:28 AM11/17/11
to android-...@googlegroups.com
I was just curious about whether there is an "official" way.

BUT - I am also experiencing the same problems you guys are - Can't see my mouse pointer!
I think it is a system configuration issue thought, and has nothing to do with ICS - as the same problem happened to me on GIngerbread.
Must be some Ubuntu 11.10/virtualbox 4.1.6/a combination of hard luck  stuff, as I was able to run X86-Android with mouse pointer support on another configuration in the past.

What I do get, is launcher crashes. How about you guys?


I'd be very happy to have someone from google responding in this thread. Otherwise I may assume that the vbox varient is just an unmaintained Hack, which would be quite sad-  as it is gzaillion times faster
than the qemu builds.

Ron

Ron M

unread,
Nov 17, 2011, 8:05:04 AM11/17/11
to android-...@googlegroups.com
The VDI's resulted from these "make vdi-installer"  and  "make   android_disk_vdi" -  
Result with a VM which does not have the "Machine->Disable Mouse Integration"  (it is grayed out in the "Machine" menu).
Without enabling it - you cannot use mouse on Android-X86 - and I suspect that the same thing applies to Google's   vbox_x86  target.


That means we (assuming you have the same problem) can't use mouse within the vbox ICS - which deems this configuration useless :-(

Anyone for the save?

Jean-Baptiste Queru

unread,
Nov 17, 2011, 11:41:49 AM11/17/11
to android-...@googlegroups.com
I haven't been looking at the state of vbox in ICS other than making
sure that it'd compile. I wouldn't go as far as calling it a hack, but
it probably fell behind a bit, especially in the domain of graphics
(where things have evolved a lot) and input (where things have changed
as well). Let's call it "work in progress".

JBQ

--
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.

Doug Schaefer

unread,
Nov 17, 2011, 11:47:30 AM11/17/11
to android-...@googlegroups.com
From what I've seen, the graphics are pretty good (i.e fast enough).
It's really an input issue I suppose. Android-x86 used to have a patch
to make it work. Given I've seen a mouse pointer on the Transformer, I
was hoping it would be part of the base and not a driver that ASUS had
added (who seems to be quasi involved with android-x86 now that I
think about it, hmmm).

Jean-Baptiste Queru

unread,
Nov 17, 2011, 11:52:24 AM11/17/11
to android-...@googlegroups.com
For sure, ICS supports mouse pointers quite natively. However, I also
know that there've been some changes in the way inputs are handed off
from the kernel to userland, and it's possible that the default 2.6.29
vbox kernel might not have all the necessary support for that.

I believe that the framework has some debugging commands to help
figure out which input events it's receiving, and that would probably
be useful to debug this case. You'll probably get the best expertise
in android-platform, where the framework experts lurk.

JBQ

Daniel FAGES

unread,
Nov 17, 2011, 12:30:45 PM11/17/11
to android-...@googlegroups.com
Hi,
I'm not sure you saw my post few hours ago but to get the mouse pointer you have to rebuild the kernel with the good driver.

Dan.

2011/11/17 Doug Schaefer <cdt...@gmail.com>

Doug Schaefer

unread,
Nov 17, 2011, 1:00:31 PM11/17/11
to android-...@googlegroups.com
Ah, you're earlier post just landed. I'll give it a try. Thanks!

Nathaniel Husted

unread,
Nov 17, 2011, 1:28:04 PM11/17/11
to android-...@googlegroups.com
I'll try that later as well. I know with a bit of searching there's a
link JBQ posted to the 4.0.1 kernel sources that were released in the
SDK. I figure that could be easily rebuild as well with appropriate
x86 support.

Cheers,
Nathaniel

On Thu, Nov 17, 2011 at 12:30 PM, Daniel FAGES <dfa...@gmail.com> wrote:

Jean-Baptiste Queru

unread,
Nov 17, 2011, 1:36:37 PM11/17/11
to android-...@googlegroups.com
Just as an FYI, the prebuilt vbox kernel exactly matches the sources
that I've released, so a straight rebuild as-is should get the same
results (fingers crossed), and you'll need to actually make changes in
order to make progress.

JBQ

Daniel FAGES

unread,
Nov 17, 2011, 1:43:21 PM11/17/11
to android-...@googlegroups.com
Yes, and you have to add the "PS/2 mouse" support to the vbox_defconfig to have the mouse working using VirtualBox.

Dan.

2011/11/17 Jean-Baptiste Queru <j...@android.com>

Doug Schaefer

unread,
Nov 17, 2011, 1:53:45 PM11/17/11
to android-...@googlegroups.com
Sorry guys, I lost track of where the kernel source is. Could you repeat that?

Thanks,
Doug.

Daniel FAGES

unread,
Nov 17, 2011, 1:55:15 PM11/17/11
to android-...@googlegroups.com
Quoting JBQ :

The emulator kernel source is available:

git clone https://android.googlesource.com/kernel/goldfish
cd goldfish
git checkout origin/android-goldfish-2.6.29

2011/11/17 Doug Schaefer <cdt...@gmail.com>

Jean-Baptiste Queru

unread,
Nov 17, 2011, 2:05:47 PM11/17/11
to android-...@googlegroups.com
Yup. Sorry the kernels are a bit hard to find without gitweb. Once I
have the relevant projects created, I'll create a proper list on
source.android.com.

JBQ

Doug Schaefer

unread,
Nov 17, 2011, 5:00:31 PM11/17/11
to android-...@googlegroups.com
And I have a mouse pointer. Thanks for the help guys!

guoqi...@gmail.com

unread,
Nov 19, 2011, 7:42:34 PM11/19/11
to Android Building
I want to compare the user experience on phone with those on tablet.
Does anyone know how to configure the screen size and skin for the
vbox image as in emulator ?


Thanks,

Ron M

unread,
Nov 20, 2011, 7:40:17 AM11/20/11
to android-...@googlegroups.com
Thanks Dan, I'm going to give it a shot.
Just to double check, did you have the same problem before rebuilding the kernel from sources?
Also, does anyone know why the "Disable mouse pointer integration" is disabled in this project?

JBQ:
As for this specific post I was actually wondering about an official "build recipe", so I think it actually goes here. (lunch <config>  and make <target options...> )
However, I think it would be useful to have some clarifications about the "recommended google-groups" for the various topics.
People, (and of course myself) sin to cross-post or mis-post just because we are not sure what goes where.
Would be great to have some sort of "index" in  source.android.com,  on this mailing list, or wherever you think it should go.

-Ron

Ron M

unread,
Nov 20, 2011, 8:58:58 AM11/20/11
to android-...@googlegroups.com
Dan, I followed your instructions but I  am having problems with the kernel build:

 ~/Android/ICS_Master/kernel/goldfish$ make ARCH=x86
scripts/kconfig/conf -s arch/x86/Kconfig
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CALL    scripts/checksyscalls.sh
  CHK     include/linux/compile.h
  VDSO    arch/x86/vdso/vdso32-int80.so.dbg
gcc: error: elf_i386: No such file or directory
make[1]: *** [arch/x86/vdso/vdso32-int80.so.dbg] Error 1
make: *** [arch/x86/vdso] Error 2


Attached my .config .

Any idea?

Thanks,
Ron
.config

Ron M

unread,
Nov 20, 2011, 11:07:23 AM11/20/11
to Android Building, android-...@googlegroups.com, android...@googlegroups.com
Platform and Kernel groups: Sorry for cross-posting.
I would appreciate help with this issue.

And would LOVE to know (JBQ?) why isn't /proc/config.gz  available for the ICS x86-emulator build. 
I can't tell (at the moment) what is wrong with my configuration as i can't get a reference configuration from the ICS kernel as I could in the past (Well, at least for the ARM goldfish variant).
What I see in the kernel listing:

 ~/Android/ICS_Master/kernel/goldfish/arch/x86/configs$ ls
goldfish_defconfig  i386_defconfig  vbox_defconfig  x86_64_defconfig

And none of those compile (Used the vbox_defconfig).


More information on my host (Ubuntu X86 11.10):
~/Android/ICS_Master/kernel/goldfish/arch/x86/configs$ cat /proc/version
Linux version 3.0.0-12-generic (buildd@crested) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011





Thanks.
.config

Ron M

unread,
Nov 20, 2011, 1:10:47 PM11/20/11
to Android Building, android-...@googlegroups.com, android...@googlegroups.com
What toolchain are you using? I tried to use the prebuilt from the AOSP master's, as I would in ARM compilation for the emulator - but it failed:


 ~/Android/ICS_Master/kernel/goldfish$ make ARCH=x86 CROSS_COMPILE=~/Android/ICS_Master/prebuilt/linux-x86/toolchain/i686-android-linux-4.4.3/bin/i686-android-linux- 2>&1 | tee BuildOut.log &
[1] 2624
   HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf -s arch/x86/Kconfig
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  SYMLINK include/asm -> include/asm-x86
  CC      kernel/bounds.s
kernel/bounds.c:1: warning: SSE instruction set disabled, using 387 arithmetics
  GEN     include/linux/bounds.h
  CC      arch/x86/kernel/asm-offsets.s
arch/x86/kernel/asm-offsets.c:1: warning: SSE instruction set disabled, using 387 arithmetics
  GEN     include/asm/asm-offsets.h
  CALL    scripts/checksyscalls.sh
cc1: warning: SSE instruction set disabled, using 387 arithmetics
  CC      scripts/mod/empty.o
scripts/mod/empty.c:1: warning: SSE instruction set disabled, using 387 arithmetics
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
scripts/mod/modpost.c: In function ‘get_markers’:
scripts/mod/modpost.c:1542:12: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
scripts/mod/modpost.c: In function ‘add_marker’:
scripts/mod/modpost.c:1962:10: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result]
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/ihex2fw
scripts/ihex2fw.c: In function ‘output_records’:
scripts/ihex2fw.c:261:8: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
scripts/ihex2fw.c:266:7: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
  HOSTCC  scripts/kallsyms
scripts/kallsyms.c: In function ‘read_symbol’:
scripts/kallsyms.c:74:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
  HOSTCC  scripts/conmakehash
  CC      init/main.o
init/main.c:1: warning: SSE instruction set disabled, using 387 arithmetics
init/main.c: In function 'unknown_bootoption':
init/main.c:267: warning: asm operand 0 probably doesn't match constraints
init/main.c:267: error: impossible constraint in 'asm'
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2

guoqi...@gmail.com

unread,
Nov 20, 2011, 7:46:26 PM11/20/11
to Android Building
Thanks for your share. Now the mouse works well in vbox. But I have
one more question about the simulation. Seems the vbox emulate a
tablet. Is there anyway to simulate a phone in vbox?

On Nov 17, 2:47 pm, dfages <dfa...@gmail.com> wrote:

Daniel FAGES

unread,
Nov 20, 2011, 12:07:15 PM11/20/11
to android...@googlegroups.com, Android Building, android-...@googlegroups.com
Hi Ron,
I think your problem is not due to your .config nor to Android.
It should be related to your version of gcc - according to https://bbs.archlinux.org/viewtopic.php?id=119341
You have 2 options :
- Use gcc <= 4.5
- Apply a patch to arch/x86/vdso/Makefile as explained at the bottom of the above URL

Regards,
Dan.

2011/11/20 Ron M <ron...@gmail.com>

Doug Schaefer

unread,
Nov 21, 2011, 1:54:00 PM11/21/11
to android-...@googlegroups.com
Yes, ran into the same thing and found the same archlinux article.
Google search is your friend :). I changed the mentioned lines
manually and things are working with the 4.6 gcc. If we had gerrit
review up and running, we could submit a patch to fix it for
everyone...

Bzbit

unread,
Nov 22, 2011, 3:13:58 AM11/22/11