OSDN Git Service

* support vbox audio (issue #7)
authorChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 20 Jul 2009 02:14:01 +0000 (10:14 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Mon, 20 Jul 2009 03:13:08 +0000 (11:13 +0800)
* add vmware support (issue #10)

boot/isolinux/isolinux.cfg
initrd/init
initrd/scripts/0-auto-detect
initrd/scripts/1-install

index a131443..4d094b7 100644 (file)
@@ -25,7 +25,7 @@ label vesa
 label debug
        menu label Live CD - Debug mode
        kernel /kernel
-       append initrd=/initrd.img root=/dev/ram0 androidboot.hardware=eeepc vga=788 DEBUG=1
+       append initrd=/initrd.img root=/dev/ram0 androidboot.hardware=eeepc vga=788 DEBUG=1 SRC= DATA= SDCARD=
 
 label install
        menu label Installation - Install Android to harddisk
index 29c857d..2c4e9ff 100755 (executable)
@@ -1,4 +1,12 @@
 #!/bin/busybox sh
+#
+# By Chih-Wei Huang <cwhuang@linux.org.tw>
+# Last updated 2009/07/18
+#
+# License: GNU Public License
+# We explicitely grant the right to use the scripts
+# with Android-x86 project.
+#
 
 if [ -n "$DEBUG" ]; then
        LOG=/tmp/log
@@ -80,9 +88,7 @@ for s in `ls /scripts/* /mnt/$SRC/scripts/*`; do
        source $s
 done
 
-for m in $ALL_MODULES; do
-       modprobe $m
-done
+load_modules
 
 [ -n "$INSTALL" ] && install_hd
 
index 021bff8..12ab078 100644 (file)
@@ -1,11 +1,21 @@
+#
+# By Chih-Wei Huang <cwhuang@linux.org.tw>
+# Last updated 2009/07/18
+#
+# License: GNU Public License
+# We explicitely grant the right to use the scripts
+# with Android-x86 project.
+#
+
 # TODO: implement a more generic auto detection by scanning /sys
 # For now we just look up the machine name.
 
-# FBDEV:  framebuffer driver
+# FB0DEV: framebuffer driver
 # LANDEV: lan driver
 # WIFDEV: wifi driver
 # SNDDEV: sound driver
 # CAMDEV: camera driver
+# PREDEV: any module the drivers depend on but can't be loaded automatically
 
 get_asus_info()
 {
@@ -32,15 +42,16 @@ get_asus_info()
        esac
 
        # common for all Eee PC models
-       FBDEV=i915
-       SNDDEV="snd-hda-codec-realtek snd-hda-intel"
+       FB0DEV=i915
+       SNDDEV=snd-hda-intel
        CAMDEV=uvcvideo
+       PREDEV=snd-hda-codec-realtek
 }
 
 get_vbox_info()
 {
        LANDEV=pcnet32
-       SNDDEV=snd-intel8x0
+       SNDDEV="snd-sb16 isapnp=0 irq=5"
 }
 
 get_qemu_info()
@@ -49,6 +60,12 @@ get_qemu_info()
        SNDDEV=snd-ens1370
 }
 
+get_vmware_info()
+{
+       LANDEV=pcnet32
+       SNDDEV=snd-ens1371
+}
+
 check_product()
 {
        grep -q "$1" /sys/class/dmi/id/uevent
@@ -59,8 +76,18 @@ detect_hardware()
        check_product ASUSTeK && get_asus_info
        check_product VirtualBox && get_vbox_info
        check_product QEMU && get_qemu_info
+       check_product VMware && get_vmware_info
 }
 
-detect_hardware
-
-ALL_MODULES="$FBDEV $LANDEV $WIFDEV $SNDDEV $CAMDEV"
+load_modules()
+{
+       detect_hardware
+       for m in $PREDEV; do
+               modprobe $m
+       done
+       [ -n "$FB0DEV" ] && modprobe $FB0DEV
+       [ -n "$LANDEV" ] && modprobe $LANDEV
+       [ -n "$WIFDEV" ] && modprobe $WIFDEV
+       [ -n "$SNDDEV" ] && modprobe $SNDDEV
+       [ -n "$CAMDEV" ] && modprobe $CAMDEV
+}
index 7609931..0c66daa 100644 (file)
@@ -1,3 +1,12 @@
+#
+# By Chih-Wei Huang <cwhuang@linux.org.tw>
+# Last updated 2009/07/18
+#
+# License: GNU Public License
+# We explicitely grant the right to use the scripts
+# with Android-x86 project.
+#
+
 install_hd()
 {
        dialog --title " WARNING " --msgbox '\n  Installation is not implemented yet.\n  Press OK to run live version.' 8 45