[BUILD] reverse 920d338ac1ef9d294a34249de33b02fafeed57e7 partially
[BUILD] moved platform to top and exit with warning if unknown platform is detected