Weathering, alteration and reconstructing Earth's oxygenation