CmST0us / tspi-linux-sdk-archived

【非立创官方版本】LCEDA Tai-Shang Pi Linux SDK.立创开发板泰山派Linux SDK.
52 stars 12 forks source link

可以在编译前添加驱动吗? #17

Closed huhaifan closed 1 month ago

huhaifan commented 1 month ago

ubuntu24.04编译的,可以正常编译和烧录。试图在泰山派上编译驱动,提示找不到内核的build文件夹。对linux编译不熟,是不是可以考虑在工程中直接集成这个驱动再编译?

huhaifan commented 1 month ago

解决啦,感谢 @CmST0us 制作的SDK。添加ch9344驱动步骤:

  1. 将ch9344.c和ch9344.h拷到kernel/drivers/usb/serial文件夹
  2. kernel/drivers/usb/serial/Kconfig中增加

    config USB_SERIAL_CH9344
        tristate "USB Winchiphead CH9344 Single Port Serial Driver"
        help
        Say Y here if you want to use a Winchiphead CH9344 single port
        USB to serial adapter.
    
        To compile this driver as a module, choose M here: the
        module will be called ch.
  3. kernel/drivers/usb/serial/Markfile中增加 obj-$(CONFIG_USB_SERIAL_CH9344) += ch9344.o
  4. kernel/arch/arm64/configs/rockchip_linux_defconfig中增加 CONFIG_USB_SERIAL_CH9344=y
CmST0us commented 1 month ago

赞!