We model the elasticity of the cerebral cortex as a layered material with bending energy along the layers and elastic energy between them in both planar and polar geometries. The cortex is also subjected to axons pulling from the underlying white matter. Above a critical threshold force, a flat cortex configuration becomes unstable and periodic unduluations emerge, i.e. a buckling instability occurs. These undulations may indeed initiate folds in the cortex. We identify analytically the critical force and the critical wavelength of the undulations. Both quantities are physiologically relevant values. Our model is a revised version of the axonal tension model for cortex folding, with our version taking into account the layered structure of the cortex. Moreover, our model draws a connection with another competing model for cortex folding, namely the differential growth-induced buckling model. For the polar geometry, we study the relationship between brain size and the critical force and wavelength to understand why small mice brains exhibit no folds, while larger human brains do, for example. Finally, an estimate of the bending rigidity constant for the cortex can be made based on the critical wavelength.