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

H. Nikolaus Schaller hns at goldelico.com
Sat Jun 29 08:37:37 CEST 2019


> Am 28.06.2019 um 19:38 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
> 
> Hi,
> 
>>> 
>>> find -name "*.ko" -exec mv \{\} /path/to/system/lib/modules \;
>> 
>> That is what I had tried first but it did not load any module...
>> Maybe it needs a special depmod to be run.
>> 
>>> not worth searching for.
> 
> Looks as if I have found something:
> 
> https://android.googlesource.com/device/asus/fugu/+/b01b7fd/AndroidKernel.mk#102
> 
> This does the "find -exec cp" but then runs a depmod. KERNEL_FAKE_DEPMOD seems to be a (broken?) symlink to help to create proper file names.
> 
> And, we might have an AndroidKernel.mk as well.

I haven't found one but there is load_modules.sh:

	http://git.goldelico.com/?p=letux-replicant-device.git;a=blob;f=rootdir/load_modules.sh;h=73c6c9255b655207ec422a3590646eb67cb769a6;hb=refs/heads/replicant-4.2-v2

This script seems to modprobe everything which is needed - at least in Letux-replicant-4.2-v2

I have done some more checks on the 4.6 kernel (Linux localhost 4.6.0-letux+ #1 SMP PREEMPT Sat Jun 18 21:04:58 CEST 2016 armv7l GNU/Linux) that works.

* the above mentioned script is installed in /system
* kernel modules are loaded
* there is no sd8686_v8_helper.bin at all and therefore, loading WiFi firmware must fail...
* if I build work/lukas/android-4.10 and flatten the kernel modules and patch it over the replicant-kernel-4.6 rootfs I can boot!
* there is only a handful of kernel modules automatically loaded
* but if I manually run /system/load_modules.sh the panel starts working!
* not fully. touch is not working, a Linux console cursor is blinking and the home button is missing
* WiFi is still not working, but that is the missing firmware in the replicant-kernel-4.6 rootfs

So I may be able to create an SD card with replicant-kernel-4.10 and patch in a newly compiled kernel potentially with fixes.
Hopefully the kernel panics will go away and WiFi come up...

Since I have uploaded the kernel to the downloads server makesd should now be able to create a new mixed system:

	makesd replicant -r http://download.goldelico.com/letux-replicant/4.2/20170423-kernel-4.10-replicant.tbz -kboot http://download.goldelico.com/letux-kernel/work/lukas/android-4.10-replicant/uImage -dboot http://download.goldelico.com/letux-kernel/work/lukas/android-4.10-replicant/device-trees.tbz -m http://download.goldelico.com/letux-kernel/work/lukas/android-4.10-replicant/modules.tgz

BR,
Nikolaus



More information about the Letux-kernel mailing list