+define Build/mkmylofw_16m
+ $(eval device_id=$(word 1,$(1)))
+ $(eval revision=$(word 2,$(1)))
+
+ # On WPJ344, WPJ531, and WPJ563, the default boot command tries 0x9f680000
+ # first and fails if the remains of the stock image are sill there
+ # - resulting in an infinite boot loop.
+ # The size parameter is grown to have that block deleted if the firmware
+ # isn't big enough by itself.
+
+ let \
+ size="$$(stat -c%s $@)" \
+ pad="$(subst k,* 1024,$(BLOCKSIZE))" \
+ pad="(pad - (size % pad)) % pad" \
+ newsize='size + pad' ; \
+ [ $$newsize -lt $$((0x660000)) ] && newsize=0x660000 ; \
+ $(STAGING_DIR_HOST)/bin/mkmylofw \
+ -B WPE72 -i 0x11f6:$(device_id):0x11f6:$(device_id) -r $(revision) \
+ -s 0x1000000 -p0x30000:$$newsize:al:0x80060000:"OpenWRT":$@ \
+ $@.new
+ @mv $@.new $@
+endef
+