野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10600|回复: 4

[求助] 为什么ifconfig中不包含can设备?

[复制链接]
发表于 2021-3-18 12:29:16 | 显示全部楼层 |阅读模式
eth1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 6a:09:56:05:ce:76  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth2: flags=-28669<UP,BROADCAST,MULTICAST,DYNAMIC>  mtu 1500
        ether c2:f6:99:89:94:98  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2460  bytes 157650 (153.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2460  bytes 157650 (153.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480
        sit  txqueuelen 1000  (IPv6-in-IPv4)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

config文件中有:
CONFIG_CAN_FLEXCAN=y



回复

使用道具 举报

 楼主| 发表于 2021-3-18 12:32:05 | 显示全部楼层
这里也说明can驱动存在了
debian@npi:/proc$ grep -i flexcan kallsyms
00000000 t flexcan_read_be
00000000 t flexcan_write_be
00000000 t flexcan_mb_read_be
00000000 t flexcan_mb_write_be
00000000 t flexcan_read_le
00000000 t flexcan_write_le
00000000 t flexcan_mb_read_le
00000000 t flexcan_mb_write_le
00000000 t flexcan_chip_enable
00000000 t flexcan_chip_disable
00000000 t flexcan_noirq_suspend
00000000 t flexcan_runtime_resume
00000000 t flexcan_runtime_suspend
00000000 t flexcan_noirq_resume
00000000 t flexcan_chip_stop
00000000 t flexcan_chip_start
00000000 t flexcan_resume
00000000 t flexcan_suspend
00000000 t flexcan_remove
00000000 t flexcan_set_mode
00000000 t flexcan_start_xmit
00000000 t flexcan_mailbox_read
00000000 t flexcan_irq
00000000 t flexcan_get_berr_counter
00000000 t flexcan_close
00000000 t flexcan_probe
00000000 t flexcan_open
00000000 r flexcan_of_match
回复 支持 反对

使用道具 举报

发表于 2021-3-19 08:45:18 | 显示全部楼层
ifconfig -a
回复 支持 反对

使用道具 举报

 楼主| 发表于 2021-3-19 18:31:27 | 显示全部楼层
ifconfig -a也没有
debian@npi:~$ ifconfig -a
eth1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether a2:0f:73:cf:3a:17  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth2: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.8.101  netmask 255.255.255.0  broadcast 192.168.8.255
        inet6 fe80::cca9:42ff:fe8a:477d  prefixlen 64  scopeid 0x20<link>
        ether ce:a9:42:8a:47:7d  txqueuelen 1000  (Ethernet)
        RX packets 235  bytes 34942 (34.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 206  bytes 18649 (18.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 84  bytes 7004 (6.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 84  bytes 7004 (6.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480
        sit  txqueuelen 1000  (IPv6-in-IPv4)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


回复 支持 反对

使用道具 举报

发表于 2021-4-29 16:09:41 | 显示全部楼层
877509395@qq.co 发表于 2021-3-19 18:31
ifconfig -a也没有
debian@npi:~$ ifconfig -a
eth1: flags=4099  mtu 1500

设备树插件开了没
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-11-23 19:06 , Processed in 0.031083 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表