[Hero, G2 Touch Android Development] k0rner:
This is an unstable, early preview, proof of concept, pre-alpha, etc. method of making HTC Hero printing the real kernel messages log during the boot.

Yes, not another animated gif with fake "boot log", but a real boot console with your real boot messages printing into it.

It may be useful for kernel debugging, to see what is going on before you can connect with ADB.

The video:

[YOUTUBE]VMCfaJfAAiI[/YOUTUBE]

It is a patch to Riemervdzee's "Las Venturas" 2.6.35 kernel, which enables framebuffer console (fbcon) and redirects console output to it instead of default RS232 console.

KNOWN ISSUES:

part 2 of the patch is extremely ugly, and is only a workaround over the real problem (fbcon driver fails to properly wake up the screen) - expect all kinds of issues with display power management.

To wake your Hero from sleep, you may sometimes need to quickly press power (end) button twice, as other means of waking up will cease to function.

Usual boot animation will start shortly after the kernel finishes its boot.

Even if we disable the bootscreen, Android will take over the display too early.

Сhanges to the kernel source:

1. Fix display coordinates bug (thanks to this thread)

--- a/drivers/video/msm/msm_fb.c
+++ b/drivers/video/msm/msm_fb.c
@@ -243,6 +243,7 @@ static int msmfb_start_dma(struct msmfb_info *msmfb)
y = msmfb->update_info.top;
w = msmfb->update_info.eright - x;
h = msmfb->update_info.ebottom - y;
+ x = 0; y = 0; w = msmfb->xres; h = msmfb->yres;
yoffset = msmfb->yoffset;
msmfb->update_info.left = msmfb->xres + 1;
msmfb->update_info.top = msmfb->yres + 1;

2. The extremely ugly part: comment out warnings about trying to update screen while sleping.

If this patch is not applied, the console will be flooded with "pan_update in state(0)" messages, and the device will not boot any further.

This is a kludge, and should probably be fixed by some more skilled Android kernel developer.

--- a/drivers/video/msm/msm_fb.c
+++ b/drivers/video/msm/msm_fb.c
@@ -311,8 +312,8 @@ static void msmfb_pan_update(struct fb_info *info, uint32_t left, uint32_t top,
DLOG(SHOW_UPDATES, "update %d %d %d %d %d %d\n",
left, top, eright, ebottom, yoffset, pan_display);

- if (msmfb->sleeping != AWAKE)
- DLOG(SUSPEND_RESUME, "pan_update in state(%d)\n", msmfb->sleeping);
+// if (msmfb->sleeping != AWAKE)
+// DLOG(SUSPEND_RESUME, "pan_update in state(%d)\n", msmfb->sleeping);

#ifdef CONFIG_PANEL_SELF_REFRESH

3. Kernel configuration changes (.config):

CONFIG_CMDLINE="fbcon=font:VGA8x8 console=tty0 quiet"
CONFIG_CMDLINE_FORCE=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
# CONFIG_PRINTK_TIME is not set # Unset this option

To display the console in landsape mode, add fbcon=rotate:1 to CONFIG_CMDLINE

Also, Linux boot logo can be turned on, if you like it (penguin at the top of the screen)

It is also possible to apply this patch to 2.6.29 kernel, but things will go even worse with display power management, rendering the device almost unusable.

You can find patched kernel (in update.zip format) in the attachment, but if you do not know how to revert to your original kernel -

Do not flash this!​