Add loki cwm/twrp support and device tree build support