All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dalon L Westergreen <dalon.westergreen@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RESEND PATCH v3 1/2] Makefile: Add target to generate hex output for combined spl and dtb
Date: Wed, 09 Oct 2019 05:57:40 -0700	[thread overview]
Message-ID: <f654a0aba0de4f8e05a10555553ba12d1cd5a840.camel@linux.intel.com> (raw)
In-Reply-To: <0197693f-d6b6-f4ba-4298-f16dcefcf725@gmail.com>

On Sat, 2019-10-05 at 21:40 +0200, Simon Goldschmidt wrote:
> Am 27.09.2019 um 20:27 schrieb Dalon Westergreen:
> > From: Dalon Westergreen <dalon.westergreen@intel.com>
> > Stratix10 requires a hex image of the spl plus spl devicetree offset tothe
> > Stratix10 onchip memory located at SPL_TEXT_BASE.  This patch addsa target
> > to generate a hex file from the u-boot-spl binary including thedtb offset at
> > SPL_TEST_BASE.
> > Objcopy is used to convert the $(SPL_BIN).bin, which includes the spldtb, to
> > a hex file.  the --change-address option is used to offset thehex to
> > SPL_TEXT_BASE as objcopy on the spl binary will not result ina hex file
> > appropriately offset at SPL_TEXT_BASE.
> > Signed-off-by: Dalon Westergreen <dalon.westergreen@intel.com>
> > ---Changes in v3:  -> Cleanup commit message and better describe the problem
> > being     resolved  -> Remove extraneous hunk  -> use SPL_BIN instead of u-
> > boot-splChanges in v2:  -> Move spl hex file generation to SPL Makefile  ->
> > Create hexfile from $(SPL_BIN).bin which will include the
> > dtb     ifneq(build_dtb,)---  Makefile             | 8 +++--
> > ---  scripts/Makefile.spl | 7 +++++++  2 files changed, 10 insertions(+), 5
> > deletions(-)
> > diff --git a/Makefile b/Makefileindex 1d9ade948b..0bc9d1589f 100644---
> > a/Makefile+++ b/Makefile@@ -1152,11 +1152,6 @@ 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)  -OBJCOPYFLAGS_u-boot-spl.hex = $(OBJCOPYFLAGS_u-
> > boot.hex)--spl/u-boot-spl.hex: spl/u-boot-spl FORCE-	$(call
> > if_changed,objcopy)-  binary_size_check: u-boot-nodtb.bin FORCE  	@file_si
> > ze=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \  	map_size
> > =$(shell cat u-boot.map | \@@ -1756,6 +1751,9 @@ spl/u-boot-spl.bin: spl/u-
> > boot-spl  	@:  	$(SPL_SIZE_CHECK)  +spl/u-boot-spl.hex: spl/u-boot-
> > spl+	@:+  spl/u-boot-spl: tools prepare \  		$(if
> > $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SPL_OF_PLATDATA),dts/dt.dtb)
> > \  		$(if
> > $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_TPL_OF_PLATDATA),dts/dt.dtb)
> > diff --git a/scripts/Makefile.spl b/scripts/Makefile.splindex
> > 7af6b120b6..551002194e 100644--- a/scripts/Makefile.spl+++
> > b/scripts/Makefile.spl@@ -216,6 +216,8 @@ ifneq
> > ($(CONFIG_TARGET_SOCFPGA_GEN5)$(CONFIG_TARGET_SOCFPGA_ARRIA10),)  ALL-y	
> > += $(obj)/$(SPL_BIN).sfp  endif  +ALL-$(CONFIG_TARGET_SOCFPGA_STRATIX10) +=
> > $(obj)/$(SPL_BIN).hex+  ifdef CONFIG_ARCH_SUNXI  ALL-y	+= $(obj)/sunxi-
> > spl.bin  @@ -363,6 +365,11 @@ endif  $(obj)/$(SPL_BIN).sfp:
> > $(obj)/$(SPL_BIN).bin FORCE  	$(call
> > if_changed,mkimage)  +OBJCOPYFLAGS_$(SPL_BIN).hex := -I binary -O ihex --
> > change-address=$(CONFIG_SPL_TEXT_BASE)++$(obj)/$(SPL_BIN).hex:
> > $(obj)/$(SPL_BIN).bin FORCE+	$(call if_changed,objcopy)+
> 
> While I like the idea of this patch, and I *think* that this is what an SPL
> hex should look like for all platforms, I'm not 100% sure that globally
> changing the rule and objcopy flags for u-boot-spl.hex is OK for all
> architectures?
> Let's try to apply this at the start of next merge window, then we'll
> hopefully see if this does break any board.
> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> Regards,Simon
sounds good, i dont believe there are other boards with SPL hex as atarget, at
least none that i found.
--dalon
> >   quiet_cmd_mksunxiboot = MKSUNXI $@  cmd_mksunxiboot =
> > $(objtree)/tools/mksunxiboot \  			--default-dt
> > $(CONFIG_DEFAULT_DEVICE_TREE) $< $@

  reply	other threads:[~2019-10-09 12:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-27 18:27 [U-Boot] [RESEND PATCH v3 1/2] Makefile: Add target to generate hex output for combined spl and dtb Dalon Westergreen
2019-09-27 18:27 ` [U-Boot] [RESEND PATCH v3 2/2] ARM: socfpga: stratix10: Remove CONFIG_OF_EMBED Dalon Westergreen
2019-10-05 19:41   ` Simon Goldschmidt
2019-10-09 12:56     ` Dalon L Westergreen
2019-10-09 13:32       ` Simon Goldschmidt
2019-10-04 13:54 ` [U-Boot] [RESEND PATCH v3 1/2] Makefile: Add target to generate hex output for combined spl and dtb Tom Rini
2019-10-05 19:40 ` Simon Goldschmidt
2019-10-09 12:57   ` Dalon L Westergreen [this message]
2019-10-09 13:34     ` Simon Goldschmidt
  -- strict thread matches above, loose matches on Subject: below --
2019-08-07 14:44 Dalon Westergreen

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=f654a0aba0de4f8e05a10555553ba12d1cd5a840.camel@linux.intel.com \
    --to=dalon.westergreen@linux.intel.com \
    --cc=u-boot@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.