Things are working well, I can build the lineageos image and flash it to my phone. I need to change the Linux kernel (I know this could really mess things up). I was hoping there is some instructions on how to change the linux configuration, build the kernel, then build a new lineage image that includes the modified kernel.
Thanks in advance.
Y-
Related
I kind of feel as if this should be a very basic topic and that I should not be having to post a new thread on it... but, out of curiosity, does anyone know whether or not the Android kernel-- which as we all know is a flavour of the Linux kernel-- can be updated through "patching" as the regular Linux kernel can? The reason I am asking is that I greatly prefer to run my device with a custom kernel that has extra features over the stock kernel, however, it seems like every custom kernel that is released is released as a one-shot deal, and that the only way to have a kernel that continues to be updated with fresh source is to run the kernels that are provided with the nightly ROM builds.
Of course, I could go the route of learning how to build my own kernels and add features to them.. but I guess my basic question is, does there exist any form of "general patch" that is periodically released by Google, or the Linux Kernel foundation, etc., that will bring your current kernel up-to-date with the latest system-wide changes (secuturity & stability fixes, etc), while leaving the bulk of the kernel and the kernel configuration in place? Or is that a totally unrealistic and impractical concept? I do build my own kernels from source for my laptop, but I know very little about compiling a kernel for android.. anyway, if there are any kernel devs still on this device's forum, what do you guys think?
Any feedback from knowledgeable individuals much appreciated.. thank you!
No. You would have to build the kernel and flash it yourself. You can usually find HTC's kernel source on their website for each device. You take that kernel and manually patch the updates yourself.
I'm no expert and just wanted to try and build Mi5s lineageos kernel with just a few minor changes, not the whole rom, but after flashing it doesn't boot.
This is more or less what I've done:
Downloaded lineageos Mi5s source:
https://github.com/LineageOS/android_kernel_xiaomi_msm8996
Downloaded Gooogle's prebuilt toolchain:
https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/
Setup a build system following guides/tutorials from here and there.
Got it to successfully build after a few fixes to source but it doesn't pass the Mi logo.
The 3 images in the output folder are, Image, Image.gz and Image.gz-dtb, from what I've read in various tutorials was to use the Image.gz-dtb image.
So initially I unpacked stock lineageos boot.img and repacked it with my compiled Image.gz-dtb, also I've tried Anykernel2, but it just results in a non booting kernel.
I'm not sure what I'm missing and any help is really appreciated.
I was able to compile Lineage OS 15.1 for my Asus Nexus Player but only after two workarounds (one missing file/buggered prebuilt bison). The build made my own update which I sideloaded according to the Lineage OS instructions. I ran through setup, and once reaching the main UI, I've no Settings icon anywhere to be found.
I was able to use a official nightly build to update everything. I then applied my own resulting kernel. My personal objective to make and boot my own kernel is complete, but I'd hoped to have my own entire build with the basics working so I could then tackle how to include additional packages, kernel modules I had it make during build, and firmware for my tuner.
Excluding the kernel, I'd like my image to give me the same experience as a nightly build, but I don't know what went wrong. I''m asking for advice on this.
Thanks.
Hi all,
as an experienced Linux user I wonder, how much I can reuse between ROMs?
For my understanding, all the binaries are compiled according a technology like ARM, X86, etc.
Additionally, the kernel is buid in a way, that it supports the device the best, I guess. OR is even the kernel just a complete kernel with all options and modules?
..and the boot-rom of course, as it contains a kernel.
So from that point of view, the only difference between an ARM compiled LOS 17.1 for Samsung, Honor or xiaomei is the boot-rom, the kernel and the kernel modules, right?
Based on that asumption, it should be possible, to just have ONE LOS ROM and then exchange the boot-rom + kernel+modules per device and that's all?
Best regards
QD
FRQD75 said:
Hi all,
as an experienced Linux user I wonder, how much I can reuse between ROMs?
For my understanding, all the binaries are compiled according a technology like ARM, X86, etc.
Additionally, the kernel is buid in a way, that it supports the device the best, I guess. OR is even the kernel just a complete kernel with all options and modules?
..and the boot-rom of course, as it contains a kernel.
So from that point of view, the only difference between an ARM compiled LOS 17.1 for Samsung, Honor or xiaomei is the boot-rom, the kernel and the kernel modules, right?
Based on that asumption, it should be possible, to just have ONE LOS ROM and then exchange the boot-rom + kernel+modules per device and that's all?
Best regards
QD
Click to expand...
Click to collapse
That one lineageOS ROM is a gsi by AndyYan . Official lineageOS has many more differences. There is muchproprietary precompiled code. We call it blobs.
My intention is to run docker on android. After some research my attention falls on this thread. It’s a guide to run docker inside termux. To do so you need some features that are disabled by default in Android’s stock kernel. Good thing there is a script to run inside termux (phone rooted) to check the necessary features for docker – listing all missing features and all enabled by default (with stock kernel).
Here are some example features that are necessary:
MACVLAN
VXLAN
VLAN_8021Q
I was and I’m still a newbie in kernel editing/compiling. I needed a guide that’s simple and understandable. So, I got my hands on the LineageOS build guide for a Samsung S10 (beyond1lte). After some days I finally managed to compile a new kernel with LineageOS 19.1 and got docker running on my Samsung S10.
Next step was to do the same with a Samsung S22 (r0s). At the moment I stuck in bootloop after flashing my self-compiled kernel. Currently I have those two more like same procedures to build a kernel and flashing it.
initial state: phone is rooted with magisk (patched AP with magisk apk)
1 – Loki Kernel (flash with FKM)2 – afaneh92 Kernel (flash with TWRP)cd arch/arm64/configscd arch/arm64/configsedit exynos2200_r0s_defconfig
CONFIG_MACVLAN is not set
to
CONFIG_MACVLAN=yedit afaneh_r0s_defconfig
CONFIG_MACVLAN is not set
to
CONFIG_MACVLAN=yuse build_menu from kernel root
- Build kerneluse build_menu from kernel root
- Build kerneluse build_menu from kernel root
- Make flashable zipsuse build_menu from kernel root
- Make flashable zipsInstall kernel with FKM and rebootInstall kernel with TWRP and rebootbootloopbootloop
If I do the same with other config options, i.e., VXLAN or VLAN_8021Q or even using “make menuconfig” with proper env variables as source I got the same result (bootloop). And I think there is no problem with my toolchains or so, because if I’m compiling default configs from the threads (loki and afaneh92), I can flash those self-compiled kernels and also boot into system without bootloop.
Need some help to clarify some stuff to get this "project" to the next level. I also can provide the complete kernel docker-feature list, as needed. Maybe someone will try it by himself.
Update:
I build a kernel with following additional features and was able to boot into system with that options:
MACVLAN
PID_NS
USER_NS
Unfortunatley I still missing the capability to get more features running, like: CGROUP_DEVICE, IP_VS, POSIX_MQUEUE, etc. I can't find proper guides to figure out which dependencies are required to get the kernel up with one of those options. My approach was kinda "trial and error" or read some other kernel-defconfigs to hit the golden feature to get the kernel booted. After around 30 build kernels I realized that's just a waste of time and if I not find the right explanation I do this procedure the rest of my life.
Someone told me to look inside the /proc/last_kmsg after bootloop, but there are so many lines I can't find the suitable that's responsible for bootloop. I linked the file anyway, maybe someone is really bored and wanna take a look on it. For the moment I stick to my S10 and wait for the next big hint.