Set mg_flags, mg_name and add support for mgv7