linux串口设备的文件,如何在Linux中添加4个以上的串口设备?

如果您的系统使用驱动程序8250来处理串行端口,请检查内核配置文件中的CONFIG_SERIAL_8250_NR_UARTS参数.这定义了内核将处理的最大串行端口数.

从Kconfig到那个司机:

config SERIAL_8250_NR_UARTS

int "Maximum number of 8250/16550 serial ports"

depends on SERIAL_8250

default "4"

help

Set this to the number of serial ports you want the driver

to support. This includes any ports discovered via ACPI or

PCI enumeration and any ports that may be added at run-time

via hot-plug, or any ISA multi-port serial cards.

config SERIAL_8250_RUNTIME_UARTS

int "Number of 8250/16550 serial ports to register at runtime"

depends on SERIAL_8250

range 0 SERIAL_8250_NR_UARTS

default "4"

help

Set this to the maximum number of serial ports you want

the kernel to register at boot time. This can be overridden

with the module parameter "nr_uarts", or boot-time parameter

8250.nr_uarts

有可能,您的系统上CONFIG_SERIAL_8250_NR_UARTS的值仍为4.如果是这样,您可以在内核配置中设置更大的值并重建内核以使所有端口可用.

请注意,8250.nr_uarts内核运行时参数只能设置0到CONFIG_SERIAL_8250_NR_UARTS之间的端口数,因此仅在引导时设置它是不够的.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值