Photosynthesis is the process that converts solar energy into chemical energy. During the stage of light-dependent reactions involving photosystems I and II in photosynthesis, O2 produced.
The soil is formed by breaking down of large rock surfaces into pieces due to water, wind and all atmospheric changes by mixing with plants and animal decays. This process is called as weathering.