So the men of Kiriath Jearim came and took up the ark1 of the LORD. They took it to Abinadab's2 house on the hill and consecrated Eleazar his son to guard the ark of the LORD.
References for 1 Samuel 7:1
It was a long time, twenty years in all, that the ark remained at Kiriath Jearim,3 and all the people of Israel mourned and sought after the LORD.4
References for 1 Samuel 7:2
And Samuel said to the whole house of Israel, "If you are returning5 to the LORD with all your hearts, then rid6 yourselves of the foreign gods and the Ashtoreths7 and commit8 yourselves to the LORD and serve him only,9 and he will deliver10 you out of the hand of the Philistines."
References for 1 Samuel 7:3
So the Israelites put away their Baals and Ashtoreths, and served the LORD only.