From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3107FC433FE for ; Mon, 2 May 2022 16:37:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5EC5183F0A; Mon, 2 May 2022 18:37:08 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.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=kernel.org header.i=@kernel.org header.b="OVLiFXXc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AB35B83F0A; Mon, 2 May 2022 18:37:06 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2503083F2F for ; Mon, 2 May 2022 18:37:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 904A5612E9; Mon, 2 May 2022 16:36:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D34E0C385AC; Mon, 2 May 2022 16:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651509418; bh=3KCNXDU+KchmBrGOk5s/ixbwN/citm3ooE7FV5UZDzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OVLiFXXcd8dZgGspWM9gFxw04ZfSmOjHCGOlLZeAeP5oQrk9AzFYfJU2bAd4HZ5qY Gs42IH8bpkcC140dH4CokROGLkeyUoeFCx7SQOxWg2mPrnwG0Fqk5Fytb/LNhVmntJ 8B60gs7rSVqL8rKNHB7ZLvDTPF1GW3AHbk7MZLdAzhp/JdpPJLzVoLP0BFDCFgttc3 Sir1laUNkLsw/Tm6ozLQwqbhC6kz9Vy+MB+hMpwLcoA1rX3oq/KRF8mryUptb3UAsT RYKefvtUsPD8fmUEli7oZHYUUxKtoazQXIYfdM03dr4uF3T0JnmGUQWhNysLAdlHeZ GkZNugxVATNig== Received: by pali.im (Postfix) id 7256B16CE; Mon, 2 May 2022 18:36:55 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Priyanka Jain , Simon Glass , Wolfgang Denk Cc: Sinan Akman , u-boot@lists.denx.de Subject: [PATCH 2/2] powerpc: mpc85xx: Fix CONFIG_OF_EMBED support for NOR booting Date: Mon, 2 May 2022 18:36:39 +0200 Message-Id: <20220502163639.10773-3-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220502163639.10773-1-pali@kernel.org> References: <20220502163639.10773-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.5 at phobos.denx.de X-Virus-Status: Clean mpc85xx NOR binary contains also reset vector and therefore option CONFIG_MPC85XX_HAVE_RESET_VECTOR must be defined. When build system uses binman, it takes care of constructing final image which consist of u-boot-without-reset-vector, DTB and reset-vector. CONFIG_OF_EMBED does not use binman, there is no external DTB and Makefile produce directly final u-boot.bin binary. So in this case mpc85xx reset vector must not be stripped from the final u-boot.bin binary. Fix it. Signed-off-by: Pali Rohár --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ad83d60dc39d..631de02b55f2 100644 --- a/Makefile +++ b/Makefile @@ -1249,7 +1249,7 @@ spl/u-boot-spl.srec: spl/u-boot-spl FORCE OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \ - $(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),-R .bootpg -R .resetvec) + $(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),$(if $(CONFIG_OF_EMBED),,-R .bootpg -R .resetvec)) binary_size_check: u-boot-nodtb.bin FORCE @file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \ -- 2.20.1