Not so much
by direct photolysis of water vapor (not generally a lot of that in the stratosphere), but from CH4, which could build up in a nearly oxygen - free atmosphere, and being largerly of biotic origin, with the H coming from
photosynthesis (releasing O);
O2 buildup itself was delayed because of geologic
O2 sinks (in particular, the conversion of ferrous Fe (naturally present in the crust and mantle and which can dissolve in the oceans) to ferric Fe (precipitates out of the water, the source of banded - iron formations, which humans have used to get Fe).
Photosynthesis: H2O + CO2 = (CH2O) n +
O2, so aside from oxidizing ferrous iron or..., moles of
O2 would increase
by the same amount that moles of organic C would increase.