From patchwork Fri Aug 21 11:45:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Gorski X-Patchwork-Id: 509476 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2D3731402AD for ; Fri, 21 Aug 2015 21:48:37 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id AA43028C614; Fri, 21 Aug 2015 13:46:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable version=3.3.2 Received: from localhost (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 3609628C1AA; Fri, 21 Aug 2015 13:44:55 +0200 (CEST) X-Virus-Scanned: at arrakis.dune.hu Received: from localhost.localdomain (dslb-088-073-024-154.088.073.pools.vodafone-ip.de [88.73.24.154]) by arrakis.dune.hu (Postfix) with ESMTPSA id 2FFE228C5FB; Fri, 21 Aug 2015 13:44:38 +0200 (CEST) From: Jonas Gorski To: openwrt-devel@lists.openwrt.org Date: Fri, 21 Aug 2015 13:45:17 +0200 Message-Id: <1440157521-525-4-git-send-email-jogo@openwrt.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1440157521-525-1-git-send-email-jogo@openwrt.org> References: <1440157521-525-1-git-send-email-jogo@openwrt.org> Subject: [OpenWrt-Devel] [PATCH 3/7] image: allow exactly KERNEL_SIZE sized kernels X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" The KERNEL_SIZE should be the maximum size, inclusive, so we need to check for greater equal, not just greater. Signed-off-by: Jonas Gorski --- include/image.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/image.mk b/include/image.mk index d4ebdef..400dce8 100644 --- a/include/image.mk +++ b/include/image.mk @@ -392,7 +392,7 @@ define Build/pad-offset endef define Build/check-size - @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -gt "$$(stat -c%s $@)" ] || { \ + @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $@)" ] || { \ echo "WARNING: Image file $@ is too big" >&2; \ rm -f $@; \ } @@ -466,7 +466,7 @@ endef endif define Device/Build/check_size - @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -gt "$$(stat -c%s $@)" ] || { \ + @[ $$(($(subst k,* 1024,$(subst m, * 1024k,$(1))))) -ge "$$(stat -c%s $@)" ] || { \ echo "WARNING: Image file $@ is too big" >&2; \ rm -f $@; \ }