当前位置: 首页 > news >正文

qnx的网络知识记录

1、网络驱动加载

http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.core_networking/topic/drivers_Loading.html

使用mount挂载io-pkt模块

mount -Tio-pkt /lib/dll/devnp-e1000.so

nicinfo 命令可以查看网卡的各种状态,包括phy的状态

2、iopkt

iopkt的介绍,包括bpf

http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.sys_arch/topic/net_Manager.html

3、vdevpeer

http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.hypervisor.safety.user/topic/utils/devnp-vdevpeer-net.so.html

Guest-to-host

Configure a virtio-net vdev

The following excerpt shows the virtio-net vdev configuration in the *.qvmconf file for the VM hosting the guest.

For a QNX guest on an ARM board, configure a virtio-net vdev as follows:
system qnx71-arm-guest ... # The loc and intr gic options are for ARM only. The guest will see the # virtio-net vdev as a memory-mapped I/O device at the specified location. vdev virtio-net loc 0x1c0c0000 intr gic:40 mac aa:aa:aa:aa:aa:aa name p2p peer /dev/vdevpeers/vp0 peerfeats 0x3

http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.hypervisor.user/topic/network/guest2host.html

Description:

The devnp-vdevpeer-net.so driver enables an io-pkt-* networking manager running in the host to communicate with virtual network devices configured for guests. The driver works with both the io-pkt-v4-hc and io-pkt-v6-hc stack variants. It is used for peer-to-peer communication between the hypervisor host and guests, and can be used to facilitate communication between guests and the outside world, by enabling a bridge running in the host's networking manager to connect guests to the outside world.

To use the devnp-vdevpeer-net.so driver to set up peer-to-peer communication in a hypervisor system and with the outside world:

  1. In the hypervisor host, start io-pkt-*, specifying the devnp-vdevpeer-net.so driver, and using the driver options to configure the node in the hypervisor host: the connection path, the MAC address, the path to the node in the guest, and, optionally, a name for the node. For example:

io-pkt-v6-hc -d vdevpeer-net \

peer=/dev/qvm/vt1,bind=/pkt/vp0,mac=a0b0c0d0e0f0

where /dev/qvm/vt1 is the path of the peer to communicate with, /pkt/vp0 is the path to the peer node (the guest), and a0b0c0d0e0f0 is this peer node's MAC address.

  1. Configure the IP address of the peer node; for example:

ifconfig vp0 192.0.2.1

where vp0 is the peer node, and 192.0.2.1 is its IP address.

  1. In the qvm configuration file for the VM that will host the guest, configure the virtio-net vdev (see “vdev virtio-net” in the “Virtual Device Reference” chapter).

可以通过.qvmconfig配置文件配置vdevpeer:

http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.hypervisor.safety.user/topic/network/guest2host.html

http://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.hypervisor.user/topic/network/network.html

4、8155双系统中的qnx配置

QNX/qnx_ap/target/hypervisor/host/startup.qvmhost.tmpl

https://download.csdn.net/download/yudelian/87472378

这儿会根据Guest的类型挂载io-pkt,绑定不同的vdevpeer,我的车机系统只绑定了vp0

在这儿,qnx创建一个bridge0, 将vp0加入,并且将emac0加入,形成一个网桥二层网络

这儿还可以通过devc-quipv3设置 uart启动之类的

echo $(nsec)"mount -T io-pkt"
#if defined(__GUEST_TYPE_LA__) 
mount -T io-pkt -o peer=/dev/qvm/la/la_to_host,bind=/dev/vdevpeer/vp0,mac=aaaaaaaaaaaa,mode=0660 /lib/dll/devnp-vdevpeer-net.so#elif defined(__GUEST_TYPE_FDN__)
echo $(nsec)"mount -T io-pkt -o peer=/dev/qvm/la/la_to_host"
mount -T io-pkt -o peer=/dev/qvm/la/la_to_host,bind=/dev/vdevpeer/vp0,mac=aaaaaaaaaaaa /lib/dll/devnp-vdevpeer-net.so
mount -T io-pkt -o peer=/dev/qvm/lv/agl_to_host,bind=/dev/vdevpeer/vp1,mac=aaaaaaaaaaa1  /lib/dll/devnp-vdevpeer-net.so
mount -T io-pkt -o peer=/dev/qvm/qnx_1/qnx_to_host,bind=/dev/vdevpeer/vp2,mac=aaaaaaaaaaa2 /lib/dll/devnp-vdevpeer-net.so#else
echo $(nsec)"mount -T io-pkt -o peer=/dev/qvm/la/la_to_host"
mount -T io-pkt -o peer=/dev/qvm/la/la_to_host,bind=/dev/vdevpeer/vp0,mac=aaaaaaaaaaaa /lib/dll/devnp-vdevpeer-net.so
mount -T io-pkt -o peer=/dev/qvm/lv/agl_to_host,bind=/dev/vdevpeer/vp1,mac=aaaaaaaaaaa1  /lib/dll/devnp-vdevpeer-net.so
#endif#if defined(__GUEST_TYPE_LA__) 
if [ $SECPOL_ENABLE -eq 1 ];thenon -T ifconfig_t -u IFCONFIG_UID:IFCONFIG_GID ifconfig vp0 upon -T ifconfig_t -u IFCONFIG_UID:IFCONFIG_GID ifconfig bridge0 createbrconfig bridge0 add vp0 up
elseifconfig vp0 upifconfig bridge0 createbrconfig bridge0 add vp0 up
fiecho $(nsec)"brconfig bridge0 add emac0 up"
brconfig bridge0 add emac0 up
ifconfig emac0 172.20.0.34/24 up
route add default 172.20.0.40ifconfig vlan3 create
if_up -p vlan3
ifconfig vlan3 vlan 3 vlanif emac0
ifconfig vlan3 172.20.3.34/24 up

QNX/qnx_ap/ target/hypervisor/host/build_files/system.build.tmpl

这个文件应该可以配置uart、spi、中断号等

vdev vdev-virtio-net.so loc 0x1c0c0000 intr gic:41 peer /dev/vdevpeer/vp0 mac aa:bb:cc:dd:ee:23 name la_to_host//这儿感觉是通过qvm加载配置,暂时也不太清楚
//代码里没找到/vm/images/linux-la.config, 但是在qnx运行系统里有
[uid=0 gid=0 perms=555] bin/runla={
dtach -A /tmp/la_1 -r winch qvm @/vm/images/linux-la.config
http://www.lryc.cn/news/14694.html

相关文章:

  • 【Vue/基础知识】Vue基础知识(一)
  • Iceberg实战踩坑指南
  • 预告|2月25日 第四届OpenI/O 启智开发者大会昇腾人工智能应用专场邀您共启数字未来!
  • UnRaid虚拟机安装OpenWrt软路由
  • 开发日记-lombok
  • Web3中文|2023年zk赛道爆发,即将推出的Polygon zkEVM有多重要?
  • 【自然语言处理】主题建模:Top2Vec(理论篇)
  • 【ICLR 2022】重新思考点云中的网络设计和局部几何:一个简单的残差MLP框架
  • 《MySQL学习》 count(*) 原理
  • 时间序列数据预测的类型
  • sk_buff结构体成员变量说明
  • springbatch设置throttle-limit参数不生效
  • 用 tensorflow.js 做了一个动漫分类的功能(一)
  • 看完这篇Vue-element-admin,跟面试官聊骚没问题
  • 2022年全国职业院校技能大赛(中职组)网络安全竞赛试题A(5)
  • 基于Java+SpringBoot+Vue+Uniapp前后端分离商城系统设计与实现
  • 新建ES别名 添加别名 切换别名
  • MySQL —— 内外连接
  • EXCEL中文本和数字的相互转换方法
  • React源码分析6-hooks源码
  • Windows10神州网信政府版麦克风、摄像头的使用
  • 微机原理学习总结0:前言
  • LeetCode 1828. 统计一个圆中点的数目
  • Spring Boot + Vue3 前后端分离 实战 wiki 知识库系统<一>---Spring Boot项目搭建
  • leetcode 11~20 学习经历
  • LeetCode 双周赛 98,脑筋急转弯转不过来!
  • 函数的栈帧的创建和销毁
  • python filtermapreducezip
  • Centos7搭建hadoop3.3.4分布式集群
  • 骨传导耳机工作原理,骨传导耳机优缺点