Deduplicate mainboard code that has been ported to shared.