RE: Android on OMAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> 
> Btw: After hacking this page flipping issue, m5-rc14 basically starts
> on OSK. Start takes some time, and it isn't really usable. So more or
> less a "proof of concept" for 32MB systems ;). But it starts.
> 
> http://elinux.org/Android_on_OMAP
> 

I followed the instruction and I can launch it. But unstable it goes suspend mode and never wakeup.
So I tried to launch it with latest kernel and success with simple trick. however it's same, hanging. Why it goes hang even though
it doesn't use PM mode. :)
Anyway you can achieve it with followings.

First, copy required files from android kernel to latest one.
	drivers/android/*
	drivers/misc/lowmemorykilller/*
	include/linux/android*
	include/linux/binder*
	include/linux/logger.h

Second, it can't compile android_power since the APIs are changed.
So you register fake alarm to logger [2].

Finally launches it.

I hope it's helpful you.

Thank you,
Kyungmin Park

1. android.patch
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index eeda0cd..b277768 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1173,6 +1173,8 @@ source "drivers/dma/Kconfig"

 source "drivers/dca/Kconfig"

+source "drivers/android/Kconfig"
+
 if ARCH_OMAP
 source "drivers/cbus/Kconfig"
 source "drivers/dsp/dspgateway/Kconfig"
diff --git a/drivers/Makefile b/drivers/Makefile
index ea7baa4..a3425be 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -98,3 +98,4 @@ obj-$(CONFIG_PPC_PS3)         += ps3/
 obj-$(CONFIG_OF)               += of/
 obj-$(CONFIG_SSB)              += ssb/
 obj-$(CONFIG_VIRTIO)           += virtio/
+obj-y                          += android/
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 982e27b..06ade5a 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -326,4 +326,10 @@ config ENCLOSURE_SERVICES
          driver (SCSI/ATA) which supports enclosures
          or a SCSI enclosure device (SES) to use these services.

+config LOW_MEMORY_KILLER
+       tristate "Low Memory Killer"
+       ---help---
+         Register processes to be killed when memory is low.
+
+
 endif # MISC_DEVICES
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 3b12f5d..d10a556 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -22,3 +22,5 @@ obj-$(CONFIG_FUJITSU_LAPTOP)  += fujitsu-laptop.o
 obj-$(CONFIG_EEPROM_93CX6)     += eeprom_93cx6.o
 obj-$(CONFIG_INTEL_MENLOW)     += intel_menlow.o
 obj-$(CONFIG_ENCLOSURE_SERVICES) += enclosure.o
+obj-$(CONFIG_LOW_MEMORY_KILLER)        += lowmemorykiller/
+
diff --git a/drivers/video/omap/omapfb_main.c b/drivers/video/omap/omapfb_main.c
index f66b81a..c206098 100644
--- a/drivers/video/omap/omapfb_main.c
+++ b/drivers/video/omap/omapfb_main.c
@@ -169,7 +169,7 @@ static int ctrl_init(struct omapfb_device *fbdev)
                /* 12 bpp is packed in 16 bits */
                if (bpp == 12)
                        bpp = 16;
-               def_size = def_vxres * def_vyres * bpp / 8;
+               def_size = def_vxres * def_vyres * 2 * bpp / 8;
                fbdev->mem_desc.region_cnt = 1;
                fbdev->mem_desc.region[0].size = PAGE_ALIGN(def_size);
        }
@@ -423,6 +423,7 @@ static void set_fb_fix(struct fb_info *fbi)
        }
        fix->accel              = FB_ACCEL_OMAP1610;
        fix->line_length        = var->xres_virtual * bpp / 8;
+       fix->ypanstep           = 1;
 }

 static int set_color_mode(struct omapfb_plane_struct *plane,
@@ -1493,7 +1494,7 @@ static int fbinfo_init(struct omapfb_device *fbdev, struct fb_info *info)
        var->xres = def_vxres;
        var->yres = def_vyres;
        var->xres_virtual = def_vxres;
-       var->yres_virtual = def_vyres;
+       var->yres_virtual = def_vyres * 2;
        var->rotate       = def_rotate;
        var->bits_per_pixel = fbdev->panel->bpp;

2. fack-alarm.patch
--- kernel/drivers/android/logger.c     2008-02-12 11:46:56.000000000 +0900
+++ linux-omap-2.6/drivers/android/logger.c     2008-03-05 16:37:40.000000000 +0900
@@ -25,6 +25,10 @@

 #include <asm/ioctls.h>

+#ifndef CONFIG_ANDROID_POWER
+#include <linux/android_alarm.h>
+#endif
+
 /*
  * struct logger_log - represents a specific log, such as 'main' or 'radio'
  *
@@ -512,6 +516,12 @@ static long logger_ioctl(struct file *fi
                break;
        }

+       switch (ANDROID_ALARM_BASE_CMD(cmd)) {
+               printk("%s[%d] dummy alarm ioctl 0x%x\n", __func__, __LINE__, ANDROID_ALARM_BASE_CMD(cmd));
+       default:
+               ret = 0;
+       }
+
        mutex_unlock(&log->mutex);

        return ret;
@@ -554,6 +564,9 @@ static struct logger_log VAR = { \
 DEFINE_LOGGER_DEVICE(log_main, LOGGER_LOG_MAIN, 64*1024)
 DEFINE_LOGGER_DEVICE(log_events, LOGGER_LOG_EVENTS, 64*1024)
 DEFINE_LOGGER_DEVICE(log_radio, LOGGER_LOG_RADIO, 64*1024)
+#ifndef CONFIG_ANDROID_POWER
+DEFINE_LOGGER_DEVICE(alarm, LOGGER_LOG_ALARM, 64*1024)
+#endif

 static struct logger_log * get_log_from_minor(int minor)
 {
@@ -599,6 +612,12 @@ static int __init logger_init(void)
        if (unlikely(ret))
                goto out;

+#ifndef CONFIG_ANDROID_POWER
+       ret = init_log(&alarm);
+       if (unlikely(ret))
+               goto out;
+#endif
+
 out:
        return ret;
 }


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux