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 Galician irto, Spanish yerto.