On the generation of spatially growing waves in a boundary layer