Conversation

Replying to and
this... requires enough effort that I might just live with partially broken charging. especially given that I still haven't fixed the problem with the USB3 pairs in the connector that makes `adb sideload` very hard to use
1
1
Replying to and
Based on that error message, I'm fairly certain that the battery driver or battery is the issue though. If you look at drivers/power/htc_battery.c, you can see it's involved in negotiating the charging rate. Since there's thermal throttling, etc. batteries are very involved.
2
2
Replying to and
We use the AOSP way of building it separately and including it in the AOSP build as a prebuilt. Qualcomm has always included a way to run the kernel build in-tree via a wrapper in each kernel source tree as a hack for development. LineageOS turned that into a generic system.
2
2
I don't like running a totally separate build system within the AOSP build system. It takes a ridiculous amount of time and memory to link the Linux kernel with full LTO and it doesn't use kati so it doesn't handle incremental builds well so I really prefer the AOSP approach.
1
4
Replying to and
Pixels build the kernels with Clang CFI which requires LTO. If you disable dynamic kernel modules, set -fvisibility=hidden as the default and avoid using ThinLTO, you get much better CFI granularity because it can see that nearly everything can't be indirectly called.
2
3
The main advantage we're getting from using full LTO is that most non-static functions never have their address taken and by using full LTO we end up enforcing that they can't be indirectly called via CFI. It also substantially reduces CFI overhead so more than usual benefits.
3