Fix build

-Support prebuilt apps
-Fix kernel building
-Allow a device's own headers to take precedence over global ones