
openwrt
重庆openwrt
重庆openwrt :721879794
展开
-
openwrt opkg install 强制替换安装
查询 opkg list-installed | grep XXXopkg install XXX.ipk --force-downgrade原创 2021-03-01 16:03:53 · 7130 阅读 · 1 评论 -
opkg list 报错
opkg listCollected errors:* opkg_conf_load: Could not lock /var/lock/opkg.lock: Resource temporarily unavail echo "nameserver 114.114.114.114">/tmp/resolv.conf rm -f /var/lock/opkg.lock opkg update原创 2021-02-22 16:37:19 · 2227 阅读 · 0 评论 -
mt7621 uboot编译报错
CHK include/config/uboot.release CHK include/generated/version_autogenerated.h UPD include/generated/version_autogenerated.h CHK include/generated/timestamp_autogenerated.h UPD include/generated/timestamp_autogenerated.h CHK ...原创 2020-11-25 17:37:58 · 973 阅读 · 0 评论 -
openwrt路由器接华为E3372(E8372)网卡实现4G转有线和WIFI
Hilink在openwrt系统中安装kmod-usb-net-rndis kmod-usb-net kmod-usb2 usb-modeswitch kmod-usb-net-cdc-ether。安装完成后,把E3372(E8372)插入路由器USB口,待4G指示灯亮起,打开openwrt路由器wan口(没有就添加它)设置界面,你会发现物理设置接口多了一项以太网适配器: "eth2" ,eth后面的数字是在已有接口基础上增加的。那么它就是4G设备接口,就选中它并保存应用。wan口协议设置成DHCP客原创 2020-10-12 13:32:00 · 5220 阅读 · 1 评论 -
openwrt wifi默认启动
/NXP/feiling/openwrt/package/kernel/mac80211/files/lib/wifi/mac80211.sh1改为 0原创 2020-09-16 17:21:09 · 1341 阅读 · 1 评论 -
OpenWrt OpenMPTCProuter feed
echo "src-git OpenMPTCProuter https://github.com/Ysurac/openmptcprouter-feeds.git" >> feeds.conf.default./scripts/feeds update -a./scripts/feeds install -amake menuconfig原创 2020-08-17 13:41:52 · 1984 阅读 · 2 评论 -
Openwrt添加内核patch
Openwrt添加内核patch在openwrt根目录执行以下指令 切换到内核路径下 增加新的patch 编辑要修改的文件 查看修改内容 生成新的patch 更新patch(切换到openwrt根目录) 重新编译固件 编译后patch会存在以下目录(openwrt根目录查看) 环境说明:ubuntu16.04openwrt 18.06(Linux-4.9.120)在openwrt根目录执行以下指令make target/linux/{clean,p.转载 2020-08-10 18:56:39 · 1129 阅读 · 0 评论 -
Openwrt 19.07.03 NXP LS1046A
编译固件完后,制作镜像 cd /home/forlinx/work/openwrt/staging_dir/target-aarch64_generic_musl rm root-layerscape/lib/preinit/80_mount_root sudo make_ext4fs -s -T -I -l 7489978368 OpenWRT.img root-layerscape 注意:make_ext4fs 工具可以通过 apt-get install android-tools原创 2020-08-10 18:49:52 · 947 阅读 · 0 评论 -
linux c 如何判断 字符数组是否为空
1、学符数组str[];if(strlen(str)==0)则该字符数组为空2、判断:if (strcmp(buf,"")==0)strcmp在"string.h"中,buf是你要判断的字符串原创 2020-08-10 14:43:29 · 1575 阅读 · 0 评论 -
linux c char * char[]相互转换
1、char[]转char*可以直接赋值。char pp[20] = "helloworld";char* p = pp;2、char*转char[]主要有两种方法可以将char*转换为char[]类型,分别是:strcpy()、循环遍历。其中,strcpy()可能会报安全性错误,自行解决即可。2.1 strcpy()方法char arr[20];char* tmp = "helloworld";strcpy(arr, tmp);2.2 循环遍历char arr[20];c原创 2020-07-28 14:05:30 · 1231 阅读 · 0 评论 -
openwrt MT7623 刷机
http://wiki.banana-pi.org/%E5%BF%AB%E9%80%9F%E4%B8%8A%E6%89%8B_%E9%A6%99%E8%95%89%E6%B4%BE_BPI-R2根据上面步骤 。插上sd卡win32diskmanager,直接写入。插卡 一直按住PWR。直到有打印原创 2020-07-19 15:35:25 · 1338 阅读 · 0 评论 -
openwrt wifi PSK设置
Network*hostapd········· Mhostapd-basic*hostapd-common······*hostapd-utils··············原创 2020-07-16 10:24:31 · 388 阅读 · 0 评论 -
openwrt 插拔重新获取IP
while true; do status=`swconfig dev switch0 port 4 get link | awk '{print $2}' | cut -d":" -f2` #这个是获取当前网线的拔插状态,UP就是插着网线,down就是拔出网线 if [ "$status" = "up" ]; then ech...原创 2020-09-08 17:44:43 · 1375 阅读 · 0 评论 -
openwrt 获取网口MAC地址
static int get_mac(char* mac,char* brifc){ struct ifreq tmp; int sock_mac; char mac_addr[32]={0}; sock_mac = socket(AF_INET, SOCK_STREAM, 0); if( sock_mac == -1) { perror("create socket fail\n"); return -1; }...原创 2020-07-13 18:08:22 · 2117 阅读 · 0 评论 -
openwrt linux 设置ip
#include<stdio.h>#include<stdlib.h>#include<string.h>#include<sys/ioctl.h>#include<sys/socket.h>#include<arpa/inet.h>#include<netinet/in.h>#include<net/if.h>#include "setip.h"//设置IP地址/** 函数名称 : i.原创 2020-07-13 18:07:20 · 656 阅读 · 0 评论 -
openwrt 动态分配有规律IP地址
vi /etc/config/dhcpconfig dhcp 'lan' option interface 'lan' option start '1' option limit '100' option leasetime '12h' option dhcpv6 'server' option ra 'server'原创 2020-07-07 18:33:42 · 2397 阅读 · 0 评论 -
linux c ioctl ifconfig
ioctl(sock,SIOCGIFHWADDR,&ifr)函数中 SIOCGIFHWADDR 用来获取网卡硬件地址(MAC地址)原创 2020-07-04 17:14:23 · 537 阅读 · 0 评论 -
openwrt 19.07 resolv.conf 域名解析
search lannameserver 114.114.114.114nameserver 127.0.0.1nameserver 表明DNS服务器的IP地址。domain 声明主机的域名。很多程序用到它,如邮件系统;search 它的多个参数指明域名查询顺序。sortlist 允许将得到域名结果进行特定的排序。它的参数为网络/掩码对,允许任意的排列顺序。...原创 2020-07-03 15:39:42 · 872 阅读 · 0 评论 -
openwrt linux c 修改系统时间
#include <stdio.h>#include<sys/time.h>#include<unistd.h>#include <time.h>typedef struct _SettimeInfo_{ char settime[32]; //输入要修改的系统时间 %d-%d-%d %d:%d:%d}SETTIMEINFO;int SetSystemTime(SETTIMEINFO * SetTime){ stru...原创 2020-06-28 13:47:51 · 909 阅读 · 0 评论 -
openwrt log
vim/etc/config/systemconfig system... option log_ip <destination IP> option log_port <destination port> option log_proto <tcp or udp>原创 2020-06-05 18:49:35 · 460 阅读 · 0 评论 -
openwrt 报错小记
1. uboot烧录固件之后一直jffs2:jffs2_scan_eraseblock():Magicbitmask大概率是刷的时候没刷完原创 2020-06-03 14:40:05 · 741 阅读 · 0 评论 -
openwrt 19.07 恢复出厂设置
设置GPIO后7 cat /etc/rc.button/reset 8 #!/bin/sh 9 . /lib/functions.sh 10 OVERLAY="$( grep ' /overlay ' /proc/mounts )" 11 case "$ACTION" in 12 pressed) 13 [ -z "$OVERLAY" ] && return 0 14 return 5 15 ;; 16 timeo...原创 2020-05-30 10:55:18 · 2748 阅读 · 0 评论 -
openwrt 19.07 ECMP 负载均衡
转载至:https://lwz322.github.io/2019/11/03/ECMP.html https://cumulusnetworks.com/blog/celebrating-ecmp-part-two/ https://cloud.tencent.com/developer/article/1449969 https://blog.csdn.net/wdscq1234/article/details/5264...原创 2020-05-28 11:47:42 · 1942 阅读 · 0 评论 -
OpenWRT 小记
查看openwrt内核版本:cat /proc/version原创 2020-05-21 18:39:02 · 579 阅读 · 1 评论 -
openwrt uci 交叉编译
修改CMakeLists.txtcmake_minimum_required(VERSION 2.6)PROJECT(uci C)SET(TOOLCHAIN_DIR "/home/dream/opt/openwrt-toolchain-ramips-mt7621_gcc-7.5.0_musl.Linux-x86_64/toolchain-mipsel_24kc_gcc-7.5...原创 2020-04-17 11:39:48 · 759 阅读 · 0 评论 -
openwrt 使用memcpy
使用memcpy一定要注意内存偏移发生错误memcpy(,buffer,sizeof(buffer));一定不要越界!!!!原创 2020-04-03 11:54:54 · 136 阅读 · 0 评论 -
linux 压缩和解压
1.zip命令例如:zip -r mysql.zip mysql该句命令的含义是:将mysql文件夹压缩成mysql.zipzip -r abcdef.zip abc def.txt这句命令的意思是将文件夹abc和文件def.txt压缩成一个压缩包abcdef.zip2.unzip命令与zip命令相反,这是解压命令,用起来很简单。 如:unzip mysql....原创 2020-01-03 14:43:38 · 1733 阅读 · 0 评论 -
OpenWRT 快速搭建编译环境
https://downloads.openwrt.org/配置宿主机的开发环境OpenWRT官方推荐使用Debian作为开发环境,但是基于Debian的Ubuntu似乎也没有太大问题,我这里是Ubuntu16.04(AMD64),执行以下命令sudo apt-get update解压openwrt_CC_mt76xx_zhuotk_source...原创 2018-01-13 16:47:45 · 1042 阅读 · 0 评论 -
OpenWrt network firewall 配置
此文件在编辑和保存之后需要执行/etc/init.d/firewall restart /etc/init.d/network restart //重启网络服务 netifd(网络接口守护进程) OpenWrt的网络配置文件是/etc/config/network,它负责交换芯片VLAN、网络接口和路由的配置。此文件在编辑和保存之后需...原创 2018-01-12 21:14:48 · 1449 阅读 · 0 评论 -
OpenWRT uci 命令设置网络
设置lan口 ip 访问路由的ipShell set network.lan.ipaddr=[lan ip]使用PPPOE访问协议uci set network.wan.proto=pppoe //设置wan口类型为pppoeuci set network.wan.username=[上网账号]uci set network.wan.passworld=[上网密码转载 2018-01-14 19:06:05 · 1905 阅读 · 0 评论 -
Ubuntu 无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用)
转载至:http://www.linuxidc.com/Linux/2016-05/131347.htm 在Ubuntu系统的termial下,用apt-get install 安装软件的时候,如果在未完成下载的情况下强制关闭terminal。此时 apt-get进程可能没有结束。结果,如果再次运行apt-get install 命令安装如今,可能会发生下面的问题。问题说明转载 2018-01-13 17:07:15 · 214 阅读 · 0 评论 -
openwrt ipk 安装 luci 界面
试试看可行不 慢慢更新opkg update 更新opkg list | grep svn原创 2018-01-15 11:51:30 · 4976 阅读 · 0 评论 -
Openwrt tftp刷机
第一次写论坛,今天早上才拿到路由器 开始学习openwrt 之前学过嵌入式Linux arm 移植, 开始正题:拿到开发板后,就开始烧写自己编译的.bin文件, 在烧写的过程中出现了问题 ,发现烧不进去 载入界面一直加载,烧写不进去,就断电,在百度上找资源。过程如下:安装TFTP软件 路径不要有中文,安装完成后, 打开软件。先设置ip。PC ip地址原创 2018-01-06 19:22:58 · 10687 阅读 · 0 评论 -
OpenWRT ubus
使用OpenWRT ubus的 examples 写一个 通信zigbee 的协议 在路由器直接通信zigbee控制电灯什么的.... ubus是新openwrt引入的一个消息总线,主要作用是实现不同应用程序之间的信息交互。 ubus启动后会在后台运行ubusd进程,该进程监听一个unix套接字用于与其他应用程序通信。其他应用程序可基于libubox提供的接口(或自己实现)与其...原创 2018-03-11 19:14:00 · 520 阅读 · 0 评论 -
undefined reference to 'pthread_create'
pthread 库不是 Linux 系统默认的库,连接时需要使用静态库 libpthread.a,所以在使用pthread_create()创建线程,以及调用 pthread_atfork()函数建立fork处理程序时,需要链接该库。源文件,不要忘了加上头文件#include<pthread.h>在编译中要加 -lpthread参数#gcc test.c -o thread -lpth...转载 2018-03-22 17:33:38 · 207 阅读 · 0 评论 -
OpenWRT php 安装
一、 安装PHPopkg updateopkg install php5 php5-mod-apc opkg install php5-mod-gd php5-mod-session opkg install php5-mod-pdo-mysql php5-mod-pdo php5-mod-mysql opkg install php5-mod-mcrypt php5-mod-mbstring...原创 2018-03-19 20:15:44 · 3044 阅读 · 1 评论 -
OpenWRT XLUCI2 web
已经实现xluci2 基于 js https://github.com/zhaojh329/xluci2转载 2018-04-09 21:59:19 · 1070 阅读 · 0 评论 -
OpenWRT MQTT
opkg updateopkg install mosquitto mosquitto-client libmosquitto基于MQTT框架 openwrt 下是 mosquito 可以直接下载 库里面有 直接安装因为MQTT是client端 就需要做一个server端 来收发数据 来下发 我是配合Android来做的 通过Android来下发数据通过路由...原创 2018-04-02 20:07:26 · 2619 阅读 · 0 评论 -
OpenWrt 自启动
/etc/rc.local 中添加开机启动代码原创 2018-04-05 17:15:02 · 1646 阅读 · 0 评论 -
openWRT u盘挂载
USB盘的文件系统通常是vfat 格式 ,我们首先安装 vfat 格式的相关软件包,然后将USB盘挂载到/src 目录下。原创 2018-11-21 17:25:43 · 1388 阅读 · 0 评论