Genesis 5 is a genealogy. There is something approaching a genealogy in chapter 4, but that list empties out into burgeoning civilisation. But genealogies will become a particular literary form within this story-telling tradition. They trace the continuity of the chosen ones in the midst of the wider humanity, drawing-out the set-apart from the set-aside.
The almost-a-genealogy of chapter 4 gives us the set-aside. The genealogy of chapter 5 traces the set-apart, from Adam to Noah.
Along the line, we hear of Enoch, who does not die but is taken away by God, we are not told where. An earthling who does not return to the dust. The pattern revealed to Adam and repeated since Abel is not, apparently, inevitable; God can at least interrupt it, disrupt it.
And towards the end of the list, we hear of the birth of a son whose father names him ‘rest’. He considers the child to be rooted in the earth from which human beings were liberated, and that this rootedness will somehow bring about relief from their toil.