2 +++ b/configs/mt7986_tplink_tl-xdr4288_defconfig
5 +CONFIG_POSITION_INDEPENDENT=y
6 +CONFIG_ARCH_MEDIATEK=y
7 +CONFIG_TARGET_MT7986=y
8 +CONFIG_TEXT_BASE=0x41e00000
9 +CONFIG_SYS_MALLOC_F_LEN=0x4000
10 +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
11 +CONFIG_NR_DRAM_BANKS=1
12 +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-tplink-tl-xdr608x"
13 +CONFIG_DEFAULT_ENV_FILE="tplink_tl-xdr4288_env"
14 +CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-tplink-tl-xdr608x.dtb"
15 +CONFIG_OF_LIBFDT_OVERLAY=y
16 +CONFIG_DEBUG_UART_BASE=0x11002000
17 +CONFIG_DEBUG_UART_CLOCK=40000000
19 +CONFIG_SYS_LOAD_ADDR=0x46000000
20 +CONFIG_SMBIOS_PRODUCT_NAME=""
21 +CONFIG_AUTOBOOT_KEYED=y
23 +CONFIG_AUTOBOOT_MENU_SHOW=y
24 +CONFIG_CFB_CONSOLE_ANSI=y
25 +CONFIG_BOARD_LATE_INIT=y
29 +CONFIG_CMD_ENV_FLAGS=y
31 +CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
37 +CONFIG_SYS_PROMPT="MT7986> "
38 +CONFIG_CMD_BOOTMENU=y
48 +CONFIG_CMD_ENV_READMEM=y
49 +CONFIG_CMD_ERASEENV=y
53 +CONFIG_CMD_FS_GENERIC=y
61 +CONFIG_CMD_LINK_LOCAL=y
62 +# CONFIG_CMD_MBR is not set
65 +CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
71 +CONFIG_CMD_TFTPBOOT=y
74 +CONFIG_CMD_UBI_RENAME=y
86 +CONFIG_DISPLAY_CPUINFO=y
88 +CONFIG_DM_REGULATOR=y
89 +CONFIG_DM_REGULATOR_FIXED=y
90 +CONFIG_DM_REGULATOR_GPIO=y
95 +CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
96 +CONFIG_SYS_RELOC_GD_ENV_ADDR=y
97 +CONFIG_VERSION_VARIABLE=y
98 +CONFIG_PARTITION_UUIDS=y
111 +CONFIG_PHY_MTK_TPHY=y
115 +CONFIG_MEDIATEK_ETH=y
117 +# CONFIG_MMC is not set
118 +# CONFIG_DM_MMC is not set
120 +CONFIG_MTD_UBI_FASTMAP=y
122 +CONFIG_PCIE_MEDIATEK=y
125 +CONFIG_PINCTRL_MT7622=y
126 +CONFIG_POWER_DOMAIN=y
127 +CONFIG_PRE_CONSOLE_BUFFER=y
128 +CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
129 +CONFIG_MTK_POWER_DOMAIN=y
135 +CONFIG_MTK_SPI_NAND=y
136 +CONFIG_MTK_SPI_NAND_MTD=y
137 +CONFIG_SYSRESET_WATCHDOG=y
142 +CONFIG_RANDOM_UUID=y
146 +CONFIG_USB_XHCI_HCD=y
147 +CONFIG_USB_XHCI_MTK=y
148 +CONFIG_USB_STORAGE=y
150 +CONFIG_ENV_OVERWRITE=y
151 +CONFIG_ENV_IS_IN_UBI=y
152 +CONFIG_ENV_UBI_PART="ubi"
153 +CONFIG_ENV_SIZE=0x1f000
154 +CONFIG_ENV_SIZE_REDUND=0x1f000
155 +CONFIG_ENV_UBI_VOLUME="ubootenv"
156 +CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
157 +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
158 +CONFIG_NET_RANDOM_ETHADDR=y
164 +CONFIG_MEDIATEK_ETH=y
167 +CONFIG_PINCTRL_MT7986=y
168 +CONFIG_POWER_DOMAIN=y
169 +CONFIG_MTK_POWER_DOMAIN=y
170 +CONFIG_DM_REGULATOR=y
171 +CONFIG_DM_REGULATOR_FIXED=y
175 +CONFIG_USE_DEFAULT_ENV_FILE=y
176 +CONFIG_MTD_SPI_NAND=y
180 +CONFIG_CMD_NAND_TRIMFFS=y
181 +CONFIG_LMB_MAX_REGIONS=64
183 +CONFIG_IPADDR="192.168.1.1"
184 +CONFIG_USE_SERVERIP=y
185 +CONFIG_SERVERIP="192.168.1.254"
187 +++ b/configs/mt7986_tplink_tl-xdr6086_defconfig
190 +CONFIG_POSITION_INDEPENDENT=y
191 +CONFIG_ARCH_MEDIATEK=y
192 +CONFIG_TARGET_MT7986=y
193 +CONFIG_TEXT_BASE=0x41e00000
194 +CONFIG_SYS_MALLOC_F_LEN=0x4000
195 +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
196 +CONFIG_NR_DRAM_BANKS=1
197 +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-tplink-tl-xdr608x"
198 +CONFIG_DEFAULT_ENV_FILE="tplink_tl-xdr6086_env"
199 +CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-tplink-tl-xdr608x.dtb"
200 +CONFIG_OF_LIBFDT_OVERLAY=y
201 +CONFIG_DEBUG_UART_BASE=0x11002000
202 +CONFIG_DEBUG_UART_CLOCK=40000000
204 +CONFIG_SYS_LOAD_ADDR=0x46000000
205 +CONFIG_SMBIOS_PRODUCT_NAME=""
206 +CONFIG_AUTOBOOT_KEYED=y
208 +CONFIG_AUTOBOOT_MENU_SHOW=y
209 +CONFIG_CFB_CONSOLE_ANSI=y
210 +CONFIG_BOARD_LATE_INIT=y
212 +CONFIG_BUTTON_GPIO=y
214 +CONFIG_CMD_ENV_FLAGS=y
216 +CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
222 +CONFIG_SYS_PROMPT="MT7986> "
223 +CONFIG_CMD_BOOTMENU=y
233 +CONFIG_CMD_ENV_READMEM=y
234 +CONFIG_CMD_ERASEENV=y
238 +CONFIG_CMD_FS_GENERIC=y
239 +CONFIG_CMD_FS_UUID=y
245 +CONFIG_CMD_LICENSE=y
246 +CONFIG_CMD_LINK_LOCAL=y
247 +# CONFIG_CMD_MBR is not set
250 +CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
251 +CONFIG_CMD_SF_TEST=y
256 +CONFIG_CMD_TFTPBOOT=y
257 +CONFIG_CMD_TFTPSRV=y
259 +CONFIG_CMD_UBI_RENAME=y
264 +CONFIG_CMD_SETEXPR=y
268 +CONFIG_CMD_STRINGS=y
271 +CONFIG_DISPLAY_CPUINFO=y
273 +CONFIG_DM_REGULATOR=y
274 +CONFIG_DM_REGULATOR_FIXED=y
275 +CONFIG_DM_REGULATOR_GPIO=y
279 +CONFIG_HUSH_PARSER=y
280 +CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
281 +CONFIG_SYS_RELOC_GD_ENV_ADDR=y
282 +CONFIG_VERSION_VARIABLE=y
283 +CONFIG_PARTITION_UUIDS=y
296 +CONFIG_PHY_MTK_TPHY=y
300 +CONFIG_MEDIATEK_ETH=y
302 +# CONFIG_MMC is not set
303 +# CONFIG_DM_MMC is not set
305 +CONFIG_MTD_UBI_FASTMAP=y
307 +CONFIG_PCIE_MEDIATEK=y
310 +CONFIG_PINCTRL_MT7622=y
311 +CONFIG_POWER_DOMAIN=y
312 +CONFIG_PRE_CONSOLE_BUFFER=y
313 +CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
314 +CONFIG_MTK_POWER_DOMAIN=y
320 +CONFIG_MTK_SPI_NAND=y
321 +CONFIG_MTK_SPI_NAND_MTD=y
322 +CONFIG_SYSRESET_WATCHDOG=y
327 +CONFIG_RANDOM_UUID=y
331 +CONFIG_USB_XHCI_HCD=y
332 +CONFIG_USB_XHCI_MTK=y
333 +CONFIG_USB_STORAGE=y
335 +CONFIG_ENV_OVERWRITE=y
336 +CONFIG_ENV_IS_IN_UBI=y
337 +CONFIG_ENV_UBI_PART="ubi"
338 +CONFIG_ENV_SIZE=0x1f000
339 +CONFIG_ENV_SIZE_REDUND=0x1f000
340 +CONFIG_ENV_UBI_VOLUME="ubootenv"
341 +CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
342 +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
343 +CONFIG_NET_RANDOM_ETHADDR=y
349 +CONFIG_MEDIATEK_ETH=y
352 +CONFIG_PINCTRL_MT7986=y
353 +CONFIG_POWER_DOMAIN=y
354 +CONFIG_MTK_POWER_DOMAIN=y
355 +CONFIG_DM_REGULATOR=y
356 +CONFIG_DM_REGULATOR_FIXED=y
360 +CONFIG_USE_DEFAULT_ENV_FILE=y
361 +CONFIG_MTD_SPI_NAND=y
365 +CONFIG_CMD_NAND_TRIMFFS=y
366 +CONFIG_LMB_MAX_REGIONS=64
368 +CONFIG_IPADDR="192.168.1.1"
369 +CONFIG_USE_SERVERIP=y
370 +CONFIG_SERVERIP="192.168.1.254"
372 +++ b/configs/mt7986_tplink_tl-xdr6088_defconfig
375 +CONFIG_POSITION_INDEPENDENT=y
376 +CONFIG_ARCH_MEDIATEK=y
377 +CONFIG_TARGET_MT7986=y
378 +CONFIG_TEXT_BASE=0x41e00000
379 +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
380 +CONFIG_SYS_MALLOC_F_LEN=0x4000
381 +CONFIG_NR_DRAM_BANKS=1
382 +CONFIG_DEFAULT_DEVICE_TREE="mt7986a-tplink-tl-xdr608x"
383 +CONFIG_DEFAULT_ENV_FILE="tplink_tl-xdr6088_env"
384 +CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-tplink-tl-xdr608x.dtb"
385 +CONFIG_OF_LIBFDT_OVERLAY=y
386 +CONFIG_DEBUG_UART_BASE=0x11002000
387 +CONFIG_DEBUG_UART_CLOCK=40000000
389 +CONFIG_SYS_LOAD_ADDR=0x46000000
390 +CONFIG_SMBIOS_PRODUCT_NAME=""
391 +CONFIG_AUTOBOOT_KEYED=y
393 +CONFIG_AUTOBOOT_MENU_SHOW=y
394 +CONFIG_CFB_CONSOLE_ANSI=y
395 +CONFIG_BOARD_LATE_INIT=y
397 +CONFIG_BUTTON_GPIO=y
399 +CONFIG_CMD_ENV_FLAGS=y
401 +CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
407 +CONFIG_SYS_PROMPT="MT7986> "
408 +CONFIG_CMD_BOOTMENU=y
418 +CONFIG_CMD_ENV_READMEM=y
419 +CONFIG_CMD_ERASEENV=y
423 +CONFIG_CMD_FS_GENERIC=y
424 +CONFIG_CMD_FS_UUID=y
430 +CONFIG_CMD_LICENSE=y
431 +CONFIG_CMD_LINK_LOCAL=y
432 +# CONFIG_CMD_MBR is not set
435 +CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
436 +CONFIG_CMD_SF_TEST=y
441 +CONFIG_CMD_TFTPBOOT=y
442 +CONFIG_CMD_TFTPSRV=y
444 +CONFIG_CMD_UBI_RENAME=y
449 +CONFIG_CMD_SETEXPR=y
453 +CONFIG_CMD_STRINGS=y
456 +CONFIG_DISPLAY_CPUINFO=y
458 +CONFIG_DM_REGULATOR=y
459 +CONFIG_DM_REGULATOR_FIXED=y
460 +CONFIG_DM_REGULATOR_GPIO=y
464 +CONFIG_HUSH_PARSER=y
465 +CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
466 +CONFIG_SYS_RELOC_GD_ENV_ADDR=y
467 +CONFIG_VERSION_VARIABLE=y
468 +CONFIG_PARTITION_UUIDS=y
481 +CONFIG_PHY_MTK_TPHY=y
485 +CONFIG_MEDIATEK_ETH=y
487 +# CONFIG_MMC is not set
488 +# CONFIG_DM_MMC is not set
490 +CONFIG_MTD_UBI_FASTMAP=y
492 +CONFIG_PCIE_MEDIATEK=y
495 +CONFIG_PINCTRL_MT7622=y
496 +CONFIG_POWER_DOMAIN=y
497 +CONFIG_PRE_CONSOLE_BUFFER=y
498 +CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
499 +CONFIG_MTK_POWER_DOMAIN=y
505 +CONFIG_MTK_SPI_NAND=y
506 +CONFIG_MTK_SPI_NAND_MTD=y
507 +CONFIG_SYSRESET_WATCHDOG=y
512 +CONFIG_RANDOM_UUID=y
516 +CONFIG_USB_XHCI_HCD=y
517 +CONFIG_USB_XHCI_MTK=y
518 +CONFIG_USB_STORAGE=y
520 +CONFIG_ENV_OVERWRITE=y
521 +CONFIG_ENV_IS_IN_UBI=y
522 +CONFIG_ENV_UBI_PART="ubi"
523 +CONFIG_ENV_SIZE=0x1f000
524 +CONFIG_ENV_SIZE_REDUND=0x1f000
525 +CONFIG_ENV_UBI_VOLUME="ubootenv"
526 +CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
527 +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
528 +CONFIG_NET_RANDOM_ETHADDR=y
534 +CONFIG_MEDIATEK_ETH=y
537 +CONFIG_PINCTRL_MT7986=y
538 +CONFIG_POWER_DOMAIN=y
539 +CONFIG_MTK_POWER_DOMAIN=y
540 +CONFIG_DM_REGULATOR=y
541 +CONFIG_DM_REGULATOR_FIXED=y
545 +CONFIG_USE_DEFAULT_ENV_FILE=y
546 +CONFIG_MTD_SPI_NAND=y
550 +CONFIG_CMD_NAND_TRIMFFS=y
551 +CONFIG_LMB_MAX_REGIONS=64
553 +CONFIG_IPADDR="192.168.1.1"
554 +CONFIG_USE_SERVERIP=y
555 +CONFIG_SERVERIP="192.168.1.254"
557 +++ b/arch/arm/dts/mt7986a-tplink-tl-xdr608x.dts
559 +// SPDX-License-Identifier: GPL-2.0
561 + * Copyright (c) 2021 MediaTek Inc.
562 + * Author: Sam Shih <sam.shih@mediatek.com>
566 +#include "mt7986.dtsi"
567 +#include <dt-bindings/gpio/gpio.h>
568 +#include <dt-bindings/input/linux-event-codes.h>
571 + #address-cells = <1>;
573 + model = "TP-Link TL-XDR608x";
574 + compatible = "mediatek,mt7986", "mediatek,mt7986-rfb";
577 + stdout-path = &uart0;
578 + tick-timer = &timer0;
582 + device_type = "memory";
583 + reg = <0x40000000 0x20000000>;
587 + compatible = "gpio-keys";
591 + linux,code = <KEY_RESTART>;
592 + gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
597 + linux,code = <KEY_WPS_BUTTON>;
598 + gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
603 + linux,code = <BTN_1>;
604 + gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
609 + compatible = "gpio-leds";
612 + label = "red:status";
613 + gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
617 + label = "green:status";
618 + gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
622 + label = "green:turbo";
623 + gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
629 + mediatek,force-highspeed;
634 + pinctrl-names = "default";
635 + pinctrl-0 = <&uart1_pins>;
636 + status = "disabled";
641 + mediatek,gmac-id = <0>;
642 + phy-mode = "2500base-x";
643 + mediatek,switch = "mt7531";
644 + reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
653 + spi_flash_pins: spi0-pins-func-1 {
655 + function = "flash";
656 + groups = "spi0", "spi0_wp_hold";
660 + pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
661 + drive-strength = <MTK_DRIVE_8mA>;
662 + bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
666 + pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
667 + drive-strength = <MTK_DRIVE_8mA>;
668 + bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
672 + spic_pins: spi1-pins-func-1 {
679 + uart1_pins: spi1-pins-func-3 {
682 + groups = "uart1_2";
686 + pwm_pins: pwm0-pins-func-1 {
695 + pinctrl-names = "default";
696 + pinctrl-0 = <&pwm_pins>;
701 + #address-cells = <1>;
703 + pinctrl-names = "default";
704 + pinctrl-0 = <&spi_flash_pins>;
715 + compatible = "spi-nand";
717 + spi-max-frequency = <52000000>;
720 + compatible = "fixed-partitions";
721 + #address-cells = <1>;
726 + reg = <0x0 0x80000>;
731 + reg = <0x100000 0x60000>;
736 + reg = <0x160000 0x60000>;
741 + reg = <0x380000 0x200000>;
746 + reg = <0x580000 0x7800000>;
753 + status = "disabled";
756 +++ b/tplink_tl-xdr4288_env
758 +ethaddr_factory=mtd read config 0x40080000 0x0 0x20000 && env readmem -b ethaddr 0x4008001c 0x6 ; setenv ethaddr_factory
760 +serverip=192.168.1.254
762 +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
763 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
766 +bootfile=openwrt-mediatek-filogic-tplink_tl-xdr4288-initramfs-recovery.itb
767 +bootfile_bl2=openwrt-mediatek-filogic-tplink_tl-xdr4288-preloader.bin
768 +bootfile_fip=openwrt-mediatek-filogic-tplink_tl-xdr4288-bl31-uboot.fip
769 +bootfile_upg=openwrt-mediatek-filogic-tplink_tl-xdr4288-squashfs-sysupgrade.itb
770 +bootled_pwr=green:status
771 +bootled_rec=red:status
772 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
775 +bootmenu_title=
\e[0;34m( ( (
\e[1;39mOpenWrt
\e[0;34m ) ) )
776 +bootmenu_0=Initialize environment.=run _firstboot
777 +bootmenu_0d=Run default boot command.=run boot_default
778 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
779 +bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
780 +bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
781 +bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
782 +bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
783 +bootmenu_6=
\e[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.
\e[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
784 +bootmenu_7=
\e[31mLoad BL2 preloader via TFTP then write to NAND.
\e[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
785 +bootmenu_8=Reboot.=reset
786 +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
787 +boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
788 +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
789 +boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
790 +boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
791 +boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
792 +boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
793 +boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
794 +boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
795 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
796 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
797 +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
798 +part_default=production
799 +part_recovery=recovery
800 +reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
801 +mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
802 +mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
803 +ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
804 +ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
805 +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
806 +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
807 +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
808 +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
809 +ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
810 +ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
811 +_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
812 +_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
813 +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
814 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title
\e[33m$ver
\e[0m"
816 +++ b/tplink_tl-xdr6086_env
818 +ethaddr_factory=mtd read config 0x40080000 0x0 0x20000 && env readmem -b ethaddr 0x4008001c 0x6 ; setenv ethaddr_factory
820 +serverip=192.168.1.254
822 +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
823 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
826 +bootfile=openwrt-mediatek-filogic-tplink_tl-xdr6086-initramfs-recovery.itb
827 +bootfile_bl2=openwrt-mediatek-filogic-tplink_tl-xdr6086-preloader.bin
828 +bootfile_fip=openwrt-mediatek-filogic-tplink_tl-xdr6086-bl31-uboot.fip
829 +bootfile_upg=openwrt-mediatek-filogic-tplink_tl-xdr6086-squashfs-sysupgrade.itb
830 +bootled_pwr=green:status
831 +bootled_rec=red:status
832 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
835 +bootmenu_title=
\e[0;34m( ( (
\e[1;39mOpenWrt
\e[0;34m ) ) )
836 +bootmenu_0=Initialize environment.=run _firstboot
837 +bootmenu_0d=Run default boot command.=run boot_default
838 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
839 +bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
840 +bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
841 +bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
842 +bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
843 +bootmenu_6=
\e[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.
\e[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
844 +bootmenu_7=
\e[31mLoad BL2 preloader via TFTP then write to NAND.
\e[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
845 +bootmenu_8=Reboot.=reset
846 +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
847 +boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
848 +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
849 +boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
850 +boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
851 +boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
852 +boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
853 +boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
854 +boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
855 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
856 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
857 +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
858 +part_default=production
859 +part_recovery=recovery
860 +reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
861 +mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
862 +mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
863 +ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
864 +ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
865 +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
866 +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
867 +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
868 +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
869 +ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
870 +ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
871 +_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
872 +_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
873 +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
874 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title
\e[33m$ver
\e[0m"
876 +++ b/tplink_tl-xdr6088_env
878 +ethaddr_factory=mtd read config 0x40080000 0x0 0x20000 && env readmem -b ethaddr 0x4008001c 0x6 ; setenv ethaddr_factory
880 +serverip=192.168.1.254
882 +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
883 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
886 +bootfile=openwrt-mediatek-filogic-tplink_tl-xdr6088-initramfs-recovery.itb
887 +bootfile_bl2=openwrt-mediatek-filogic-tplink_tl-xdr6088-preloader.bin
888 +bootfile_fip=openwrt-mediatek-filogic-tplink_tl-xdr6088-bl31-uboot.fip
889 +bootfile_upg=openwrt-mediatek-filogic-tplink_tl-xdr6088-squashfs-sysupgrade.itb
890 +bootled_pwr=green:status
891 +bootled_rec=red:status
892 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
895 +bootmenu_title=
\e[0;34m( ( (
\e[1;39mOpenWrt
\e[0;34m ) ) )
896 +bootmenu_0=Initialize environment.=run _firstboot
897 +bootmenu_0d=Run default boot command.=run boot_default
898 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
899 +bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
900 +bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
901 +bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
902 +bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
903 +bootmenu_6=
\e[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.
\e[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
904 +bootmenu_7=
\e[31mLoad BL2 preloader via TFTP then write to NAND.
\e[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
905 +bootmenu_8=Reboot.=reset
906 +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
907 +boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
908 +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
909 +boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
910 +boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
911 +boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
912 +boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
913 +boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
914 +boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
915 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
916 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
917 +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
918 +part_default=production
919 +part_recovery=recovery
920 +reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
921 +mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
922 +mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
923 +ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
924 +ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
925 +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
926 +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
927 +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
928 +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
929 +ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
930 +ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
931 +_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
932 +_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
933 +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
934 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title
\e[33m$ver
\e[0m"