From ade5ef12865f839c5fbc789cdf2b8859574f6c02 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Tue, 5 Nov 2024 15:24:11 -0500 Subject: [PATCH 1/3] modules/linux: Inconditional: pack USB keyboard optional support to all boards (linux_modules-y for usbhid.ko) Signed-off-by: Thierry Laurion --- modules/linux | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/linux b/modules/linux index b0f6cab2..8bde1234 100644 --- a/modules/linux +++ b/modules/linux @@ -79,6 +79,8 @@ $(INSTALL)/include/linux/limits.h: $(build)/$(linux_base_dir)/.canary KCONFIG_CONFIG="$(pwd)/$(linux_kconfig)" \ headers_install +# Inconditional: add USB keyboard support to all boards (linux_modules-y) +linux_modules-y += drivers/hid/usbhid/usbhid.ko # qemu linux_modules-$(CONFIG_LINUX_E1000) += drivers/net/ethernet/intel/e1000/e1000.ko @@ -122,9 +124,6 @@ linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/xhci-hcd.ko linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/host/xhci-pci.ko linux_modules-$(CONFIG_LINUX_USB) += drivers/usb/storage/usb-storage.ko -#USB modules when a USB keyboard is defined in board config -linux_modules-$(CONFIG_SUPPORT_USB_KEYBOARD) += drivers/hid/usbhid/usbhid.ko - #USB modules for Mobile USB Tethering (Most Android phones, Librem phone, etc) linux_modules-$(CONFIG_MOBILE_TETHERING) += drivers/net/mii.ko linux_modules-$(CONFIG_MOBILE_TETHERING) += drivers/net/usb/usbnet.ko From 6e0edcbce6f94e42e6b490f539bcdb5b67cb28d0 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Tue, 5 Nov 2024 15:26:26 -0500 Subject: [PATCH 2/3] initrd/bin/config-gui.sh: remove check for CONFIG_SUPPORT_USB_KEYBOARD since usbhid.ko packed for all boards. Menu now permits turning on keyboard from internal, non-usb keyboard or force support through CONFIG_USB_KEYBOARD_REQUIRED=y under board configs Signed-off-by: Thierry Laurion --- initrd/bin/config-gui.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/initrd/bin/config-gui.sh b/initrd/bin/config-gui.sh index 7f8142e6..2580dc26 100755 --- a/initrd/bin/config-gui.sh +++ b/initrd/bin/config-gui.sh @@ -71,12 +71,10 @@ while true; do ) # Boards with built-in keyboards can support optional USB keyboards as well. - # Export CONFIG_SUPPORT_USB_KEYBOARD=y to enable optional support. - # Boards that do not have a built-in keyboard export + # Boards that do not have a built-in keyboard/internal keyboard is USB connected export # CONFIG_USB_KEYBOARD_REQUIRED=y; this hides the config option and ensures # USB keyboard support always loads. - [ "$CONFIG_SUPPORT_USB_KEYBOARD" = y ] && [ "$CONFIG_USB_KEYBOARD_REQUIRED" != y ] \ - && dynamic_config_options+=( + [ "$CONFIG_USB_KEYBOARD_REQUIRED" != y ] && dynamic_config_options+=( 'K' " $(get_config_display_action "$CONFIG_USER_USB_KEYBOARD") USB keyboard" ) From b36ed46c11933d03695addf6ec8c5907b4e5fed8 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Tue, 5 Nov 2024 15:27:40 -0500 Subject: [PATCH 3/3] boards/librems: remove CONFIG_SUPPORT_USB_KEYBOARD which is now offered by default if kernel config enable it as compiled as module Signed-off-by: Thierry Laurion --- boards/librem_13v2/librem_13v2.config | 1 - boards/librem_13v4/librem_13v4.config | 1 - boards/librem_14/librem_14.config | 1 - boards/librem_15v3/librem_15v3.config | 1 - boards/librem_15v4/librem_15v4.config | 1 - 5 files changed, 5 deletions(-) diff --git a/boards/librem_13v2/librem_13v2.config b/boards/librem_13v2/librem_13v2.config index 5accb0bc..c52f16ab 100644 --- a/boards/librem_13v2/librem_13v2.config +++ b/boards/librem_13v2/librem_13v2.config @@ -27,7 +27,6 @@ CONFIG_HOTPKEY=y CONFIG_LINUX_USB=y CONFIG_MOBILE_TETHERING=y -export CONFIG_SUPPORT_USB_KEYBOARD=y export CONFIG_TPM=y export CONFIG_BOOTSCRIPT=/bin/gui-init diff --git a/boards/librem_13v4/librem_13v4.config b/boards/librem_13v4/librem_13v4.config index 0abeb61d..fcc51515 100644 --- a/boards/librem_13v4/librem_13v4.config +++ b/boards/librem_13v4/librem_13v4.config @@ -27,7 +27,6 @@ CONFIG_HOTPKEY=y CONFIG_LINUX_USB=y CONFIG_MOBILE_TETHERING=y -export CONFIG_SUPPORT_USB_KEYBOARD=y export CONFIG_TPM=y export CONFIG_BOOTSCRIPT=/bin/gui-init diff --git a/boards/librem_14/librem_14.config b/boards/librem_14/librem_14.config index 5c8b3d8e..6ac128a5 100644 --- a/boards/librem_14/librem_14.config +++ b/boards/librem_14/librem_14.config @@ -27,7 +27,6 @@ CONFIG_LINUX_USB=y CONFIG_MOBILE_TETHERING=y export CONFIG_TPM=y -export CONFIG_SUPPORT_USB_KEYBOARD=y export CONFIG_BOOTSCRIPT=/bin/gui-init export CONFIG_BOOT_REQ_HASH=n diff --git a/boards/librem_15v3/librem_15v3.config b/boards/librem_15v3/librem_15v3.config index cf541ef0..f21c3d67 100644 --- a/boards/librem_15v3/librem_15v3.config +++ b/boards/librem_15v3/librem_15v3.config @@ -27,7 +27,6 @@ CONFIG_HOTPKEY=y CONFIG_LINUX_USB=y CONFIG_MOBILE_TETHERING=y -export CONFIG_SUPPORT_USB_KEYBOARD=y export CONFIG_TPM=y export CONFIG_BOOTSCRIPT=/bin/gui-init diff --git a/boards/librem_15v4/librem_15v4.config b/boards/librem_15v4/librem_15v4.config index 9deaea27..8b9ec201 100644 --- a/boards/librem_15v4/librem_15v4.config +++ b/boards/librem_15v4/librem_15v4.config @@ -28,7 +28,6 @@ CONFIG_HOTPKEY=y CONFIG_LINUX_USB=y CONFIG_MOBILE_TETHERING=y -export CONFIG_SUPPORT_USB_KEYBOARD=y export CONFIG_TPM=y export CONFIG_BOOTSCRIPT=/bin/gui-init