2020-05-11
Raspberry PI 3B+刷OpenWRT坑点笔记Notes on Flashing OpenWRT on Raspberry PI 3B+
刷写系统环节
RPI3B和RPI3B+用的同一款固件,可以通用
用个稍微好一点点的读卡器吧,毕竟也有几百M
我Surface上的读卡器插两次就扫不到设备了,十分蛇皮
USB 读卡器又有点点接触不良,刷个几百k就一个读写错误,心累.jpg
如果希望能完全使用TF卡的空间,单纯的resize分区是不行的,还要记得
fsck然后跑一遍resize2fs不知道为什么我先配完系统之后改大小然后就崩了。
但是如果在第一次启动前把分区大小调好就没事。
WiFi的启用需要等到第一次启动以后,第一次启动的时候会生成配置文件,之后改改就好如果需要用
USB to TTL之类的操作连接PI,那么还要改config.txt,没改成功过,不细说
配置环节
- 信道填自动就搜不到
WiFi了不知道咋回事儿 wan的接口名一定要小写,一定要小写,一定要小写,或者手动修改为防火墙wan区域- 刚配好时
opkg镜像不能用https,只能走http,因为里面套件还不全
网络配置
多拨
- 使用
mwan3插件 - 前面接个AP模式的路由器
- 使用
ip link add link eth0 name vethX type macvlan来添加虚拟网口 - 其中留一个虚拟网口接
br-lan接口,其余每个一个PPPoE接口 - 设置
mwan3的时候一定要填测试IP,让相应的策略能自动开启
Flashing
RPI3B and RPI3B+ use the same firmware image, they are compatible.
Get a decent card reader — the image is a few hundred MB.
The built-in reader on my Surface stopped detecting the card after two inserts.
My USB reader has a loose connection — constant read/write errors every few hundred KB.
To use the full TF card space, resizing the partition alone is not enough. Run
fsckthenresize2fs.I resized after the first boot and it broke.
Resizing before first boot works fine.
WiFi is only enabled after the first boot, when the configuration files are generated. Edit them afterwards.
To connect via USB-to-TTL, you need to modify
config.txt. I never got it working — no details here.
Configuration
- Setting the channel to “auto” makes WiFi undetectable. Not sure why.
- Channels 52–64 in 802.11ac require DFS/TPC (Dynamic Frequency Selection and Transmit Power Control). The Pi probably lacks support for these.
- The WAN interface name must be lowercase, lowercase, lowercase — or manually assign it to the firewall
wanzone. - Right after flashing,
opkgmirrors only work overhttp, nothttps— the required packages are not yet installed.
Networking
Multi-WAN / Load Balancing
- Use the
mwan3package. - Connect an upstream router in AP mode.
- Create virtual interfaces with
ip link add link eth0 name vethX type macvlan. - Leave one virtual interface for
br-lan; assign one PPPoE session to each of the rest. - When configuring
mwan3, always set a test IP so the routing policies can activate automatically.