Firefly开源社区

标题: 扫描千兆网口延时TX RX出错 [打印本页]

作者: 小山~only    时间: 2022-8-29 15:36
标题: 扫描千兆网口延时TX RX出错
开发板: ROC-RK3568-PC

系统为:buildroot linux
内核版本:4.19
问题:使用命令“echo 1000 > phy_lb_scan”时,无法获得 delayline 窗口,且会发生错误,插网线和不插网线效果一样。
请问该怎么解决这个问题?



tchip_askquestions

%22echo 1000 >phy_lb_scan%22log.txt.zip

1.79 KB, 下载次数: 2, 下载积分: 灯泡 -1 , 经验 -1


作者: Liuth    时间: 2022-8-29 15:50
你的SDK有更新到最新吗
作者: 小山~only    时间: 2022-8-29 15:56
Liuth 发表于 2022-8-29 15:50
你的SDK有更新到最新吗

之前下载有同步过一次,看log最新一次提交是20220310
commit 72491ed436765c35dddc56ce27b537a4d3703107 (HEAD -> firefly, tag: rk356x/linux_release_v1.2.3a, m/master)
Author: liulq <llq@t-chip.com.cn>
Date:   Thu Mar 10 17:29:09 2022 +0800

    dts: fix PCIE SSD md5sum error temporarily
作者: Liuth    时间: 2022-8-29 16:04
小山~only 发表于 2022-8-29 15:56
之前下载有同步过一次,看log最新一次提交是20220310
commit 72491ed436765c35dddc56ce27b537a4d3703107 ...

升级一下,现在有已经是1.3.0了
作者: 小山~only    时间: 2022-8-29 16:16
Liuth 发表于 2022-8-29 16:04
升级一下,现在有已经是1.3.0了

同步出现了以下错误:
Syncing work tree:  23% (12/52)Checking out project device/rockchip
error: device/rockchip/: contains uncommitted changes
error: Cannot checkout device/rockchip
Syncing work tree:  23% (12/52), done.  

error: Exited sync due to checkout errors

作者: Liuth    时间: 2022-8-29 16:19
小山~only 发表于 2022-8-29 16:16
同步出现了以下错误:
Syncing work tree:  23% (12/52)Checking out project device/rockchip
error:  ...

这个错误说明你在device/rockchip仓库有改动。。。
你去device/rockchip里看看改了什么,如果不是你改的,那可能你的sdk在解压过程就出现了错误
仓库里执行 git reset --hard HEAD,再同步

作者: 小山~only    时间: 2022-8-29 16:58
Liuth 发表于 2022-8-29 16:19
这个错误说明你在device/rockchip仓库有改动。。。
你去device/rockchip里看看改了什么,如果不是你改的 ...

buildroot的编译上对Python的版本有要求吗,出现了几个错误,其中一个如下:
2022-08-29T16:46:29 ImportError: cannot import name 'get_env_var' from 'mesonbuild.envconfig' (/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/mesonbuild/envconfig.py)

作者: Liuth    时间: 2022-8-29 17:03
小山~only 发表于 2022-8-29 16:58
buildroot的编译上对Python的版本有要求吗,出现了几个错误,其中一个如下:
2022-08-29T16:46:29 Impor ...


有,根据维基使用ubuntu18搭建环境
https://wiki.t-firefly.com/zh_CN ... i-huan-jing-da-jian


作者: 小山~only    时间: 2022-8-29 17:31
Liuth 发表于 2022-8-29 17:03
有,根据维基使用ubuntu18搭建环境
https://wiki.t-firefly.com/zh_CN/ROC-RK3568-PC/prepare_compile ...

因为之前编译鸿蒙更改过 python 的链接,使其链接到 python3.8,但是更改回 python2 后尝试编译还是出现错误,源于编译 buildroot 时的 host-libglib2 2.68.4 Configuring,其中 import get_env_var 出错,get_env_var 这个模块网上搜不到相关信息,log如下:
2022-08-29T17:13:16 >>> host-libglib2 2.68.4 Configuring
2022-08-29T17:13:16 rm -rf /home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/build/host-libglib2-2.68.4//build
2022-08-29T17:13:16 mkdir -p /home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/build/host-libglib2-2.68.4//build
2022-08-29T17:13:16 PATH="/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/bin:/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/sbin:/home/youchengzi/tools/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin:/home/youchengzi/.nvm/versions/node/v16.15.1/bin:/home/youchengzi/tools/openharmony/gcc_riscv32/bin:/home/youchengzi/.local/bin:/home/youchengzi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" PKG_CONFIG="/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/pkgconfig:/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/share/pkgconfig" AR="/usr/bin/ar" AS="/usr/bin/as" LD="/usr/bin/ld" NM="/usr/bin/nm" CC="/usr/bin/gcc" GCC="/usr/bin/gcc" CXX="/usr/bin/g++" CPP="/usr/bin/cpp" OBJCOPY="/usr/bin/objcopy" RANLIB="/usr/bin/ranlib" CPPFLAGS="-I/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/include" CFLAGS="-O2 -I/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/include" CXXFLAGS="-O2 -I/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/include" LDFLAGS="-L/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib -Wl,-rpath,/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib" INTLTOOL_PERL=/usr/bin/perl  PYTHONNOUSERSITE=y /home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/bin/meson --prefix=/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host --libdir=lib --sysconfdir=/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/etc --localstatedir=/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/var --default-library=shared --buildtype=release -Dstrip=true -Ddtrace=false -Dfam=false -Dglib_debug=disabled -Dlibelf=disabled -Dselinux=disabled -Dsystemtap=false -Dxattr=false -Dinternal_pcre=false -Dtests=false -Doss_fuzz=disabled /home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/build/host-libglib2-2.68.4/ /home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/build/host-libglib2-2.68.4//build
2022-08-29T17:13:16 Traceback (most recent call last):
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/bin/meson", line 11, in <module>
2022-08-29T17:13:16 load_entry_point('meson==0.60.3', 'console_scripts', 'meson')()
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
2022-08-29T17:13:16 return get_distribution(dist).load_entry_point(group, name)
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
2022-08-29T17:13:16 return ep.load()
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
2022-08-29T17:13:16 return self.resolve()
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
2022-08-29T17:13:16 module = __import__(self.module_name, fromlist=['__name__'], level=0)
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/mesonbuild/mesonmain.py", line 29, in <module>
2022-08-29T17:13:16 from . import mconf, mdist, minit, minstall, mintro, msetup, mtest, rewriter, msubprojects, munstable_coredata, mcompile, mdevenv
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/mesonbuild/mconf.py", line 22, in <module>
2022-08-29T17:13:16 from . import build
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/mesonbuild/build.py", line 27, in <module>
2022-08-29T17:13:16 from . import dependencies
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/mesonbuild/dependencies/__init__.py", line 15, in <module>
2022-08-29T17:13:16 from .boost import BoostDependency
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/mesonbuild/dependencies/boost.py", line 24, in <module>
2022-08-29T17:13:16 from .base import DependencyException, SystemDependency
2022-08-29T17:13:16 File "/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/mesonbuild/dependencies/base.py", line 34, in <module>
2022-08-29T17:13:16 from ..envconfig import get_env_var
2022-08-29T17:13:16 ImportError: cannot import name 'get_env_var' from 'mesonbuild.envconfig' (/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/host/lib/python3.8/site-packages/mesonbuild/envconfig.py)
2022-08-29T17:13:16 make[1]: *** [package/pkg-generic.mk:221: /home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/build/host-libglib2-2.68.4/.stamp_configured] Error 1
2022-08-29T17:13:16 make: *** [/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk3568/Makefile:16: _all] Error 2
Command exited with non-zero status 1
you take 0:04.22 to build builroot
ERROR: Running build_buildroot failed!
ERROR: exit code 1 from line 888:
作者: 小山~only    时间: 2022-8-30 08:57
Liuth 发表于 2022-8-29 17:03
有,根据维基使用ubuntu18搭建环境
https://wiki.t-firefly.com/zh_CN/ROC-RK3568-PC/prepare_compile ...

meson的找不到“get_env_var”的错误,通过下载对应版本的 mesonbuild 进行替换解决了,但是在编译 recovery 时,libdrm 2.4.109 Configuring 出错了,然而一点出错提示都没有,都不知道错哪了?
#
# configuration written to /home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot/output/rockchip_rk356x_recovery/.config
#
make: Leaving directory '/home/working/pro/ROC-RK3568-PC/Linux-SDK/rk356x_linux_release_20211019/buildroot'
====Start build rockchip_rk356x_recovery====
2022-08-30T08:46:29 >>> libdrm 2.4.109 Configuring
Done in 4s  (error code: 2)
Command exited with non-zero status 2
you take 0:04.98 to build recovery
ERROR: Running build_recovery failed!
ERROR: exit code 2 from line 1080:
作者: Liuth    时间: 2022-8-30 09:14
详细的报错信息在SDK根目录下的br.log里面应该有
这些都是环境问题,但你之前都编译过,怎么现在会出问题,想一想你改动了什么
或者尝试删除buildroot/output/rockchip_rk356x_recovery目录重编译
作者: 小山~only    时间: 2022-8-30 10:35
Liuth 发表于 2022-8-30 09:14
详细的报错信息在SDK根目录下的br.log里面应该有
这些都是环境问题,但你之前都编译过,怎么现在会出问题 ...

成功编译了固件:ROC-RK3568-PC-2CAM_Buildroot_v1.3.0a_220830.img
但是使用命令“echo 1000 > phy_lb_scan”时,还是无法获得 delayline 窗口
且 debug 串口灵敏性下降,现象如下:                                                   
[root@RK356X:/]# ls                                                            
sh: l: command not found                                                        
[root@RK356X:/]# ls                                                            
sh: s: command not found                                                        
[root@RK356X:/]# l                                                              
[root@RK356X:/]# ls                                                            
sh: slll: command not found                                                     
[root@RK356X:/]#
有官方的1.3.0a的固件吗,你们那边编译完测试有这种现象吗
作者: Firefly_Javier    时间: 2022-8-30 10:50
小山~only 发表于 2022-8-30 10:35
成功编译了固件:ROC-RK3568-PC-2CAM_Buildroot_v1.3.0a_220830.img
但是使用命令“echo 1000 > phy_lb_ ...
是否没有指定全路径,例如
echo 1000 > /sys/devices/platform/fe2a0000.ethernet/phy_lb_scan
作者: Liuth    时间: 2022-8-30 11:03
小山~only 发表于 2022-8-30 10:35
成功编译了固件:ROC-RK3568-PC-2CAM_Buildroot_v1.3.0a_220830.img
但是使用命令“echo 1000 > phy_lb_ ...

你的板子是不是4+32G配置的?
作者: 小山~only    时间: 2022-8-30 11:04
Firefly_Javier 发表于 2022-8-30 10:50
是否没有指定全路径,例如
echo 1000 > /sys/devices/platform/fe2a0000.ethernet/phy_lb_scan

我是到该文件目录下执行的
cd /sys/devices/platform/fe010000.ethernet/
echo 1000 > phy_lb_scan
指令执行没啥问题,执行完有消息打印,但是没有窗口,可以看我发帖时提交的 log 文件
那个串口不灵敏的问题是 1.3.0a 版本有的吗还是官方固件没有这个问题
作者: 小山~only    时间: 2022-8-30 11:07
Liuth 发表于 2022-8-30 11:03
你的板子是不是4+32G配置的?

是 8+64G 配置的
作者: Liuth    时间: 2022-8-30 11:23
小山~only 发表于 2022-8-30 11:07
是 8+64G 配置的

是有问题,你先烧录安卓的固件来测试吧,拿到结果后再换回linux
作者: 小山~only    时间: 2022-8-30 11:26
Liuth 发表于 2022-8-30 11:23
是有问题,你先烧录安卓的固件来测试吧,拿到结果后再换回linux

好的,静待佳音




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1