改分区表
$ nano target/linux/ath79/dts/ar9341_tplink_tl-wr841-v8.dts
&spi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
uboot: partition@0 {
label = "u-boot";
reg = <0x000000 0x020000>;
read-only;
};
partition@20000 {
compatible = "tplink,firmware";
label = "firmware";
reg = <0x020000 0xfd0000>;
};
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
};
};
};
};
改flash大小
$ nano target/linux/ath79/image/tiny-tp-link.mk
define Device/tplink_tl-wr841-v8
$(Device/tplink-16mlzma)
SOC := ar9341
DEVICE_MODEL := TL-WR841N/ND
DEVICE_VARIANT := v8
TPLINK_HWID := 0x08410008
SUPPORTED_DEVICES += tl-wr841n-v8
endef
TARGET_DEVICES += tplink_tl-wr841-v8
需要重新编译,可以使用openwrt-toolchain现成的工具链编译,会快一些
make menuconfig设置工具链如下:
Advanced configuration options (for developers) --->
Use external toolchain --->
│ │ (mips-openwrt-linux) Target name
│ │ (mips-openwrt-linux-musl-) Toolchain prefix
│ │ (/home/debian/openwrt-make/openwrt/openwrt-toolchain/toolchain-mips_24kc_gcc-12.3.0_musl) Toolchain root