DC,
  No, the tenets of religion are not solely derived from written texts. Religions also include traditions, institutional practices, common practices, and other personal beliefs that have carried on over time.  Religions also existed in lands where no form of writing existed. Are you suggesting that first nations peoples had no religion because they had no formal form of writing?  Your understanding of religion is too basic, leading you to very simplistic reasoning on the subject.