See the Malbim's commentary on Torah on the mitzva of yibum. He distinguishes between a yibum-like custom that pre-dated matan Torah (Yehuda and Tamar), the mitzva of yibum after matan Torah, and hakamat shem be'nahala (Rut and Boaz). Kol tuv, Simi Peters