linux-postmarketos-allwinner: build kb151 as module? (Suggestion)
Currently pinephone keyboard is unable to be added after the phone has booted. Using it requires a full reboot. If it was a module, one could run modprobe -r kb151;modprobe kb151
and be able to use the keyboard without reboot. Mobian works like this currently. https://gitlab.com/mobian1/devices/sunxi64-linux/-/blob/mobian-5.15/debian/patches/defconfig/0223-pine64_defconfig-enable-Pine64-keyboard-case-and-re-.patch#L45
The change would be to change this line: https://gitlab.com/postmarketOS/pmaports/-/blob/master/device/main/linux-postmarketos-allwinner/config-postmarketos-allwinner.aarch64#L1999
to CONFIG_KEYBOARD_KB151=m
to make kb151 a module. I don't build kernels frequently so I'm not sure if this will work as intended or if there's a reason for it to be builtin.
What's the expected behaviour?
When pinephone keyboard is added after boot, modprobe -r kb151;modprobe kb151
should be able to reload the module and rediscover the keyboard.
What's the current behaviour?
kb151 is builtin, so it cannot be unloaded.
How to reproduce your issue?
Boot pinephone. Attach keyboard. Try to press keys and see it doesn't work. Try to unload/reload module - doesn't work because kb151 is builtin.
What device are you using?
pine64-pinephone
On what postmarketOS version did you encounter the issue?
-
edge ( master
branch) -
v21.12
On what environment did you encounter the issue?
Phone environments
-
Phosh -
Plasma Mobile -
Sxmo (Wayland/Sway)
Other
-
No environment -
GNOME -
KDE Plasma -
Kodi -
MATE -
Shelli -
Sway -
Weston -
Xfce4 -
fbkeyboard -
i3wm -
Sxmo (Xorg/Dwm)
How did you get postmarketOS image?
-
from https://images.postmarketos.org -
I built it using pmbootstrap -
It was preinstalled on my device