[Letux-kernel] How to build LetuxOS Android Kernel for LetuxOS Replicant 4.2?

H. Nikolaus Schaller hns at goldelico.com
Sun Jun 30 16:40:43 CEST 2019


> Am 30.06.2019 um 16:30 schrieb Andreas Kemnade <andreas at kemnade.info>:
> 
> On Sun, 30 Jun 2019 10:55:52 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
> 
>> Hi,
>> I am now able to build letux-4.14.129-replicant, patch it over the replicant 4.2 image and get the display working.
>> To make it work automatically, it needs some modifications to the load_modules.sh to get omapdss and the tvout up and running.
>> 
>> Charging with 500mA is now working out of the box :)
>> 
>> Libertas WiFi firmware also loads. The main mistake was a misinterpretation of the message
>> 
>> [  341.977203] libertas_sdio mmc1:0001:1: Direct firmware load for libertas/sd8686_v8_helper.bin failed with error -2
>> 
>> This will always come since the firmware loader is trying in sequence:
>> 
>> 	sd8686_v9_helper.bin
>> 	sd8686_v8_helper.bin
>> 	sd8686_helper.bin
>> 
>> So a successful load of sd8686_helper.bin is not reported!
>> 
>> If I rename sd8686_helper.bin -> sd8686_v8_helper.bin it will still report that two variants do fail.
>> 
>> Still, moving the Settings/Wi-Fi switch to ON makes it snap back immediately without any console activity.
>> 
> hmm, on the gta04a5 it seems to work. Just tried with my replicant 4.2.
> hmm, there was some suspend issue with libertas wifi I guess. Must
> check if that kernel is ok.
> 
>> As a next step I'll try to add the missing module loading to the kernel tree...
>> This might need to maintain the /system/load_modules.sh script within the kernel branch.
>> Which seems to be a good idea since it must track kernel changes.
> 
> there is also the devicetree stuff which is in the android side. 

Yes, auto-loading the modules from device tree would solve most of what
is in load_modules.sh as well.

This IMHO involves the kernel calling /sbin/modprobe but it is stored
somewhere else. Or the busybox modprobe does not understand the
parameters or additional tweaks of the module aliases database.
Maybe the depmod thing is not yet completely correct.

>> 
>> There are also other drivers renamed, e.g. bmp085 -> bmp280 etc.
>> 
> ... which happens rarely.

Well, it happens if you replace the 4.10 kernel with a 4.14 kernel
and backwards...

So every major kernel version may need some tiny changes to
make load_modules.sh properly work.

But in the long run we should get the DT -> modules thing working.

> 
>> So bringing that into a publishable shape is the next step.
>> 
> I think having the standard build process spitting out something useful
> is most important. Being able to quickly exchange kernel modules is
> something nice.

Not only nice. IMHO it is valuable for security reasons. I do neither
plan nor am I able to build new replicant images every week just to get
kernel updates... But I can build new kernels every week and patch them
into a working µSD.

So from my POV, kernel updates are much more often needed than rebuilding
the rootfs (except during hot phases of bug fixing).

BR,
Nikolaus





More information about the Letux-kernel mailing list