mflash: factor init to 'mflash init'