Settings in kodi doesn’t seem to have any effect on hardware keyboard layout, as stated by xavgra2, it must be set in debian shell… But on my side only the two first packets were necessary:
sudo apt-get install console-data
sudo apt-get install console-setup
to reconfigure afterwards:
sudo dpkg-reconfigure console-setup
According to this post it interferes with the splash screen and slows boot, so devs are reluctant to add it by default.