public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Priyanka Jain <priyanka.jain@nxp.com>,
	Simon Glass <sjg@chromium.org>, Wolfgang Denk <wd@denx.de>
Cc: Sinan Akman <sinan@writeme.com>, 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	[thread overview]
Message-ID: <20220502163639.10773-3-pali@kernel.org> (raw)
In-Reply-To: <20220502163639.10773-1-pali@kernel.org>

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 <pali@kernel.org>
---
 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


  parent reply	other threads:[~2022-05-02 16:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 16:36 [PATCH 0/2] powerpc: mpc85xx: Fix NOR booting Pali Rohár
2022-05-02 16:36 ` [PATCH 1/2] powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for " Pali Rohár
2022-05-23 17:57   ` Tom Rini
2022-05-23 17:58     ` Pali Rohár
2022-05-02 16:36 ` Pali Rohár [this message]
2022-05-23 17:57   ` [PATCH 2/2] powerpc: mpc85xx: Fix CONFIG_OF_EMBED " Tom Rini
2022-05-10 11:26 ` [PATCH 0/2] powerpc: mpc85xx: Fix " Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220502163639.10773-3-pali@kernel.org \
    --to=pali@kernel.org \
    --cc=priyanka.jain@nxp.com \
    --cc=sinan@writeme.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=wd@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox