[Concept] [PATCH 08/15] boot: Move preparing bootdev into a function