mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-23 18:30:54 +00:00
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 <mail@david-bauer.net>
28 lines
620 B
Makefile
28 lines
620 B
Makefile
CC = gcc
|
|
CFLAGS += -Wall
|
|
LDFLAGS += -lubox
|
|
|
|
obj = mtd.o jffs2.o crc32.o md5.o
|
|
obj.seama = seama.o md5.o
|
|
obj.wrg = wrg.o md5.o
|
|
obj.wrgg = wrgg.o md5.o
|
|
obj.tpl = tpl_ramips_recoveryflag.o
|
|
obj.ar71xx = trx.o $(obj.seama) $(obj.wrgg)
|
|
obj.brcm = trx.o
|
|
obj.brcm47xx = $(obj.brcm)
|
|
obj.bcm53xx = $(obj.brcm) $(obj.seama)
|
|
obj.brcm63xx = imagetag.o
|
|
obj.ramips = $(obj.seama) $(obj.tpl) $(obj.wrg)
|
|
obj.mvebu = linksys_bootcount.o
|
|
obj.kirkwood = linksys_bootcount.o
|
|
obj.ipq806x = linksys_bootcount.o
|
|
obj.ipq40xx = linksys_bootcount_fix.o
|
|
|
|
ifdef FIS_SUPPORT
|
|
obj += fis.o
|
|
endif
|
|
|
|
mtd: $(obj) $(obj.$(TARGET))
|
|
clean:
|
|
rm -f *.o jffs2
|