--- /dev/null
+ifeq ($(TARGET_ARCH),x86)
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+#LIVECD_PATH := $(LOCAL_PATH)
+
+LOCAL_MODULE := newinstaller
+LOCAL_MODULE_TAGS := system_builder
+
+initrd_dir := $(LOCAL_PATH)/initrd
+initrd_bin := \
+ $(initrd_dir)/init \
+ $(wildcard $(initrd_dir)/*/*)
+
+installer_ramdisk := $(PRODUCT_OUT)/initrd.img
+$(installer_ramdisk): $(initrd_bin) | $(ACP)
+ rm -rf $(TARGET_INSTALLER_OUT)
+ $(ACP) -pr $(initrd_dir) $(TARGET_INSTALLER_OUT)
+ ln -s /bin/ld-linux.so.2 $(TARGET_INSTALLER_OUT)/lib
+ mkdir -p $(addprefix $(TARGET_INSTALLER_OUT)/,android mnt proc sys sbin tmp)
+ $(MKBOOTFS) $(TARGET_INSTALLER_OUT) | gzip -9 > $@
+
+boot_dir := $(LOCAL_PATH)/boot
+boot_bin := $(wildcard $(boot_dir)/isolinux/*)
+
+BUILT_IMG := $(addprefix $(PRODUCT_OUT)/,ramdisk.img system.img initrd.img)
+BUILT_IMG += $(if $(TARGET_PREBUILT_KERNEL),$(TARGET_PREBUILT_KERNEL),$(PRODUCT_OUT)/kernel)
+
+ISO_IMAGE := $(PRODUCT_OUT)/$(TARGET_PRODUCT).iso
+$(ISO_IMAGE): $(BUILT_IMG) $(boot_bin)
+ @echo ----- Making iso image ------
+ genisoimage -vJURT -b isolinux/isolinux.bin -c isolinux/boot.cat \
+ -no-emul-boot -boot-load-size 4 -boot-info-table \
+ -input-charset utf-8 -V "Android LiveCD" -o $@ \
+ $(boot_dir) $(BUILT_IMG)
+
+.PHONY: iso_img
+iso_img: $(ISO_IMAGE)
+
+endif
--- /dev/null
+default vesamenu.c32
+#prompt 1
+timeout 600
+
+menu background splash.png
+menu title Android Live & Installation CD
+menu color border 0 #ffffffff #00000000
+menu color sel 7 #ffffffff #ff000000
+menu color title 0 #ffffffff #00000000
+menu color tabmsg 0 #ffffffff #00000000
+menu color unsel 0 #ffffffff #00000000
+menu color hotsel 0 #ff000000 #ffffffff
+menu color hotkey 7 #ffffffff #ff000000
+
+label live
+ menu label Live CD - Run Android without installation
+ kernel /kernel
+ append initrd=/initrd.img root=/dev/ram0 androidboot.hardware=eeepc vga=788
+
+label debug
+ menu label Live CD - Debug mode
+ kernel /kernel
+ append initrd=/initrd.img root=/dev/ram0 androidboot.hardware=eeepc vga=788 DEBUG=1
+
+label install
+ menu label Installation - Install Android to harddisk
+ kernel /kernel
+ append initrd=/initrd.img root=/dev/ram0 console=ttyS1,115200n8 console=tty0 androidboot.hardware=eeepc vga=788 INSTALL=1
--- /dev/null
+#!/bin/busybox sh
+
+if [ -n "$DEBUG" ]; then
+ LOG=/tmp/log
+ set -x
+else
+ LOG=/dev/null
+ [ -e $LOG ] || busybox mknod $LOG c 1 3
+fi
+exec 2> $LOG
+
+busybox mount -t proc proc /proc
+busybox mount -t sysfs sys /sys
+
+busybox --install -s
+
+export PATH=$PATH:/system/bin
+
+if [ -n "$DEBUG" ]; then
+ mknod /dev/tty2 c 4 2 && openvt
+ mknod /dev/tty3 c 4 3 && openvt
+fi
+
+echo -n Detecting Android...
+
+while [ 1 ]; do
+ mdev -s
+
+ for device in /dev/sr* /dev/sd[a-z]*; do
+ mount $device /mnt || continue
+ cd /mnt/$SRC
+ if [ ! -e ramdisk.img -o ! -e system.img ]; then
+ umount /mnt
+ continue
+ fi
+ mount -t tmpfs tmpfs /android
+ cd /android
+ zcat /mnt/$SRC/ramdisk.img | cpio -id > /dev/null
+ mount -o loop,ro /mnt/$SRC/system.img system
+ mkdir cache sdcard
+ mount -t tmpfs tmpfs data
+ mount -t tmpfs tmpfs cache
+ mount -t tmpfs tmpfs sdcard
+ echo " found at $device"
+ break
+ done
+ mountpoint -q /android && break
+ sleep 1
+ echo -n .
+done
+
+ln -s android/system /
+
+ln -s ../system/lib/modules /lib
+
+# load framebuffer driver
+if [ ! -e /dev/fb0 ]; then
+ modprobe drm
+ # TODO: auto detect and load correct driver
+ modprobe i915
+fi
+
+# load lan driver
+# TODO
+# load wifi driver
+# TODO
+
+if [ -n "$DEBUG" ]; then
+ echo -e "\nUse Alt-F1/F2/F3 to switch between virtual consoles"
+ echo -e "Type 'exit' to enter Android...\n"
+
+
+ # FIXME: all error messages in the shell are sent to $LOG
+ sh
+ chroot /android /init
+else
+ exec switch_root /android /init
+fi
+
+sh # aviod kernel panic