forked from public/airgap
1
0
Fork 0

implement keyboard layout selector in bootloader

This commit is contained in:
Lance Vick 2020-07-16 04:26:24 -07:00
parent 0a79141750
commit bee4c289ca
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
4 changed files with 57 additions and 3 deletions

View File

@ -0,0 +1,27 @@
set default="0"
set timeout="10"
menuentry "Buildroot (qwerty)" {
linux /boot/bzImage root=/dev/sr0 keymap=qwerty/us
initrd /boot/initrd
}
menuentry "Buildroot (dvorak)" {
linux /boot/bzImage root=/dev/sr0 keymap=dvorak
initrd /boot/initrd
}
menuentry "Buildroot (colemak)" {
linux /boot/bzImage root=/dev/sr0 keymap=colemak/en-latin9
initrd /boot/initrd
}
menuentry "Buildroot (qwertz)" {
linux /boot/bzImage root=/dev/sr0 keymap=qwertz/de
initrd /boot/initrd
}
menuentry "Buildroot (azerty)" {
linux /boot/bzImage root=/dev/sr0 keymap=azerty/fr
initrd /boot/initrd
}

View File

@ -2,5 +2,10 @@
set -u
set -e
set -x
echo "post-build.sh was run"
BOARD_DIR="$(dirname $0)"
cp -f ${BOARD_DIR}/grub.cfg ${TARGET_DIR}/boot/grub/grub.cfg
exit $?

View File

@ -1041,7 +1041,7 @@ BR2_PACKAGE_FLASHROM_ARCH_SUPPORTS=y
# BR2_PACKAGE_IPMIUTIL is not set
# BR2_PACKAGE_IRDA_UTILS is not set
# BR2_PACKAGE_IUCODE_TOOL is not set
# BR2_PACKAGE_KBD is not set
BR2_PACKAGE_KBD=y
# BR2_PACKAGE_LCDPROC is not set
# BR2_PACKAGE_LIBUBOOTENV is not set
# BR2_PACKAGE_LIBUIO is not set
@ -3329,7 +3329,7 @@ BR2_TARGET_ROOTFS_CPIO_NONE=y
# BR2_TARGET_ROOTFS_INITRAMFS is not set
BR2_TARGET_ROOTFS_ISO9660=y
BR2_TARGET_ROOTFS_ISO9660_GRUB2=y
BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="fs/iso9660/grub.cfg"
BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU="$(BR2_EXTERNAL_Airgap_PATH)/board/librem13v4/grub.cfg"
BR2_TARGET_ROOTFS_ISO9660_INITRD=y
# BR2_TARGET_ROOTFS_JFFS2 is not set
# BR2_TARGET_ROOTFS_ROMFS is not set

View File

@ -0,0 +1,22 @@
#!/bin/sh
case "${1}" in
start)
keymap="$( \
awk -F 'keymap=' '{sub(/ .*$/, "", $2); print $2}' /proc/cmdline \
)"
if [[ ! -z "$keymap" ]]; then
printf 'Loading Keymap %s: ' "${keymap}"
loadkeys "$keymap"
if [ $? -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
fi
;;
*)
echo "Usage: ${0} {start}"
exit 1
;;
esac