move flash-first-phase-initialisation to separate function