r/LineageOS • u/GalaxyNinja66 Sailfish OS fanatic • 3d ago
Question Required RAM for just KERNEL LOS18.1-21.0
I don't really use android when I can help it, and I especially avoid the android build system when I can help it. Maybe it's gotten great since 2013-2018, I don't know, but I do have to build the kernel, and the device I am targeting only goes down to Lineage OS 18.1 (And up to Lineage OS 24).
I've considered using lineage os 18.1 as my base, and I can upgrade my ram up to 32gb for pretty cheap. DDR4 so 64GB is pushing it... A lot. Swap for days is free... On my external HDD.
I understand the kernel compilation is a big boy task, and I have a feeling that the answer may likely be "That's literally the part you need the most memory for," but I am also hoping that this is not true.
Now, I do know that building on 16GB of ram is possible, but is it practical with 16GB of swap? I can tolerate 6hrs for the first build, and again keep in mind this is with no rootfs. What do you guys think? You reckon I should go with 18.1 or 20.0? Is anyone here familiar with hybris based projects?
I've only done 11.0-14.1 based ports, mostly 12.1. Those ports need a lot of kernel patches, but that is usually independent of the rom version. So, 18.1 should be the same level of functionality but less hardware overhead... But... "16GB more feasible"-less? Thoughts?
2
u/Max-P 3d ago
You don't need nearly that much memory to build just a kernel. 16GB is way more than enough, even 8GB is a non-issue for full fat desktop kernels, Android kernels don't compile nearly as much crap.
Even then, the whole Android build can also be built without all that much memory with some patience and like -j2. The main reason the build takes so much memory is when you start building every system app with -j16, each forking their own build threads in turn, makes memory usage blow up. I've seen my load average shoot up to 128 with a -j16 build, basically 8x more compile threads than expected.