From Old Galician-Portuguese yrto, from Vulgar Latin *erctus, vernacular variant of Classical Latin ērēctus, therefore a doublet of ereto.
Despite the resemblance, unlikely to derive from Latin hirtus (“shaggy”). Compare Portuguese hirto, Spanish yerto.