1.开启 TFTPD64,设置本地IP为 192.168.33.X
2.在 https://breed.hackpascal.net/EOL/ 下载 uboot: breed-ar9341-pisen-wmp002n-r1163.bin
3.TTL连接设备,执行:
tftpboot 0x80060000 breed-ar9341-pisen-wmp002n-r1163.bin
erase 0x9f000000 +0x200000
cp.b 0x80060000 0x9f000000 0x200000
4.刷完uboot后重启,进入Breed备份Art,在固件更新菜单备份art.bin (art 是路由器的无线矫正参数,里面也包含mac等信息)
5.刷入新DIY固件
6.按复位键重新上电进入breed,刷回art,刷入art.bin,输入真实MAC地址
7.重启
SSH root@IP
opkg update
opkg install cfdisk
执行 cfdisk 新建分区
mkfs.ext4 /dev/sda3
mount /dev/sda3 /mnt/sda3
cp -r /overlay/* /mnt/sda3
cp -r /rom/overlay/* /mnt/sda3
ls /mnt/sda3
WEB 登录 OP,在 "系统" -- "挂载" 添加启用新分区作为外部overlay使用
reboot
OP 跨平台运行 docker 镜像时会报错
No binfmt support in the kernel.
Try: '/sbin/modprobe binfmt_misc' from the host
需要在编译时增加内核对 binfmt 的支持
$ make kernel_menuconfig
Executable file formats
Kernel support for MISC binaries
修改默认主题配置文件
/feeds/luci/modules/luci-base/root/etc/config/luci
config core main
option lang auto
option mediaurlbase /luci-static/rui
option resourcebase /luci-static/resources
打开并修改每个主题文件下面的30_luci-theme-*文件,类似下面一样,然后注释掉其中 set luci.main.mediaurlbase 一行,只保留那个想要默认的主题文件不注释。
一个是数据库连接丢失,由于PHP7 放弃了使用 mysql 方法连接数据库,改用 mysqli 或 pdo 方法,所以需要修改 config.inc.php
把
$db = new Typecho_Db('Mysql', 'typecho_');
修改为
$db = new Typecho_Db('Pdo_Mysql', 'typecho_');
另一个是 Typecho 升级1.2版后,每次提交文章时,数据库的 typecho_fields
表内会自动多增加 str 值,解决办法是修改 custom-fields.php,注释如下部分:
<td><?php // $label->render(); ?></td>
<td colspan="3"><?php // $input->render(); ?></td>