[PATCH v2 21/21] bootm: Create a function to run through the booti states