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