Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于给A45编译后遇到的问题 #5

Open
1551633 opened this issue Dec 8, 2023 · 2 comments
Open

关于给A45编译后遇到的问题 #5

1551633 opened this issue Dec 8, 2023 · 2 comments

Comments

@1551633
Copy link

1551633 commented Dec 8, 2023

我所参考的教程(倒不如说是照葫芦画瓢):https://www.zouht.com/3550.html
在4.2步骤尝试运行安装脚本时,使用python .\llusbdac_installer.py时会跳出这样的traceback:
File "C:\Users\admin\llusbdac\llusbdac_installer.py", line 58, in
safeloader_ko = load_ko(os.path.join(safeloader_dir, "safeloader.ko"))
File "C:\Users\admin\llusbdac\llusbdac_installer.py", line 52, in load_ko
with open(filepath, "rb") as f:
FileNotFoundError: 【Errno 2】 No such file or directory: 'safeloader\safeloader.ko'
也就是找不到这些文件(没权限调不出来?)然后就不了了之了

而直接双击打开llusbdac_installer.py时,在同目录里存在NW-ZX300_V2_02.exe时才能在walkman里产生安装脚本

本萌新想请教的是
1.python打开文件的时候使用的相对路径是以什么为参照的
2.上述产生的安装脚本是否可用于A45

@1551633
Copy link
Author

1551633 commented Dec 8, 2023

其实我成功安装了这玩意,我在这里附一下我遇到的问题和解决办法
1.话说我在clone github 仓库的时候没法访问,ssh公钥给了,代理挂了,能调用的文件都调了,还是不能抓取插件源码,硬生生卡在了网络上(connection refused),不知道为什么...不行,累了...
我windows挂代理(watt toolkit)是能在浏览器连到那个网址的,ubantu的ping也能ping到,就是不能访问仓库...肯定不是被github墙了,是不是因为仓库有什么权限?

sol:现在下载下来了,在clone的时候不能挂代理,否则会dns污染,参考https://zhuanlan.zhihu.com/p/521340971

2.make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- olddefconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- prepare
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- scripts
我输完第二个就没继续了,弹出几个ERROR
HOSTCC scripts/basic/fixdep
/bin/sh: 1: gcc: not found
make【1】: *** 【scripts/Makefile.host:118: scripts/basic/fixdep】 Error 127
make: *** 【Makefile:421: scripts_basic】 Error 2
HOSTCC scripts/basic/fixdep
/bin/sh: 1: gcc: not found
make【2】: *** 【scripts/Makefile.host:118: scripts/basic/fixdep】 Error 127
make【1】: *** 【/home/relian/llusbdac/kernel/Makefile:421: scripts_basic】 Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.

sol:好吧解决了...
https://blog.csdn.net/m0_75155538/article/details/134428017
仅下载了build-essential

3.卡在上传脚本这一步了...话说启动llusbdac_installer.py就会跳出窗口嘛,我这边cmd说找不到safeloader\safeloader.ko,然后就因为file not found error进行不下去了,traceback如下
File "C:\Users\admin\llusbdac\llusbdac_installer.py", line 58, in
safeloader_ko = load_ko(os.path.join(safeloader_dir, "safeloader.ko"))
File "C:\Users\admin\llusbdac\llusbdac_installer.py", line 52, in load_ko
with open(filepath, "rb") as f:
FileNotFoundError: 【Errno 2】 No such file or directory: 'safeloader\safeloader.ko'

sol:见问题描述,我的cmd认不出文件夹,还得是直接双击...

@zhangboyang
Copy link
Owner

1.python打开文件的时候使用的相对路径是以什么为参照的

应该就是运行命令的目录吧,除非你的python被魔改过,实在不行你试试看os.getcwd()返回什么。

2.上述产生的安装脚本是否可用于A45

这个我只能说我自己没法确定,因为我没有A45。。。llusbdac_installer.py运行的时候动态生成的安装脚本(LLUSBDAC.DAT)和校验码(LLUSBDAC.SUM)大概率是能通用的。但是llusbdac_installer.py对官方固件包NW_WM_FW.UPG的修改是写死了的,因此不是通用的,你需要按照注释里的方法用upgtool这个软件去修改固件包才行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants