基于VF2的openWRT烧写、配置和测试

一、固件烧写 rv社区img下载地址(适用visionfive2-v1.3b的openwrt固件---集成了10余种我日常使用的插件。 - 昉·星光 2(中文论坛) - rvspace forum)。
将img从weiyun上下载下来,利用u盘烧写工具,我比较喜欢和习惯rufus,将openwrt-visionfive2-generic-visionfive2-ext4-sdcard.img烧进tf卡,然后上电启动。
u-boot spl 2021.10 (feb 28 2023 - 21:44:53 +0800)ddr version: dc2e84f0.trying to boot from spiopensbi v1.2 ____ _____ ____ _____ / __ \ / ____| _ \_ _| | | | |_ __ ___ _ __ | (___ | |_) || | | | | | '_ \ / _ \ '_ \ \___ \| _ < | | | |__| | |_) | __/ | | |____) | |_) || |_ \____/| .__/ \___|_| |_|_____/|____/_____| | | |_|platform name : starfive visionfive v2platform features : medelegplatform hart count : 5platform ipi device : aclint-mswiplatform timer device : aclint-mtimer @ 4000000hzplatform console device : uart8250platform hsm device : jh7110-hsmplatform pmu device : ---platform reboot device : pm-resetplatform shutdown device : pm-resetfirmware base : 0x40000000firmware size : 292 kbruntime sbi version : 1.0domain0 name : rootdomain0 boot hart : 1domain0 harts : 0*,1*,2*,3*,4*domain0 region00 : 0x0000000002000000-0x000000000200ffff (i)domain0 region01 : 0x0000000040000000-0x000000004007ffff ()domain0 region02 : 0x0000000000000000-0xffffffffffffffff (r,w,x)domain0 next address : 0x0000000040200000domain0 next arg1 : 0x0000000042200000domain0 next mode : s-modedomain0 sysreset : yesboot hart id : 1boot hart domain : rootboot hart priv version : v1.11boot hart base isa : rv64imafdcbxboot hart isa extensions : noneboot hart pmp count : 8boot hart pmp granularity : 4096boot hart pmp address bits: 34boot hart mhpm count : 2boot hart mideleg : 0x0000000000000222boot hart medeleg : 0x000000000000b109u-boot 2021.10 (feb 28 2023 - 21:44:53 +0800), build: jenkins-vf2_515_branch_sdk_release-31cpu: rv64imacumodel: starfive visionfive v2dram: 4 gibmmc: sdio0@16010000: 0, sdio1@16020000: 1loading environment from spiflash... sf: detected gd25lq128 with page size 256 bytes, erase size 4 kib, total 16 mib*** warning - bad crc, using default environmentstarfive eeprom format v2 稍等片刻,进入openwrt。
看看系统信息:
root@openwrt:/# uname -alinux openwrt 6.1.35 #0 smp fri jun 30 12:46:49 2023 riscv64 gnu/linuxroot@openwrt:/# 二、网络配置 主要思路是先把vf2网络配通,其他小功能可以直接在openwrt的网页管理侧去配置。
vf2通过motorcomm(裕太微电子)的yt8531c提供千兆以太网连接能力。本次计划eth0连接wan口,eth1连接lan口,暂时不涉及wifi模块配置。具体配置如下,wan口连接家用路由器,通过dhcp获取ip,lan口配置成192.168.3.xx,跟wan网段区分。
具体通过vf2的串口,按照上述思路直接修改/etc/config/network文件成如下内容(其中wan6可以删除,没啥用途):
root@openwrt:/# cat /etc/config/networkconfig interface 'loopback' option device 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0'config globals 'globals' option ula_prefix 'fd1f:3d6d:77a0::/48'config interface 'wan' option device 'eth0' option proto 'dhcp'config interface 'wan6' option device 'eth0' option proto 'dhcpv6'config device option type 'bridge' option name 'br-lan' list ports 'eth1'config interface 'lan' option proto 'static' option device 'br-lan' option ipaddr '192.168.3.1' option netmask '255.255.255.0' 然后保存文件,并通过/etc/init.d/network restart重启系统网络服务。然后使用ping工具简单测试下网路是否通畅:
一切ok,pc先断wifi并双绞线连接至vf2的eth1继续测试,可以看到pc已经拿到lan内ip,192.168.3.204。
三、系统体验 pc浏览器中敲入http://192.168.3.1/登录openwrt管理系统。
(一)系统状态 先看看状态,一些基本信息:
(二)路由 当前的ipv4路由表,ipv6暂无内容,可以看出2个网段路由的规则:
(三)防火墙 主要是iptables和nftables的一些规则,没啥特殊需求暂时不设置。
(四)网络接口 网络接口的信息,bridge-lan(eth1)和wan(eth0)的统计信息。
(五)服务 这里应该是最好玩的地方,各种有意思的插件,具体没配置。
四、网络测试 测试是在pc端使用网页测速工具(测速网 - 专业测网速, 网速测试, 宽带提速, 游戏测速, 直播测速, 5g测速, 物联网监测 - speedtest.cn),简单测试结果如下。
再看看openwrt上的一些负载、流量和连接信息。
(一)负载 网络测试跑起来后,系统负载有明显的增加,但是对于千兆网卡来说,这都不是事。
(二)流量 主要看看bridge-lan的,反正在目前的网络架构中,其他地方的流量都缘于此,最后还是eth0和eth1的流量相加。
(三)连接 tcp/udp连接统计,突然想起了stevens的《unix network programming》……
五、下一步计划 在openwrt的软件包中加入目前支持较为完好的usb wifi adapter驱动,使其能运行起来。
最后来一张合影。


DARPA人工智能作战应用研究将提升美军“算法战”能力
为了不被踢出AI的队伍,视觉深度模型都开始接私活了?
详解DNN训练中出现的问题与解决方法方法
远程桌面控制之跨网远程控制的方法
新型Proteus-RF任意波形发生器/收发机介绍
基于VF2的openWRT烧写、配置和测试
AUTO CAD2008快捷键命令大全
相比起升级手机操作系统 联想比360强多了
!供应/回收 HP8594E HP8594E HP 8594
大疆遭遇“口袋”革命?无人机走向平民化、智能化
日东科技携“IC贴合机”和“半导体回流焊”亮相合肥【IC China 2022】
dvteclipse软件的正确使用方法推荐
摩尔线程与OpenMMLab战略合作:推动算法框架与GPU协同发展,共筑AI开发者繁荣生态
曲面玻璃3d扫描设备线轮廓测量面轮廓检测间隙面差分析
苹果收购micro LED屏幕_首款使用OLED屏幕的设备
如何让电子工程师保持电路知识不遗忘?
三星推10纳米中端处理器Exynos 9610强化视觉深度处理
中国电信与科大国盾成立了量子安全合资公司
三星最新消息:三星中国网站宣布4月1日关闭?
基于AVR技术的智能家居管理系统介绍