ramips: mt7621: print size of factory initramfs-image if it's too big
authorSven Roederer <devel-sven@geroedel.de>
Tue, 20 Jul 2021 23:30:41 +0000 (01:30 +0200)
committerSungbo Eo <mans0n@gorani.run>
Sun, 20 Feb 2022 06:55:36 +0000 (15:55 +0900)
It's helpful to know the current and maximal size of the imagefiles if the
creation fails.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
target/linux/ramips/image/mt7621.mk

index 4e3390a4ac01b35c7be45da7e29cba9aa42a3f99..95fdc6095dd725ae4ccbeff54c99d1f2440edddd 100644 (file)
@@ -26,7 +26,7 @@ define Build/iodata-factory
                mv $(factory_bin).new $(factory_bin); \
                $(CP) $(factory_bin) $(BIN_DIR)/; \
        else \
-               echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
+               echo "WARNING: initramfs kernel image too big, cannot generate factory image (actual $$(stat -c%s $@); max $(fw_size))" >&2; \
        fi
 endef
 
@@ -66,7 +66,7 @@ define Build/ubnt-erx-factory-image
                \
                $(CP) $(1) $(BIN_DIR)/; \
        else \
-               echo "WARNING: initramfs kernel image too big, cannot generate factory image" >&2; \
+               echo "WARNING: initramfs kernel image too big, cannot generate factory image (actual $$(stat -c%s $@); max $(KERNEL_SIZE))" >&2; \
        fi
 endef