The thing is, "building a kernel" for Linux is NOTHING compared to a custom ROM. Linux Kernel:
- one repo, just clone it
- tooling to easily build it, just set some flags
- a huge monokernel, not including the entire OS and all the SOC stuff
Android is different. It doesnt use a huge monokernel. They use mostly the upstream kernel, but the drivers are not in there afaik. There are many proprietary parts also in the firmware. And those come from the hardware suppliers, signed by them, you cant replace it. This totally sucks.
If you look at it the Laptop market is equally bad as firmwares are often not updated at all. But every system simply continues to run, so nobody cares.
On Android its all one thing. A distro / custom OS (ROM is not correct, the OS is not read only otherwise you cant change it, lol) deals with all of that.
Look at the GrapheneOS information articles. They explain very well what they all do to make AOSP
- secure with monthly updates
- hardened in maaany areas
- functional (removing Vendor app dependency, integrating some Pixel and even Samsung components, Sandboxed Play services, ...)
Its a on of work to REALLY support a device, its simply a real OS. LineageOS or even worse PostmarketOS are just random projects often. Using some generic software with missing firmware updates and timely security patches.
It works, somehow. But it is nothing worth investing a lot of time in really, if the phone is not super special.
Just get a used Google Pixel ≥ 6a and install GrapheneOS. Contribute Code to healthy upstream projects.
The work for supporting a single device is insane. And samsung is especially shit, security features would be close to Pixels but they block lots of features for alternative OSses and different software everywhere. Also completely anti-repairable.