17 He must acknowledge the son of his unloved wife as the firstborn by giving him a double share of all he has. That son is the first sign of his father's strength. The right of the firstborn belongs to him.

Matthew Henry's Commentary on Deuteronomy 21:17

Commentary on Deuteronomy 21:15-17

(Read Deuteronomy 21:15-17)

This law restrains men from disinheriting their eldest sons without just cause. The principle in this case as to children, is still binding to parents; they must give children their right without partiality.