From 1e06482f7db284567b240ce6f59c644439ec813f Mon Sep 17 00:00:00 2001 From: David Bauer Date: Mon, 31 Dec 2018 16:24:25 +0100 Subject: mtd: add logic for TP-Link ramips recovery magic This adds an option to set the recovery flag of newer TP-Link MediaTek boards and remove it after a successful write. To make use of this feature, add the '-t' option to mtd-write. The '-t' option takes the mtd partition containing the recovery flag (usually 'romfile') as an argument. Make sure this partition is not flagged as read-only! Example: > mtd -t romfile write owrt.bin firmware This command writes the recovery-flag before it begins writing the image to the firmware partition. After the image-write has been successful, the recovery flag is removed. This way, the TP-Link web-recovery is automatically enabled on an unsucessful flash (e.g. power loss). This option is only available if the mtd package is compiled for the ramips target. Signed-off-by: David Bauer --- package/system/mtd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'package/system/mtd/Makefile') diff --git a/package/system/mtd/Makefile b/package/system/mtd/Makefile index 65de47f23f..c307555436 100644 --- a/package/system/mtd/Makefile +++ b/package/system/mtd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mtd -PKG_RELEASE:=23 +PKG_RELEASE:=24 PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME) STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS) -- cgit v1.2.3