miredo: convert into a module

Change-Id: I5c0eac593a143b00e72a47d443cfe9d64c627af0