Aeth Josua a holl Israel gydag ef yn eu blaen o Lachis i Eglon, a gwersyllu yn ei herbyn ac ymosod arni.