Earthen floors typically have at least 3 layers: the drain layer, the base layer and the finish layer.
The drain layer is 2-4 (or more) inches of crushed, 3/4-1 1/2 inch drain rock. This layer acts as a moisture break, to stop rising damp.
The base layer is made of what is known as "road base", which is (typically) 3/4 inch minus, crushed rock, with sand, fines and a little clay. This layer should be between 1 1/2 and 2 inches thick. the material is put down a little wet (not soaking but damp) and rammed hard with a tamper or some such. It should be leveled, as you go and made as close to level and flat as you can make it with a reasonable amount of work.
The finish layer is made with mostly sand with a little bit of clay slip and a little bit of fiber like chopped
straw or horse manure. There should only be just
enough slip to make the mix damp and stick lightly together. This layer is about 1 inch thick. Use leveled screed boards when adding and packing the material in. The material should be compressed into place with a hard trowel, like a pool float. Press HARD and work till flat, level and smooth. Sometimes, this layer can be done in two thinner layers, the first can fill up uneven spaces below and the second can be added much easier for a smooth finish.
Each layer should be completely dry and free of loose stuff before doing the next.
After the finish layer is COMPLETELY dry, you can oil it with a number of different kinds of drying oil, I like linseed. Add the oil in successive layers, let it soak in and dry then add the next. When the floor won't soak up anymore oil, it's done. Mop off any excess oil, let it dry completely then wax and buff.