Placing memory constants at a fixed location

Modify boards.txt to reduce the available flash memory for the sketch, then place your serial number within the unusable area.

Another idea, put the code for the serial number in its own header and cpp file, the modify the hex file from that and rerun the linker before uploading.