According to Engishiki (an ancient book on the codes and procedures on national rites and prayers), the Imperial Court used to adorn each gate of Daidairi (the Outer Palace Precincts) with dolls of colored soil in the shape of an ox and child on this setsubun day.
延喜式をひも解くと、宮中ではこの日、彩色した土で作成した牛と童子の人形を大内裏の各門に飾ったもの。