From patchwork Wed Mar 4 06:54:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1248850 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=UY1c3WJG; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48XPlZ5cVmz9sP7 for ; Wed, 4 Mar 2020 17:55:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8D1DE81254; Wed, 4 Mar 2020 07:55:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="UY1c3WJG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D9CD681269; Wed, 4 Mar 2020 07:55:16 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 10225801F1 for ; Wed, 4 Mar 2020 07:55:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pl1-x642.google.com with SMTP id ay11so603724plb.0 for ; Tue, 03 Mar 2020 22:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=S0jjarRntituBX958f6VR1TH+euvbNMzchjQBlQmcRQ=; b=UY1c3WJGjtI2ls+NoF3eXo9cijug9WV58pETDJc1DhE84YMV5mqGQ3X8+9Qp3XrNJ2 Ui+sEoWWaEJSsKzVm9MRP82QUlZUdnvHFXCNNMu35jqGvBa8nZ1F7dzXlBSZAJwICUmo a7v8or/gD6Wb8KFTyxCTmoFRDIbVfiANtyRty4czQoUFZqvgbSiSUVp3XmRtpUzh5ZE8 pGvErc+dsXLeVY+NL0smh+94+eJDtG5Dvhdaykuvu1ye03924spB//OTDMeUGhCDCiYU hS0/GP5dhklqYoEm9mLu+Ttv4X4OEgRjAJEhGcx+uOfW3N6mh6CoYhXESsVzBtsEC/Hu wEyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=S0jjarRntituBX958f6VR1TH+euvbNMzchjQBlQmcRQ=; b=ewFVJI0ClMHNpfAPjYAgNdejdD2p5PzFKTLCTihhzUQyaRzwF/RHmRZx3D9KqoPbAK p0lpZN++CVurB2WiPVUFnILjjpR82vaT7BHyoy9g8d/b+2GtHZplP38KIPpKvQ6Dct4j VaLXfEOTv/DToNU4j7osBTXb5rhmQb/rsCIRC1Y8tIa//K80gUTf9IOdV0xe3mVKS7Ea mSMhcgEyeSWUHaNncpFLthESKqEe1hwTg3vYQ52+OAYZpXhOPfT/C0XmDUwVafS8BxWL WuOVIXS7PECGoAQxpRxJQRWhAUU5I4zX+wjkl9BXr61qrYAwg21Nsz/1hQe74C7wrCcP 6gtw== X-Gm-Message-State: ANhLgQ294M4t5XR8uFNTGw1Hsj4ovQ3bDwEDLgYr5AqQtnKTq3TUBXT6 Lj53RenPr+SHcLk9dheP7twuCGQP/MQ= X-Google-Smtp-Source: ADFU+vtz/JMO6cltcrlJKAx0FpbOSLkjEGZzIy4xDC7vOQcgIRF9stTjBaAuy9G9t2I5BUh41K48Pw== X-Received: by 2002:a17:90a:eb18:: with SMTP id j24mr1595822pjz.85.1583304912235; Tue, 03 Mar 2020 22:55:12 -0800 (PST) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id e1sm27140122pff.188.2020.03.03.22.55.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Mar 2020 22:55:11 -0800 (PST) From: AKASHI Takahiro To: trini@konsulko.com Cc: swarren@nvidia.com, u-boot@lists.denx.de Subject: [PATCH] Makefile: doesn't need check stack size when dtb is not built Date: Wed, 4 Mar 2020 15:54:51 +0900 Message-Id: <20200304065450.1068-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean The commit 5fed97af20da ("Makefile: ensure DTB doesn't overflow into initial stack") adds an extra check for stack size in BSS if CONFIG_SYS_INIT_SP_BSS_OFFSET is enabled. This check, however, doesn't make sense under the configuration where control dtb won't be built in and it should be void in such cases. Signed-off-by: AKASHI Takahiro Fixes: 5fed97af20da ("Makefile: ensure DTB doesn't overflow into initial stack") --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0af89e0a7881..78efd7e9e250 100644 --- a/Makefile +++ b/Makefile @@ -1208,7 +1208,10 @@ binary_size_check: u-boot-nodtb.bin FORCE fi \ fi -ifdef CONFIG_INIT_SP_RELATIVE +ifeq ($(CONFIG_INIT_SP_RELATIVE),y) +ifneq ($(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_OF_HOSTFILE),) +# u-boot.dtb will be built only if one of those options is enabled + ifneq ($(CONFIG_SYS_MALLOC_F_LEN),) subtract_sys_malloc_f_len = space=$$(($${space} - $(CONFIG_SYS_MALLOC_F_LEN))) else @@ -1233,6 +1236,10 @@ init_sp_bss_offset_check: u-boot.dtb FORCE echo "(CONFIG_SYS_INIT_SP_BSS_OFFSET - CONFIG_SYS_MALLOC_F_LEN)" >&2 ; \ exit 1 ; \ fi +else +init_sp_bss_offset_check: + +endif endif u-boot-nodtb.bin: u-boot FORCE