[PATCH v2 1/4] selftest: Add basic infrastructure to build test image