|
BuildAndroidForX86Platforms
#The instructions to build Android for X86. IntroductionThis page has (hopefully) the latest information about how to build Android for x86 platforms like EeePC. I try to provide instructions to build images to run on the real hardware as well as virtual machines. Due to the resource limitation (I'm doing this in my private time), currently I'm going to only use EeePC 1000HE and VirtualBox as reference running environments. I only have Ubuntu 8.10 for now, I will use it as my building platform. As you can see that I'm not a English speaker, so please bare with my broken English. For questions, please send e-mail to android porting group for quick help. Getting Android source code for x86Android currently supports x86 platforms though EeePC 701 porting done by Dima Zavin <dima@android.com>. In order to build Android image for EeePC 701, you need to :
It depends on your network, this step could take very long time (on my ADSL connection, it can take up to 3 hours).
<?xml version="1.0" encoding="UTF-8"?> On Wed, 2009-04-22 at 07:04 -0700, kewarken wrote:
> If you want to apply them all at once, since the patches follow a
> pattern, you can do something like this from your cupcake source dir
> with the patches in the directory above it:
>
> for patch in `pwd`/../*patch ; do
> project=`awk '/^project /{print $2}' $patch`
> (cd $project && patch -p1 < $patch)
> done
>
> cheers,
>
> Kris
>
How to build an image for VirtualBox210
by default vendor/asus/eee_701/disk_img.conf will be used as default disk configuration file. You can create your own.
now you can boot installed.vdi from VirtualBox Install and config VirtualBox210
- Name = it as "AsusAndrioid" - OStype=Linux - Version=2.6 - RAM=256MB - Hard Disks= Slot Checked Boot Harddisk with IDE Primary Master Booting Android kernel in VirtualBox
How to rebuild kernel
How to build and install image for EeePC701Building an installer image for a real EeePC is not more complicate than building an image for VB. The biggest issue is the framebuffer. The original porting done by Dima uses a modesetting inteldrmfb driver. Dima gave a link to download the source code for the driver. But the link does not work anymore. So people can not build their own kernel anymore. The modesetting inteldrmfb is released with 2.6.29 kernel, but at the time this note is written, the Android does not support 2.6.29 yet. Before Android moves to 2.6.29, we have two choices (Both tested by Luca and me):
I choose to use intelfb. In order to use either VESA or intelfb, we need to put vga=788 (800x600) or vga=785 (640x480) in the kernel command line. (Luca) I am running on EeePc 701 with following cmdline parameters appended to default ones: video=intelfb:640x480-16,accel vga=785 (Yi) I'am running on EeePC 1000HD with following cmdline parameters appended to default ones: video=intelfb:800x600-32,vga=788 Until now, Intel 915 need userspace stuff to improve performances and resolution. To do it, you need to do following changes: project bootable/diskinstaller/
diff --git a/config.mk b/config.mk
index 2cb034d..3ed1759 100644
--- a/config.mk
+++ b/config.mk
@@ -119,6 +119,7 @@ internal_installerimage_args := \
internal_installerimage_files := \
$(filter-out --%,$(internal_installerimage_args))
+BOARD_KERNEL_CMDLINE := $(patsubst vga=788, ,$(BOARD_KERNEL_CMDLINE))
BOARD_KERNEL_CMDLINE := $(strip $(BOARD_KERNEL_CMDLINE))
ifdef BOARD_KERNEL_CMDLINE
internal_installerimage_args += --cmdline "$(BOARD_KERNEL_CMDLINE)"
In vendor/asus/eee_701 directory do following changes
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 54b0d4f..598a528 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -25,7 +25,7 @@ TARGET_USE_DISKINSTALLER := true
TARGET_DISK_LAYOUT_CONFIG := vendor/asus/eee_701/disk_layout.conf
-BOARD_KERNEL_CMDLINE := console=tty0 console=ttyS1,115200n8 console=tty0 androidboot.hardware=eee_701
+BOARD_KERNEL_CMDLINE := console=tty0 console=ttyS1,115200n8 console=tty0 androidboot.hardware=eee_701 vga=788
diff --git a/init.rc b/init.rc
index 00aa93c..3eeb758 100644
--- a/init.rc
+++ b/init.rc
@@ -91,8 +91,10 @@ loglevel 3
insmod /lib/modules/cfbfillrect.ko
insmod /lib/modules/cfbcopyarea.ko
insmod /lib/modules/drm.ko
- insmod /lib/modules/i915.ko modeset=1
+ insmod /lib/modules/i915.ko
insmod /lib/modules/fbcon.ko
+ insmod /lib/modules/i2c-algo-bit.ko
+ insmod /lib/modules/intelfb.koin AndroidBoard.mk find kernel_modules := \ and add i2c-algo-bit.ko and intelfb.ko Now you can start to build installer.img:
atl2.ko cfbcopyarea.ko cfbimgblt.ko font.ko i915.ko bitblit.ko cfbfillrect.ko drm.ko fbcon.ko i2c-algo-bit.ko intelfb.ko softcursor.ko TARGET_ARCH=x86 TARGET_PRODUCT=eee_701 DISABLE_DEXPREOPT=true make -j4 installer_img |
On a 64bit host when rebuilding the kernel it's probably safer to set ARCH=x86 CROSS_COMPILE=i686-unknown-linux-gnu- and put prebuilt/linux-x86/toolchain/i686-unknown-linux-gnu-4.2.1/bin in your PATH before you do any make or make menuconfig.
Trying this out now - does not seem to work cleanly - has anyone else followed this set of instructions with a fresh synced repo? Some of the patches complain that Android.mk and AndroidBoard?.mk are going to be removed or are missing.
same problem here, it's not working. Which patches should we use?
Tell me what you are doing, I can look into this. I'm traveling now, So may not be able to response very fast.
Sorry for my bad english,
There are problems in webcore and especially when creating content of the out/target/product/eee_701/obj/SHARED_LIBRARIES/libwebcore_intermediates/WebCore?/css folder...
How can I fix this please ??? Has anyone got the same problem ?
adnot and cs_chfac, this wiki page is about compile the Android for X86. Please send your question to android-porting group directly for help
Can anyone suggest a Windows port of 'DD' that actually works!?
What about if we host images, so people will not need to keep compiling all the Android stuff every single time? I have a host with lots of bandwitch and space, or also we can use torrent - I can host it too in this case.
Do we need to apply all the patch, including the deprecated patches?
No, you don't need to patch all the patches. See the note on the home page for the required package. About hosting of the images, we are continuously changing, if you are hosting an image, it will be out of date very soon. I have created a source tree that you can build and run Android on eeepc. Just check it out
Questions concerning the ".ko" modules. The eee_pc repo sync provides most of the new modules: (atl2.ko cfbcopyarea.ko cfbimgblt.ko font.ko i915.ko bitblit.ko cfbfillrect.ko drm.ko fbcon.ko softcursor.ko) however some are not provided. (i2c-algo-bit.ko and intelfb.ko) 1. Do all the modules need to be recompiled for the 2.27 kernel or can we use the one's provided and only create the missing modules? 2. Is there a reason why some where not provided? i.e. kernel specific? 3. If we recompile/recreate the drm modules do the drm patches need to be re-applied? ...or is it best just to use the pre-compiled supplied ".ko" modules.
You should not use the modules from repo. You need to build your own modules. The modules come with the repo is a back port of modsetting driver for 2.6.25 kerenl.
Which source tree should we be using? The one from git or the one from the Subversion repository at http://code.google.com/p/patch-hosting-for-android-x86-support/source/checkout ?
I have tried building the installer_img from the subversion source tree. The build succeeds; I am now trying to install on an eeePC 901. The install proceeds to the point where it tries to install to the hard drive, but then appears to hang at
2:0:0:0: sdc? Attached SCSI removable disk 2:0:0:0: Attached scsi generic sg2 type 0
If I hit enter at this point I get a # busybox prompt. I think that it's not seeing the SSD drives somehow. The front page says that people have got the installer to work on a 901. Does anyone have any tips to make the installer work?
do this $ stop installer $ installer -p /dev/block/sdX2 where sdX is your usb stick.