All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matwey V. Kornilov <matwey.kornilov@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] rockchip, Makefile: add idbloader.img target
Date: Fri, 23 Aug 2019 20:29:25 +0300	[thread overview]
Message-ID: <20190823172930.4883-2-matwey.kornilov@gmail.com> (raw)
In-Reply-To: <20190823172930.4883-1-matwey.kornilov@gmail.com>

Many Rockchip platforms require the same u-boot deploy procedure
when TPL and SPL both enabled.

The following examples are taken from doc/README.rockchip
and board/theobroma-systems/lion_rk3368/README:

RK3288:

  ./tools/mkimage -n rk3288 -T rksd -d ./tpl/u-boot-tpl.bin out
  cat ./spl/u-boot-spl-dtb.bin >> out
  sudo dd if=out of=/dev/mmcblk0 seek=64

RK3328:

  ./tools/mkimage -n rk3328 -T rksd -d ./tpl/u-boot-tpl.bin idbloader.img
  cat ./spl/u-boot-spl.bin >> idbloader.img
  sudo dd if=idbloader.img of=/dev/mmcblk0 seek=64

RK3368:

  ./tools/mkimage -n rk3368 -T rksd -d tpl/u-boot-tpl.bin spl-3368.img
  cat spl/u-boot-spl-dtb.bin >> spl-3368.img
  dd if=spl-3368.img of=/dev/sdb seek=64

RK3399:

  ./tools/mkimage -n rk3399 -T rksd -d ./tpl/u-boot-tpl-dtb.bin out
  cat ./spl/u-boot-spl-dtb.bin >> out
  sudo dd if=out of=/dev/sdc seek=64

Here, we introduce generic idbloader.img target
which is the TPL image followed by the SPL binary.

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
 Makefile | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/Makefile b/Makefile
index 3b0864ae8e..eb12af9364 100644
--- a/Makefile
+++ b/Makefile
@@ -882,6 +882,10 @@ ifeq ($(CONFIG_MPC85xx)$(CONFIG_OF_SEPARATE),yy)
 ALL-y += u-boot-with-dtb.bin
 endif
 
+ifeq ($(CONFIG_ARCH_ROCKCHIP)$(CONFIG_SPL)$(CONFIG_TPL),yyy)
+ALL-y += idbloader.img
+endif
+
 LDFLAGS_u-boot += $(LDFLAGS_FINAL)
 
 # Avoid 'Not enough room for program headers' error on binutils 2.28 onwards.
@@ -1293,6 +1297,14 @@ OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
 u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE
 	$(call if_changed,pad_cat)
 
+ifeq ($(CONFIG_ARCH_ROCKCHIP),y)
+MKIMAGEFLAGS_u-boot-tpl.img = -n $(CONFIG_SYS_SOC) -T rksd
+tpl/u-boot-tpl.img: tpl/u-boot-tpl.bin FORCE
+	$(call if_changed,mkimage)
+idbloader.img: tpl/u-boot-tpl.img spl/u-boot-spl.bin FORCE
+	$(call if_changed,cat)
+endif
+
 ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)
 MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
 
-- 
2.16.4

  reply	other threads:[~2019-08-23 17:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 17:29 [U-Boot] [PATCH 0/5] Introduce idbloader.img target for Makefile Matwey V. Kornilov
2019-08-23 17:29 ` Matwey V. Kornilov [this message]
2019-09-03  3:02   ` [U-Boot] [PATCH 1/5] rockchip, Makefile: add idbloader.img target【请注意,邮件由u-boot-bounces@lists.denx.de代发】 Kever Yang
2019-08-23 17:29 ` [U-Boot] [PATCH 2/5] doc: rockchip: use idbloader.img for rk3288 Matwey V. Kornilov
2019-09-03  3:08   ` Kever Yang
2019-08-23 17:29 ` [U-Boot] [PATCH 3/5] doc: rockchip: use idbloader.img for rk3328 Matwey V. Kornilov
2019-08-23 17:29 ` [U-Boot] [PATCH 4/5] doc: lion_rk3368: use idbloader.img for rk3368 Matwey V. Kornilov
2019-08-23 17:29 ` [U-Boot] [PATCH 5/5] doc: rockchip: use idbloader.img for rk3399 Matwey V. Kornilov
2019-09-03  3:10   ` Kever Yang

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=20190823172930.4883-2-matwey.kornilov@gmail.com \
    --to=matwey.kornilov@gmail.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.