My device (Xiaomi Redmi Note 5, whyred) have official LineageOS support and therefore there is device tree and kernel. I want to build AOSP without any modifications or tweaks. How can I use (or port) this device tree and kernel for AOSP?
Links: Device Tree | Kernel (Xiaomi)
Its hard to build pure AOSP than other ROMs. While building a custom ROM a lot of components wont work. This is because the all the components used in the build are not open source. The vendor tree contains the proprietary part of your ROM which are compiled binaries (not the source code), these binaries requires tweaks in the frameworks to work properly (like loading shims). The AOSP doesn't have any of those tweaks. You can use other variants like AOSPX, AOSPA, etc (these are similar to LineageOS).