All pupils in P4 will be entitled to a school meal from August, while P5s will be offered lunches by January.