From 33b207852809b68e68c4ec2430d0379518314957 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Bl=C3=A4se?= Date: Sat, 16 May 2020 12:23:52 +0200 Subject: [PATCH] mt7621: Make ER-X-SFP factory image compatible with EP-R6 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The version inside the compat file determines, if a firmware supports a specific device. I have not yet fully understood, how this is checked, but it only seems to indicate which devices are supported by a specific version of the combined vendor firmware. Devices assume that subsequent versions, starting with the version that initially added support for a specific device, are always compatible. The first compat version that added support for the EP-R6 was '21001:7', but OpenWrt did use '21001:6' before. This is why the factory image could not be flashed using the vendor software, but only using TFTP. The compat version has been bumped by the vendor a few times, but more devices have been added since (e.g. ER-10X). Because OpenWrt currently only supports the ER-X, ER-X-SFP and EP-R6, the compat version is incremented to the version that first supported the EP-R6, which is '21001:7'. This allows the factory image to be flashed on EP-R6 without TFTP. Signed-off-by: Fabian Bläse --- target/linux/ramips/image/mt7621.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index ca2aa4cfeabe..e3ded2ebc2cb 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -83,7 +83,7 @@ endef define Build/ubnt-erx-factory-image if [ -e $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE) -a "$$(stat -c%s $@)" -lt "$(KERNEL_SIZE)" ]; then \ - echo '21001:6' > $(1).compat; \ + echo '21001:7' > $(1).compat; \ $(TAR) -cf $(1) --transform='s/^.*/compat/' $(1).compat; \ \ $(TAR) -rf $(1) --transform='s/^.*/vmlinux.tmp/' $(KDIR)/tmp/$(KERNEL_INITRAMFS_IMAGE); \ -- 2.30.2