• Recent
    • Docs
    • Github
    • 百度网盘
    • Onedrive
    • Official
    • Shop
    • Register
    • Login

    请教kernel内核编译,修改哪里后再编译可以打开手柄驱动(joystick)

    Scheduled Pinned Locked Moved Ubuntu
    11 Posts 5 Posters 725 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      AugustRobot_Zou
      last edited by

      7b8eb59b-7e7a-42f6-8171-0c449078be44-图片.png

      如上图,coolpi插入手柄后,ls /dev/input ,多出两个文件:by-id,event0,说明usb手柄设备被识别。
      但是我希望是能得到 /dev/input/js0,这样在coolpi上就能使用手柄。下图是我在个人pc上插入手柄,能得到js0。
      5834298b-5df8-4cd6-aa51-f60880d7b939-图片.png

      G 顾 2 Replies Last reply Reply Quote 0
      • G
        george @AugustRobot_Zou
        last edited by

        @AugustRobot_Zou 如下图:
        697401cf-a822-43de-b97c-372e6dfce057-image.png

        A 1 Reply Last reply Reply Quote 0
        • 顾
          顾真牛 @AugustRobot_Zou
          last edited by

          @AugustRobot_Zou 一个小技巧 在内核修改界面按 “/” 搜索

          1 Reply Last reply Reply Quote 0
          • A
            AugustRobot_Zou @george
            last edited by

            @george @顾真牛
            谢谢!请问内核修改界面是否有对应config文件可以直接修改?
            因为我的系统是Ubuntu server,需要装上desktop,内核修改界面改好了再删除desktop这么麻烦吗?

            大法师大 1 Reply Last reply Reply Quote 0
            • 大法师大
              大法师 @AugustRobot_Zou
              last edited by 大法师

              @AugustRobot_Zou
              coolpi 4b 更新内核,默认是配置集成了。

              4b_config.png

              md5sum arch/arm64/configs/rk3588s_cp4b_defconfig 
              6d838d09667b9f1fc41cc2812bf46d08  arch/arm64/configs/rk3588s_cp4b_defconfig
              
              CONFIG_INPUT_JOYDEV=y
              CONFIG_INPUT_EVDEV=y
              CONFIG_KEYBOARD_ADC=y
              # CONFIG_KEYBOARD_ATKBD is not set
              CONFIG_KEYBOARD_GPIO=y
              CONFIG_KEYBOARD_GPIO_POLLED=y
              # CONFIG_MOUSE_PS2 is not set
              CONFIG_MOUSE_CYAPA=y
              CONFIG_MOUSE_ELAN_I2C=y
              CONFIG_INPUT_JOYSTICK=y
              CONFIG_INPUT_TOUCHSCREEN=y
              

              jack@cool-pi.com

              A 1 Reply Last reply Reply Quote 0
              • A
                AugustRobot_Zou @大法师
                last edited by

                @大法师 感谢!完美解决我的问题!
                fb4671cc-f10c-4c31-9ad4-a39df90734fc-图片.png
                已找到/dev/input/js0

                更新内核方法在下面,方便其他新手朋友操作
                https://www.cool-pi.com/topic/131/coolpi-4b-linux-kernel开发在线更新说明

                大法师大 1 Reply Last reply Reply Quote 1
                • 大法师大
                  大法师 @AugustRobot_Zou
                  last edited by 大法师

                  @AugustRobot_Zou 测试使用的手柄帮忙上个图或链接

                  jack@cool-pi.com

                  A 2 Replies Last reply Reply Quote 0
                  • A
                    AugustRobot_Zou @大法师
                    last edited by

                    @大法师 好的
                    d26c1748-39f3-406b-882f-86ef9680bd87-图片.png

                    莱仕达蓝牙手柄,PXN-9603

                    1 Reply Last reply Reply Quote 0
                    • A
                      AugustRobot_Zou @大法师
                      last edited by

                      @大法师 更新情况!
                      4646c523-e724-4308-b486-c7e922a8f74a-图片.png

                      还是使用不了,会出现 Couldn't open Joystick /dev/input/js0的报错。

                      经过google后解决:
                      https://forums.developer.nvidia.com/t/couldnt-open-joystick-dev-input-js0-solved/65192

                      帖子说需要多编译一个CONFIG_JOYSTICK_XPAD=y
                      9f0ecb4e-7a21-4bb0-bc6c-c24118c83340-图片.png

                      于是我搜索后,发现rockchip_defconfig里面有三行
                      ONFIG_JOYSTICK_XPAD=y
                      CONFIG_JOYSTICK_XPAD_FF=y
                      CONFIG_JOYSTICK_XPAD_LEDS=y
                      8264cd2b-827e-4955-8623-e1ddd545528c-图片.png
                      我也不管,全部复制进rk3588s_cp4b_defconfig,重新编译后,更新内核可以成功。

                      d82797ea-88e5-4946-83f4-e22646fd6fee-图片.png

                      大法师大 G 2 Replies Last reply Reply Quote 1
                      • 大法师大
                        大法师 @AugustRobot_Zou
                        last edited by

                        @AugustRobot_Zou nice!

                        jack@cool-pi.com

                        1 Reply Last reply Reply Quote 0
                        • G
                          george @AugustRobot_Zou
                          last edited by

                          @AugustRobot_Zou 👍 👍

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post