Hi thinkx2,
Warpage in packages usually happen in substrate based packages (BGA, LGA) due to thermal stress, when the thermal expansion parameter is different between the substrate material, silicon and PCB that the package is mounted on.
In order to avoid that, you need to take the thermal expansion parameters into account during the substrate and package design.