m8: fix dependencies and remove duplication from common

Change-Id: Ic17112baf1537c47ad434b81e27fdce7b52cbee8