[Gta04-owner] [Letux-kernel] LetuxOS: Replicant for GTA04

H. Nikolaus Schaller hns at goldelico.com
Wed Nov 18 18:09:40 CET 2020


And there is another bit of progress.

> Am 04.11.2020 um 20:24 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> Hi all,
> I am happy to announce that I was able to pushed that all a little more forward.
> 
>> Am 30.10.2020 um 17:22 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>> 
>> Hi all,
>> here is an update with the latest kernels:
>> 
>> letux-4.14.203-replicant
>> 	- works quite well incl. WiFi
>> 	- touch screen precalib not optimal (at least on the unit I have tested with)
>> 	- kernel has iio disabled
>> 	- sound does not seem to work
>> 	- Fdroid seems to be empty (maybe it is no longer compatible to the infrastructure)
>> 
>> letux-4.19.153-replicant
>> 	- shows "ANDROID"
>> 	- does not show Replicant robot
>> 	- then gets problems with failed binder ioctl() and decides to do an automatic reboot
> 
> Now works as well. I did not test it deeply so there may be more bugs behind the scenes.
> 
> The key problem was that the 32 bit binder protocol used by our Android 4.2 was removed in
> mainline starting with Kernel v4.18. Fortunately it was no problem to revert this (up to v5.10-rc2 so far).
> 
> Another smaller issue was how we enforce the framebuffer pixel format to RGB565. This was
> not compatible to the way it was done in earlier kernels.
> 
>> 
>> letux-5.4.73-replicant
>> 	- binder: 1739:1739 transaction failed 29201/-22, size 120-4 line 3224;
>> 	- [    7.288940] WARNING: CPU: 0 PID: 1043 at drivers/gpu/drm/drm_fourcc.c:305 drm_format_info+0x24/0x30 [drm]
>> 	- on second attempt to bring up drm:
>> 	  unable to handle kernel paging request at virtual address ffffffea - in drm_framebuffer_remove() aus omap_fbdev_init()
>> 	- kernel panic
> 
> After applying all the same patches as for 4.19 the GTA04 shows "ANDROID" but does not show the Replicant robot.
> There are a lot of warnings on the console but no automatic reboot.
> So this has to be analysed further. And it can be analysed much better than with a system that kernel panics
> 20 seconds after power on.

The reason could be traced down to the android binder (a kernel driver in drivers/android).
What has changed is that uapi/linux/android/binder.h is included in more components
in v5.4 than in v4.19.

Therefore restoring the 32 bit binder protocol which made 4.19 work was incomplete and
the components of the binder did not agree about struct sizes for some ioctls.

Hence user-space addresses passed to an ioctl were not accessible in kernel space and
the binder driver moaned. For all replicant processes that want to use the binder (almost
all).

Now with this fix the GTA04 boots and can be operated through touch.

The only negative effect I have seen so far is that if the GTA04 goes to suspend (seen
on the console) it does not wake up on touchscreen or button events.

> 
>> 
>> letux-5.9.2-replicant
>> 	- [    3.705841] WARNING: CPU: 0 PID: 0 at kernel/rcu/tree.c:2489 rcu_core+0x460/0x4e4
>> 	- [    4.018096]   No soundcards found.
>> 	- simply hangs - no console, no reaction, no kernel panic, no reboot
> 
> 
> Applying all the same patches as for 4.19 has removed the rcu_core warning. Now it hangs a little later after "Run /sbin/init as init process".
> So this is a different blocking point than with 5.4.
> 
>> 
>> The most problematic thing seems to be the binder. Other issues may be missing/not yet loaded kernel modules.
> 
> The binder problem has been fixed and kernel modules were less a problem than initially assumed.
> 
> So I think this idea of revitalizing the GTA04 with Android is on a good track.

Now I'd say on an even better track.

If we finally manage to get it work with v5.9 or even v5.10 we can add more and more
kernel related improvements and try to make it work on other devices as well (L3704,
OpenPandora, Pyra, Kobolino).

BR,
Nikolaus



More information about the Gta04-owner mailing list