At first sight, the origins of Edoras seem straightforward to understand. Appendix A of The Lord of the Rings tells us that Eorl '...chose for his dwelling a green hill before the feet of the White Mountains that were the south-wall of his land.' It seems logical to assume that this describes the foundation of Edoras.
This is apparently contradicted, however, by a note in Unfinished Tales of Númenor and Middle-earth, which tells us that Eorl lived, not at Edoras, but at nearby Aldburg in the Folde. According to this version, it was Eorl's son Brego, not Eorl himself, who established the courts at Edoras. This version also gains support from the text of The Lord of the Rings, which contains an account of Brego's building of Meduseld, Edoras' great hall.
Resolving this conflict is awkward. One solution, though not an entirely happy one, is to assume that Eorl's 'green hill' was not in fact the site of Edoras, but the location where his house at Aldburg would be built, and that Edoras was founded by his son some decades later.