[Concept] [PATCH 09/18] boot: Move type and OS checking into a new function