1. Environment Preparation
- Host: LPA3588
- Controller: BEITONG BTP-KP20 BFM
2. Ensure the Hardware Recognizes the Controller
Run the following command:
lsusb
If the BEITONG BTP-KP20 BFM is recognized as shown below, the hardware has detected the controller:
Bus 007 Device 007: ID 20bc:5128 BEITONG BTP-KP20 BFM
3. Check if the Joystick is Configured
Check Kernel Configuration
The kernel must support joystick devices. Use the following command to verify if it is enabled:
zcat /proc/config.gz | grep CONFIG_INPUT_JOYSTICK
If the output is CONFIG_INPUT_JOYSTICK=y
, it means joystick support is enabled.
Check Device Nodes
ls -al /dev/input/
If js0
appears in the output, the joystick device is recognized.
Configure Joystick if Kernel Support is Missing
- Download the LPA3588 SDK
- Modify Kernel Configuration
Navigate to the kernel directory and open the kernel configuration menu:
cd kernel
ARCH=arm64 make menuconfig
In the kernel configuration menu, go to:
Device Drivers
→ Input device support
→ Generic input layer
Enable the following options as built-in ([*]):
[*] Joystick interface
[*] Joysticks/Gamepads
Save the kernel configuration:
ARCH=arm64 make savedefconfig
This will generate a defconfig file in the SDK root directory:
cp defconfig arch/arm64/configs/rockchip_linux_defconfig
Compile the Kernel
Run the following commands inside the kernel directory:
cd ..
./build.sh kernel
The upgraded kernel image will be generated at SDK/kernel/boot.img
.
For convenience, here are the key modifications in the kernel configuration (diff output):
cd ..
diff --git a/kernel/arch/arm64/configs/rockchip_linux_defconfig b/kernel/arch/arm64/configs/rockchip_linux_defconfig
index 38e1e1994a..8da06ae6ce 100644
--- a/kernel/arch/arm64/configs/rockchip_linux_defconfig
+++ b/kernel/arch/arm64/configs/rockchip_linux_defconfig
@@ -247,14 +247,14 @@ CONFIG_PPP_ASYNC=y
-CONFIG_INPUT_FF_MEMLESS=y
+CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=y
CONFIG_MOUSE_CYAPA=y
CONFIG_MOUSE_ELAN_I2C=y
+CONFIG_INPUT_JOYSTICK=y
+CONFIG_JOYSTICK_ANALOG=y
+CONFIG_JOYSTICK_A3D=y
+CONFIG_JOYSTICK_ADC=y
+CONFIG_JOYSTICK_ADI=y
+CONFIG_JOYSTICK_COBRA=y
+CONFIG_JOYSTICK_GF2K=y
+CONFIG_JOYSTICK_GRIP=y
+CONFIG_JOYSTICK_GRIP_MP=y
+CONFIG_JOYSTICK_GUILLEMOT=y
+CONFIG_JOYSTICK_INTERACT=y
+CONFIG_JOYSTICK_SIDEWINDER=y
+CONFIG_JOYSTICK_TMDC=y
+CONFIG_JOYSTICK_IFORCE=y
+CONFIG_JOYSTICK_IFORCE_USB=y
+CONFIG_JOYSTICK_IFORCE_232=y
+CONFIG_JOYSTICK_WARRIOR=y
+CONFIG_JOYSTICK_MAGELLAN=y
+CONFIG_JOYSTICK_SPACEORB=y
+CONFIG_JOYSTICK_SPACEBALL=y
+CONFIG_JOYSTICK_STINGER=y
+CONFIG_JOYSTICK_TWIDJOY=y
+CONFIG_JOYSTICK_ZHENHUA=y
+CONFIG_JOYSTICK_AS5011=y
+CONFIG_JOYSTICK_JOYDUMP=y
+CONFIG_JOYSTICK_XPAD=y
+CONFIG_JOYSTICK_XPAD_FF=y
+CONFIG_JOYSTICK_XPAD_LEDS=y
+CONFIG_JOYSTICK_PSXPAD_SPI=y
+CONFIG_JOYSTICK_PSXPAD_SPI_FF=y
+CONFIG_JOYSTICK_PXRC=y
+CONFIG_JOYSTICK_FSIA6B=y
CONFIG_HID_KENSINGTON=y
CONFIG_HID_MULTITOUCH=y
+CONFIG_HID_SONY=y
+CONFIG_SONY_FF=y
+CONFIG_HID_SMARTJOYPLUS=y
+CONFIG_SMARTJOYPLUS_FF=y
+CONFIG_HID_SENSOR_HUB=y
+CONFIG_HID_SENSOR_CUSTOM_SENSOR=y
+CONFIG_HID_ALPS=y
+CONFIG_HID_MCP2221=y
+CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y
CONFIG_I2C_HID=y
+CONFIG_PRISM2_USB=y
+CONFIG_STAGING_BOARD=y
CONFIG_COMMON_CLK_RK808=y
Upgrade the Kernel
- Method 1: Local Upgrade (Using AndroidTool)
-
- Open AndroidTool and connect the device.
-
- Detect the loader device.
-
- Click on the Partition Table (if an error appears, confirm and continue).
-
- Select the boot partition, import boot.img, and execute the update.
-
- The device will reboot automatically.
-
- Method 2: Online Upgrade
Refer to LPA3588 Kernel Online Upgrade Method
4. Verify Controller Events
Install Joystick Utility
sudo apt update
sudo apt install joystick
Run Test Command
jstest /dev/input/js0
Result