[Letux-kernel] How to build LetuxOS Android Kernel for LetuxOS Replicant 4.2?
H. Nikolaus Schaller
hns at goldelico.com
Fri Jun 28 18:41:45 CEST 2019
Hi,
> Am 28.06.2019 um 08:36 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>
>>>>
>>>> What I now think to remember is that the kernel build is part of the Replicant
>>>> build process and was not built separately. So we never were able to build
>>>> it externally and patch over a replicant rootfs. Probably this is possible,
>>>> by adding some scripts which are buried in the replicant build process to
>>>> mangle the kernel modules.
>>>>
>> I have built it externally. Well, I have the running system here to
>> check.
>
> Ok.
>
> How did you install the kernel and kernel modules?
I have done some more research and found:
1. there is a goldelico/scripts/mkrootfs.sh which collects all parts to built the full .tbz image with kernel and rootfs.
http://git.goldelico.com/?p=letux-replicant.git;a=blob;f=scripts/mkrootfs.sh;h=a3e3901b891d6e17e660bf71293dd000e775e08e;hb=ec1270a50c2aa6596ca614c431ebabe66134bf55
Result is out/target/product/gta04/gta04-rootfs.tar.bz2 which we apparently have just renamed on the download server.
2. it merges
/system /root /recovery and /boot/uImage (and some more bits)
into a single tree and packs them. It also cleans up some file permissions incl. the kernel modules
3. the kernel is build by the Android build system.
4. in the manifest
http://git.goldelico.com/?p=letux-replicant.git;a=blob;f=local_manifests/gta04-replicant-4.2-v2.xml;h=cd3c3bef838232ae0caed1aedb5379efba8318bb;hb=ef6546908a6e8265a2dec3849e8a5281658d3ac
we have this sub-project definition for the kernel project:
<project path="kernel/goldelico/gta04" remote="goldelico" name="letux-kernel.git" revision="work/lukas/android-4.10"/>
which defines this source tree:
http://git.goldelico.com/?p=letux-kernel.git;a=shortlog;h=refs/heads/work/lukas/android-4.10
What does this mean?
* kernel can be built outside of Replicant build system
* uImage can simply be patched over to /boot/uImage
* kernel modules are built differently by the Replicant build system or post-processed
* and I have not found where this is done...
So if we can find the post-processing script that prepares the kernel modules to /system/lib/modules
we can do the same outside of the Replicant build system.
This would enable us to build new kernel versions (with patches, config changes, different boards etc.)
and patch them over the prebuilt rootfs.
The next task is to locate this post-processing script and find out how it is modifying the kernel modules...
BR,
Nikolaus
More information about the Letux-kernel
mailing list