目录
opkg list-installed | grep uhttpd 看看uhttpd是否被编译到开发板
find / -type d -name "www" -o -name "luci-static"
设置中文 uci set luci.main.lang="zh_cn"
1.openwrt 镜像源差?下载无速度?
传送门
sudo apt-get install libpam-dev liblzma-dev libsnmp-dev 安装环境依赖
./scripts/feeds update -a 更新软件包源码及其依赖
./scripts/feeds install -a 安装缺失的软件包及其依赖
sudo apt-get install aptitude
sudo aptitude install libssl-dev
sudo apt-get install python-yaml https://www.cnblogs.com/liujiaxin2018/p/16696065.html
2.安装git代码管理
安装git sudo apt-get install git
https://raw.githubusercontent.com/keyfour/openwrt/2722d51c5cf6a296b8ecf7ae09e46690403a6c3d/tools/m4/patches/011-fix-sigstksz.patch
git init
git config user.name xiaozhan
git config user.email xiaozhan@xiaozhan.club
sudo git add -A
sudo git commit -s -m "08-02-2023,create Uboot of IOT for xiaozhan"
git log
ssh localhost
sudo apt-get install openssh-server
netstat -nat | grep 22
都在监听了
没监听就关闭防火墙
sudo ufw disable
3.libnsl问题
找源头,解决依赖问题
结果
依赖关系问题:该软件包该软件包可能依赖其他软件包,而这些依赖关系无法满足。检查软件包的依赖关系,并确保所有所需的软件包都已正确安装。
vim /etc/config/system
不知道OpenWrt在哪:
uci show | grep OpenWrt
uci set system.@system[0].hostname='521OpenWrt'
uci show | grep OpenWrt
UCI(Unified Configuration Interface)
为了找到包含的OpenWrt文件
grep -rnw '/' -e 'OpenWrt'
改完后重启后 echo $HOSTNAME
sudo apt install figlet (用figlet工具生成空心字)
figlet -f big QIQIQSDK
桥接
ifconfig br-lan 192.168.188.122
生成根文件的基础目录
对luci界面进行修改
opkg list-installed | grep uhttpd 看看uhttpd是否被编译到开发板
openwrt的无线操作
find -name hostapd.conf
ifconfig wlan0 down
hostapd -B hostapd.conf
udhcpd -f udhcpd.conf
ifconfig wlan0 192.168.1.1
ifconfig wlan0 up
查看频点
iw list
扫描wifi
iw dev wlan0 scan | grep SSID:
查看国家码
iw reg get
设置国家码
iw reg set JM
查看连接状态
iw dev wlan0 link
断开WIFI连接 iw wlan0 disconnect
find / -type d -name "www" -o -name "luci-static"
修改网关
vim /etc/config/network
reboot
更改局域网IP
vim /etc/config/network
vim etc/opkg/distfeeds.conf 可以换源
然后 opkg update
安装中文语言包luci-i18n-base-zh-cn
设置中文 uci set luci.main.lang="zh_cn"
交叉编译工具链也表明是针对ARM Cortex-A7架构
password for root
模块化编译,查看是否编译进去
cat .config | grep qiqi
在不能保证模块能够正常编译的时候,用make V=99 不好,可以先模块化编译
make package/qiqi/{clean;prepare;compile;install} V=99
make package/qiqi/install V=99
编译成功的文件
烧好后,操作
cd /usr/bin
ls -la
./qiqi
wget https://security.appspot.com/downloads/vsftpd-2.3.5.tar.gz
echo 'src-link custom ~/code2/QC62/qsdk/package/vsftpd/vsftpd-2.3.5' >> feeds.conf
./scripts/feeds update custom
我的openwrt版本号
#src-link custom /usr/src/openwrt/custom-feed
然后对vsftpd进行模块化编译
make package/vsftpd/{clean,prepare,compile,install} V=99
压缩包版本不兼容,得解决
tar -czf archive.tar.gz docs/ file1.txt
还是不行,原始代码在之前打过补丁,引起连锁反应,受到影响
导致原因:ubuntu环境适合3.0.3,公司代码适合3.0.2,而导致2.3.5不能正常模块化编译
解决办法:找到当时是谁写的,问,补丁写的适合3.0.3吗
解决3.0.2
换源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
sudo vim /etc/apt/sources.list
sudo apt-get update
sudo apt-get install libnsl-dev
换的源为
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
依然不行
换源可能导致原先的软件库和软件环境的依赖问题
方法2
把-lsnl去掉
可不可以把vsftpd2.3.5和vsftpd3.0.2隔离开来,单独并行执行编译,并放在openwrt下的不同未知,使其互不干扰
按理说会显示,可是它不讲道理呀
手工编译
make package/vsftpd-2.3.5/compile
造成这个原因是因为是需要手动创建一个makefile,感觉走到了死胡同
考虑写个补丁文件
最后做的界面结果实例
完美解决
ps:
以后大概率是不会看的,但是既然记录了,不留下点东西,怪可惜的。