ath79: reduce spi-max-frequency to 50 MHz
[openwrt/staging/wigyori.git] / include / image-commands.mk
index 3b091f26aca1e39482639015471531c44cfd921a..37cb083bbfbca2c6c62305f20d3840ddc476eb1f 100644 (file)
@@ -275,6 +275,13 @@ define Build/check-size
        }
 endef
 
+define Build/check-kernel-size
+       @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $(IMAGE_KERNEL))" ] || { \
+               echo "WARNING: Kernel for $@ is too big > $(1)" >&2; \
+               rm -f $@; \
+       }
+endef
+
 define Build/combined-image
        -sh $(TOPDIR)/scripts/combined-image.sh \
                "$(IMAGE_KERNEL)" \