随笔分类 -  OpenWrt

openwrt,路由器,网络知识 学习笔记
摘要:# openwrt spi flash 分区适配过程这里基于 openwrt mt7620a 平台来跟踪,主要是想理清 dts 里的分区描述是如何一步步转化成内核分区行为。先来看看 dts 中关于分区的描述:``` palmbus@10000000 { spi@b00 { status = "... 阅读全文
posted @ 2015-05-26 15:04 sammei 阅读(9449) 评论(3) 推荐(1)
摘要:## Ubuntu 上搭建 pppoe server![](http://images0.cnblogs.com/blog2015/563391/201505/261153029749805.png)1. sudo apt-get install pppoe2. $ cat /etc/ppp/ppp... 阅读全文
posted @ 2015-05-20 20:15 sammei 阅读(4249) 评论(0) 推荐(0)
摘要:# 中继## etc config wireless```root@newifi:/# cat /etc/config/wireless config wifi-device 'ra0' option type 'ralink' option mode '9' ... 阅读全文
posted @ 2015-05-20 10:29 sammei 阅读(1340) 评论(0) 推荐(0)
摘要:http://www.network-science.de/ascii/rectangles 风格 阅读全文
posted @ 2015-05-05 01:24 sammei 阅读(1305) 评论(0) 推荐(0)
摘要:## mini newifi电脑端:```iperf3 -s```路由器:```root@OpenWrt:/# iperf3 -c 10.10.10.3 -t 20Connecting to host 10.10.10.3, port 5201[ 4] local 10.10.10.1 port ... 阅读全文
posted @ 2015-04-19 00:59 sammei 阅读(2841) 评论(0) 推荐(0)
摘要:# uboot 对 FAT 分区的解析改写 UBOOT 从 U 盘读入固件,然后刷机。发现有的 U 盘无法正确读到分区,跟踪了一下发现自己写的代码有漏洞,只尝试解析分区表里的第一个分区。跟踪的过程中重温了一下 MBR 的格式,这里记录一下 UBOOT 对其中分区表的解析。## MBR主引导记录(Ma... 阅读全文
posted @ 2015-01-30 02:37 sammei 阅读(2596) 评论(0) 推荐(0)
摘要:# DSL 如何工作http://computer.howstuffworks.com/dsl.htm当你连接到因特网时,你可能是通过一个调制解调器 (modem),或办公室的局域网,或者一个电缆调制解调器,或者数据用户线路(DSL)来建立连接。DSL 是一种非常高速的连接,而且与传统电话线使共用线... 阅读全文
posted @ 2015-01-29 01:26 sammei 阅读(766) 评论(0) 推荐(0)
摘要:接着前面写过的一篇关于 procd 的笔记. procd 在 STATE_INIT 时会运行 /etc/inittab 中描述的几个级别指定程序. ``` procd_inittab_run("respawn"); procd_inittab_run("askconsole"); procd_... 阅读全文
posted @ 2014-12-25 18:07 sammei 阅读(1523) 评论(0) 推荐(0)
摘要:http://wiki.openwrt.org/doc/howto/wireless.utilities这些工具依赖于驱动的实现. ## 基于 mac80211 的驱动### iwconfigiwconfig 是一个配置工具, 基于 WEXT api. 这套 api 非常陈旧, 即将被废弃.### ... 阅读全文
posted @ 2014-12-17 17:47 sammei 阅读(488) 评论(0) 推荐(0)
摘要:```void procd_inittab(void){#define LINE_LEN 128 FILE *fp = fopen(tab, "r"); struct init_action *a; regex_t pat_inittab; regmatch_t matches[5]; char *... 阅读全文
posted @ 2014-12-17 10:38 sammei 阅读(5719) 评论(1) 推荐(0)
摘要:``` Ralink RT2860 802.11n AP support [*] LED Support [*] WSC (W... 阅读全文
posted @ 2014-12-17 10:29 sammei 阅读(1788) 评论(0) 推荐(0)
摘要:``` [ 147.080000] svc: failed to register lockdv1 RPC service (errno 146).[ 147.090000] lockd_up: makesock failed, error=-146[ 147.090000] CPU 0 Un... 阅读全文
posted @ 2014-12-04 11:33 sammei 阅读(1155) 评论(0) 推荐(0)
摘要:OpenWrt 启动时会执行 rc.d/ 下的脚本. [这篇文章](http://wiki.openwrt.org/doc/techref/initscripts) 介绍了启动脚本里的规则. ```K50dropbear -> ../init.d/dropbearK85odhcpd -> ../in... 阅读全文
posted @ 2014-11-27 15:51 sammei 阅读(1378) 评论(0) 推荐(0)
摘要:## 由内核发出 event 事件. 1. kobject_uevent() 产生 uevent 事件(lib/kobject_uevent.c 中), 产生的 uevent 先由 netlink_broadcast_filtered() 发出, 最后调用 uevent_helper[] 所指定的程... 阅读全文
posted @ 2014-11-24 21:30 sammei 阅读(8894) 评论(0) 推荐(1)
摘要:默认编译 openwrt 时会先编译一套 toolchain. 这个步骤耗时较长. 使用外部 toolchain 可以多个 project 共用一套 toolchain , 而且也不重再编译它了. 省时省力. `make menuconfig````[*] Advanced configuratio... 阅读全文
posted @ 2014-11-14 12:11 sammei 阅读(5418) 评论(0) 推荐(0)
摘要:openwrt 烧写完成之后, 第一次启动会设置 network 的相关参数, 如 ip地址, mac地址, 等. 这里跟踪一下启动之后直到网络参数设置的过程. 0. /sbin/init procd "sysinit" /etc/rc.d/xxx 1. /etc/rc.d/S10boot /etc 阅读全文
posted @ 2014-11-12 12:06 sammei 阅读(8970) 评论(4) 推荐(0)
摘要:下文来自网络搜集,有些摘自[WiFi工作原理、测试及生产注意事项](http://wenku.baidu.com/view/4edeef3767ec102de2bd8980.html)## 术语* AP : Access Point, 接入点* AC : Access Controller 接入控制... 阅读全文
posted @ 2014-09-21 22:50 sammei 阅读(933) 评论(0) 推荐(0)
摘要:淘宝看到一款FIR300M路由器,当时只要19.9元。图便宜就买了。## HardwareArchitecture: MIPSVendor: MediaTek (Ralink)Bootloader: U-Boot 1.1.3System-On-Chip: Ralink MT7620N ver:2 e... 阅读全文
posted @ 2014-09-21 15:22 sammei 阅读(5220) 评论(2) 推荐(0)
摘要:## squashfs-sysupgrade.bin 生成过程图![openwrt-image-follow](http://images.cnitblog.com/blog/563391/201409/201856367842550.png)## 路径变量```$(KERNEL_BUILD_DIR... 阅读全文
posted @ 2014-09-20 19:12 sammei 阅读(6198) 评论(0) 推荐(0)
摘要:dts的概念是linux kernel中的,跟openwrt的关系不大。只是恰好在学习openwrt的时候碰到了这个东西,所以记录在openwrt名下。## patch-dtbopenwrt对arch/mips/kernel/head.S文件打了补丁,在其中加入了以下几行:``` .ascii "... 阅读全文
posted @ 2014-09-17 18:57 sammei 阅读(2399) 评论(0) 推荐(1)