[Gta04-owner] 3.0.8 kernel for Android/Replicant

NeilBrown neilb at suse.de
Mon Dec 3 23:54:58 CET 2012


On Mon, 03 Dec 2012 21:44:51 +0100 Paul Kocialkowski <paulk at paulk.fr> wrote:

> Le dimanche 02 décembre 2012 à 08:18 +1100, NeilBrown a écrit :
> > > So I am considering porting the GTA04-specific changes back to that
> > > 3.0.8 tree, in order to have all the Android features in place. I have
> > > already imported minor changes (panel and led drivers) but I am unsure
> > > about what to do with the board file and the omap3 changes. So I'm
> > > wondering if someone used to dealing with GTA04 kernel aspects could
> > > help me figuring out which changes are needed, given that the omapzoom
> > > tree already comes with a share of omap3-specific improvements.
> > 
> > I would just try copying bit out of my 3.2 kernel into the 3.0, try to
> > compile, see what breaks, and fix it.  Then try to run and see what breaks...
> > Then probably pull some other stuff out of a more recent kernel.  e.g. I
> > think wifi didn't really work nicely until a later kernel.
> 
> That's pretty much what I already started doing. I took the 3.0 tree
> from omapzoom and imported gta04-specific drivers (started with display
> and leds), and fixed the board file build and defconfig. It all started
> nicely and I have working serial for debug, as well as adb (Android
> Debug using USB), which is nice. I think it will be possible to get
> something working and reliable out of this.
> 
> > Do you have a tree on github or somewhere with the bits you've already
> > back-ported?  I could pull that and have a look and see what needs doing.
> > 
> > I must admit that I'd rather be working on a new kernel than an old kernel,
> > but then we'd need to hack on the user-space to get it to use auto-suspend
> > instead of wakelocks which might be messier.
> 
> Indeed, that's the idea. And hopefully, I will be able to deal with
> minor stuff when the very low-level stuff is in place. So for now, USB
> and serial is working, but display is not. Reboot works, but power off
> seems incomplete as the power led remains turned on after poweroff.
> 
> So I've pushed the sources (you'd probably better fetch this on top of a
> 3.0 kernel tree, since my box is on my home ADSL line (it's slow):
> http://git.paulk.fr/gitweb/?p=replicant/kernel-gta04.git;a=summary
> the branch is replicant-4.0
> 
> Thanks a lot for offering to look at it, I'm not particularly used to
> working on the kernel-side, even though I know the basics.
> 
> > > Keep in mind that Android does require a specific kernel setup and that
> > > a decent user experience with Android on the GTA04 can only exist with
> > > proper support in kernel-space. Also, I believe that going with the
> > > partially-working 3.2 kernel and applying tons of tricks and hacks in
> > > both kernel and user space will not result in any good result. That's
> > > why I'm asking some serious help to bring a stable and reliable kernel
> > > for Android 4.0.
> > > 
> > > Also, note that I have serial available and a GTA04A4 board. Any help is
> > > welcome!
> > > 
> > > [1]:
> > > http://omapzoom.org/?p=kernel/omap.git;a=shortlog;h=refs/heads/p-android-omap3-3.0
> 


The display problem seems to be caused by the backlight not working.
I didn't manage to find out why in a quick look, but you can work around it
for now with:

diff --git a/arch/arm/mach-omap2/board-omap3gta04.c b/arch/arm/mach-omap2/board-omap3gta04.c
index 16d43d64..cc954c8 100644
--- a/arch/arm/mach-omap2/board-omap3gta04.c
+++ b/arch/arm/mach-omap2/board-omap3gta04.c
@@ -1122,7 +1122,7 @@ static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
 
 static struct omap_board_mux board_mux[] __initdata = {
 	/* Enable GPT11_PWM_EVT instead of GPIO-57 */
-	OMAP3_MUX(GPMC_NCS6, OMAP_MUX_MODE3),
+	OMAP3_MUX(GPMC_NCS6, OMAP_MUX_MODE4),
 
 	{ .reg_offset = OMAP_MUX_TERMINATOR },
 };
@@ -1255,6 +1255,9 @@ static void __init gta04_init(void)
 	gpio_direction_input(144);
 	gpio_export(144, 0);	// no direction change
 
+	gpio_request(57, "BL");
+	gpio_direction_output(57, true);
+	gpio_export(57, 0);
 
 	if(gta04_version >= 4) { /* feature of GTA04A4 */
 		omap_mux_init_gpio(186, OMAP_PIN_OUTPUT);    // this needs CONFIG_OMAP_MUX!



That will make the backlight permanently on.  Obviously that isn't ideal
either but at least you can experiment with more things.
Don't know when I'll find time to drill in more deeply, but it certainly
should be possible to the get the PWM backlight driver to work.

NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20121204/b38928c1/attachment.bin>


More information about the Gta04-owner mailing list