When you compile the kernel, before you run make, run the command
Code:
loadkeys -m /path/to/your/keymap > drivers/char/defkeymap.c
For example, the command I run is
Code:
loadkeys -m /usr/share/kbd/keymaps/i386/qwerty/uk.map.gz > drivers/char/defkeymap.c