1 (edytowany przez kmaras77 2021-02-03 22:06:39)

Temat: Dodanie obsługi 16m flasha do Tp-link WDR4300

Aby sobie skompilować openWRT z obsługą 16MB flasha należy w źródłach dodać nowe urządzenie.


1 skopiować plik ar9344_tplink_tl-wdrxxxx.dtsi do ar9344_tplink_tl-wdrxxxx-16m.dtsi i zmienić:

partition@20000 {
                compatible = "tplink,firmware";
                label = "firmware";
                reg = <0x020000 0xfd0000>;
            };

            art: partition@ff0000 {
                label = "art";
                reg = <0xff0000 0x010000>;
                read-only;

2. Skopiowac plik ar9344_tplink_tl-wdr4300.dtsi do ar9344_tplink_tl-wdr4300-16m.dtsi i zmienić:

#include "ar9344_tplink_tl-wdrxxxx-16m.dtsi"

3. skopiować plik ar9344_tplink_tl-wdr4300-v1.dts do ar9344_tplink_tl-wdr4300-16m-v1.dts i zmienić:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "ar9344_tplink_tl-wdr4300-16m.dtsi"

/ {
    model = "TP-Link TL-WDR4300 v1 16m";
    compatible = "tplink,tl-wdr4300-v1", "qca,ar9344";
};


4. w pliku generic-tp-link.mk dodać:

define Device/tplink_tl-wdr4300-16m-v1
  $(Device/tplink-16mlzma)
  SOC := ar9344
  DEVICE_MODEL := TL-WDR4300
  DEVICE_VARIANT := 16m-v1
  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
  TPLINK_HWID := 0x43000001
  SUPPORTED_DEVICES += tl-wdr4300
endef
TARGET_DEVICES += tplink_tl-wdr4300-16m-v1


Wynik:
I wszystko działa.

[    0.353934] spi-nor spi0.0: w25q128 (16384 Kbytes)
[    0.358861] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.365315] Creating 3 MTD partitions on "spi0.0":
[    0.370198] 0x000000000000-0x000000020000 : "u-boot"
[    0.376222] 0x000000020000-0x000000ff0000 : "firmware"
[    0.384396] 2 tplink-fw partitions found on MTD device firmware
[    0.390471] Creating 2 MTD partitions on "firmware":
[    0.395532] 0x000000000000-0x0000001f497c : "kernel"
[    0.401525] 0x0000001f497c-0x000000fd0000 : "rootfs"
[    0.407474] mtd: device 3 (rootfs) set to be root filesystem
[    0.415186] 1 squashfs-split partitions found on MTD device rootfs
[    0.421519] 0x0000004a0000-0x000000fd0000 : "rootfs_data"
[    0.427961] 0x000000ff0000-0x000001000000 : "art"