Genesis 17:3-7 (JST)
3 And it came to pass, that Abram fell on his face, and called upon the name of the Lord.
4 And God talked with him, saying, My people have gone astray from my precepts, and have not kept mine ordinances, which I gave unto their fathers;
5 And they have not observed mine anointing, and the burial, or baptism wherewith I commanded them;
6 But have turned from the commandment, and taken unto themselves the washing of children, and the blood of sprinkling;
7 And have said that the blood of the righteous Abel was shed for sins; and have not known wherein they are accountable before me.
...
11 And I will establish a covenant of circumcision with thee, and it shall be my covenant between me and thee, and thy seed after thee, in their generations; that thou mayest know for ever that children are not accountable before me until they are eight years old.
12 And thou shalt observe to keep all my covenants wherein I covenanted with thy fathers; and thou shalt keep the commandments which I have given thee with mine own mouth, and I will be a God unto thee and thy seed after thee.
This passage would have been "translated" by March 7, 1831 (for JST chronology see here), a time period when infant baptism and its theological corollary original sin were central concerns for Joseph Smith (cf. Moroni 8:1-12, 14, 20, 22; D&C 20:71, 68:25-28; Moses 6:54). This JST passage was apparently formulated as a condemnation of infant baptism. It is probably also a midrash on Hebrews 12:24.
Hebrews 12:18-24 (KJV)
18 For ye are not come unto the mount that might be touched, and that burned with fire, nor unto blackness, and darkness, and tempest,
19 And the sound of a trumpet, and the voice of words; which voice they that heard intreated that the word should not be spoken to them any more:
20 (For they could not endure that which was commanded, And if so much as a beast touch the mountain, it shall be stoned, or thrust through with a dart:
21 And so terrible was the sight, that Moses said, I exceedingly fear and quake:)
22 But ye are come unto mount Sion, and unto the city of the living God, the heavenly Jerusalem, and to an innumerable company of angels,
23 To the general assembly and church of the firstborn, which are written in heaven, and to God the Judge of all, and to the spirits of just men made perfect,
24 And to Jesus the mediator of the new covenant, and to the blood of sprinkling, that speaketh better things than that of Abel.
This passage in Hebrews is contrasting the terrible old covenant (vv. 18-21) with the wonderful new covenant (vv. 22-24). The reference in v. 24, which to a casual reader might seem to contrast the sprinkling of Jesus' blood with the sprinkling of Abel's blood, may have seemed enigmatic to Joseph Smith. The actual referent of the verse is undoubtedly referring to Genesis 4:10:
Genesis 4:10-13 (KJV)
10 And he said, What hast thou done? the voice of thy brother’s blood crieth unto me from the ground.
11 And now art thou cursed from the earth, which hath opened her mouth to receive thy brother’s blood from thy hand;
12 When thou tillest the ground, it shall not henceforth yield unto thee her strength; a fugitive and a vagabond shalt thou be in the earth.
13 And Cain said unto the LORD, My punishment is greater than I can bear.
Here Cain's blood, which has been spilled by his brother Abel, "speaks" a curse. By contrast, Jesus' spilled blood "speaks" a blessing: it becomes for us the atoning "blood of sprinkling". (In the Old Testament, the blood of a sacrificial animal would be sprinkled for purposes of atonement and purification; cf. Lev. 5:9, 16:15).
The JST, however, interprets Hebrews 12:24 as a reference to some sort of ritual involving the sprinkling of Abel's blood. So Joseph Smith gives us JST-Genesis 17:3-7,11-2, which describes a heresy perpetrated by Abraham's "fathers" in which the blood of Abel apparently was thought to atone for sin, and in which infant baptism was practiced. This heresy also included a going astray from precepts, a turning from commandments, and a non-observance of ordinances (anointing and baptism are specifically mentioned). There is no mention of the worship of other gods, so I think we can conclude that when Joseph Smith penned this section he was unaware of Joshua 24:2.
Abraham 1:5 gives a description of Abraham's fathers' heresy that is in some ways similar to and in some ways different from what we find in Genesis 17.
Abraham 1:5-7,27
5 My fathers, having turned from their righteousness, and from the holy commandments which the Lord their God had given unto them, unto the worshiping of the gods of the heathen, utterly refused to hearken to my voice;
6 For their hearts were set to do evil, and were wholly turned to the god of Elkenah, and the god of Libnah, and the god of Mahmackrah, and the god of Korash, and the god of Pharaoh, king of Egypt;
7 Therefore they turned their hearts to the sacrifice of the heathen in offering up their children unto these dumb idols, and hearkened not unto my voice, but endeavored to take away my life by the hand of the priest of Elkenah. The priest of Elkenah was also the priest of Pharaoh.
...
27 Now, Pharaoh being of that lineage by which he could not have the right of Priesthood, notwithstanding the Pharaohs would fain claim it from Noah, through Ham, therefore my father was led away by their idolatry;
Here again there is a turning from righteounsness and from God's holy commandments. And, as in the JST, it is not a wholly pagan system that Terah has turned to. In fact, the reason he was led astray is that the pharaohs had a seemingly legitimate claim to the priesthood via Noah. But this description of the fathers' heresy differs from JST Gen 17 in that it includes idolatry and child sacrifice. Perhaps these additional elements were inspired by the facsimile 1 vignette, or perhaps they are derived from the Prophet's reading of Joshua 24:2 subsequent to his work on JST Genesis. It also differs in that there is no mention of Abel, infant baptism, or the "sprinkling of blood". Perhaps these had simply ceased to be concerns for Joseph Smith by 1835, or perhaps they would have cropped up later in the Book of Abraham had the Prophet gotten around to completing his work on the book.
In any case, I think it's probable that JST Genesis 17 and KJV Joshua 24:2 together form a common background for this locus in the Book of Abraham.
-CK