* [U-Boot] [PATCH 0/5] Introduce idbloader.img target for Makefile
@ 2019-08-23 17:29 Matwey V. Kornilov
2019-08-23 17:29 ` [U-Boot] [PATCH 1/5] rockchip, Makefile: add idbloader.img target Matwey V. Kornilov
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Matwey V. Kornilov @ 2019-08-23 17:29 UTC (permalink / raw)
To: u-boot
Rockchip SoCs reqire the following deployment procedure for TPL/SPL:
./tools/mkimage -n rk3328 -T rksd -d ./tpl/u-boot-tpl.bin idbloader.img
cat ./spl/u-boot-spl-dtb.bin >> idbloader.img
dd if=idbloader.img of=/dev/mmcblk0 seek=64
The series is organized as the following. First patch introduces idbloader.img
target for Makefile. The rest is for keeping the documentation up-to-date.
Matwey V. Kornilov (5):
rockchip, Makefile: add idbloader.img target
doc: rockchip: use idbloader.img for rk3288
doc: rockchip: use idbloader.img for rk3328
doc: lion_rk3368: use idbloader.img for rk3368
doc: rockchip: use idbloader.img for rk3399
Makefile | 12 ++++++++++++
board/theobroma-systems/lion_rk3368/README | 4 +---
doc/README.rockchip | 15 +--------------
3 files changed, 14 insertions(+), 17 deletions(-)
--
2.16.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/5] rockchip, Makefile: add idbloader.img target
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
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
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Matwey V. Kornilov @ 2019-08-23 17:29 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/5] doc: rockchip: use idbloader.img for rk3288
2019-08-23 17:29 [U-Boot] [PATCH 0/5] Introduce idbloader.img target for Makefile Matwey V. Kornilov
2019-08-23 17:29 ` [U-Boot] [PATCH 1/5] rockchip, Makefile: add idbloader.img target Matwey V. Kornilov
@ 2019-08-23 17:29 ` 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
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Matwey V. Kornilov @ 2019-08-23 17:29 UTC (permalink / raw)
To: u-boot
Makefile now produces ready-to-deploy idbloader.img file.
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
doc/README.rockchip | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/doc/README.rockchip b/doc/README.rockchip
index 7d4dc1b33b..6e58cfde49 100644
--- a/doc/README.rockchip
+++ b/doc/README.rockchip
@@ -276,9 +276,7 @@ As of now TPL is added on Vyasa-RK3288 board.
To write an image that boots from an SD card (assumed to be /dev/mmcblk0):
- ./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 &&
+ sudo dd if=idbloader.img of=/dev/mmcblk0 seek=64 &&
sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 seek=16384
Booting from an SD card on RK3188
--
2.16.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 3/5] doc: rockchip: use idbloader.img for rk3328
2019-08-23 17:29 [U-Boot] [PATCH 0/5] Introduce idbloader.img target for Makefile Matwey V. Kornilov
2019-08-23 17:29 ` [U-Boot] [PATCH 1/5] rockchip, Makefile: add idbloader.img target Matwey V. Kornilov
2019-08-23 17:29 ` [U-Boot] [PATCH 2/5] doc: rockchip: use idbloader.img for rk3288 Matwey V. Kornilov
@ 2019-08-23 17:29 ` 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
4 siblings, 0 replies; 9+ messages in thread
From: Matwey V. Kornilov @ 2019-08-23 17:29 UTC (permalink / raw)
To: u-boot
Makefile now produces ready-to-deploy idbloader.img file.
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
doc/README.rockchip | 5 -----
1 file changed, 5 deletions(-)
diff --git a/doc/README.rockchip b/doc/README.rockchip
index 6e58cfde49..401dc19d91 100644
--- a/doc/README.rockchip
+++ b/doc/README.rockchip
@@ -309,11 +309,6 @@ Booting from an SD card on Pine64 Rock64 (RK3328)
For Rock64 rk3328 board the following three parts are required:
TPL, SPL, and the u-boot image tree blob.
- - Create TPL/SPL image
-
- => tools/mkimage -n rk3328 -T rksd -d tpl/u-boot-tpl.bin idbloader.img
- => cat spl/u-boot-spl.bin >> idbloader.img
-
- Write TPL/SPL image at 64 sector
=> sudo dd if=idbloader.img of=/dev/mmcblk0 seek=64
--
2.16.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 4/5] doc: lion_rk3368: use idbloader.img for rk3368
2019-08-23 17:29 [U-Boot] [PATCH 0/5] Introduce idbloader.img target for Makefile Matwey V. Kornilov
` (2 preceding siblings ...)
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 ` Matwey V. Kornilov
2019-08-23 17:29 ` [U-Boot] [PATCH 5/5] doc: rockchip: use idbloader.img for rk3399 Matwey V. Kornilov
4 siblings, 0 replies; 9+ messages in thread
From: Matwey V. Kornilov @ 2019-08-23 17:29 UTC (permalink / raw)
To: u-boot
Makefile now produces ready-to-deploy idbloader.img file.
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
board/theobroma-systems/lion_rk3368/README | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/board/theobroma-systems/lion_rk3368/README b/board/theobroma-systems/lion_rk3368/README
index 83e4332984..ad3ac93bd4 100644
--- a/board/theobroma-systems/lion_rk3368/README
+++ b/board/theobroma-systems/lion_rk3368/README
@@ -18,8 +18,6 @@ Build the TPL/SPL stage
=======================
> make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm
- > 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
Build the full U-Boot and a FIT image including the ATF
=======================================================
@@ -35,7 +33,7 @@ Copy the SPL to offset 32k and the FIT image containing the payloads
SD-Card
-------
- > dd if=spl-3368.img of=/dev/sdb seek=64
+ > dd if=idbloader.img of=/dev/sdb seek=64
> dd if=u-boot.itb of=/dev/sdb seek=512
eMMC
--
2.16.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 5/5] doc: rockchip: use idbloader.img for rk3399
2019-08-23 17:29 [U-Boot] [PATCH 0/5] Introduce idbloader.img target for Makefile Matwey V. Kornilov
` (3 preceding siblings ...)
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 ` Matwey V. Kornilov
2019-09-03 3:10 ` Kever Yang
4 siblings, 1 reply; 9+ messages in thread
From: Matwey V. Kornilov @ 2019-08-23 17:29 UTC (permalink / raw)
To: u-boot
Makefile now produces ready-to-deploy idbloader.img file.
u-boot has support for TPL at rk3399 platform for all boards,
so there is not reason to refer binary loaders.
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
---
doc/README.rockchip | 6 ------
1 file changed, 6 deletions(-)
diff --git a/doc/README.rockchip b/doc/README.rockchip
index 401dc19d91..b5311adcd8 100644
--- a/doc/README.rockchip
+++ b/doc/README.rockchip
@@ -324,12 +324,6 @@ To write an image that boots from an SD card (assumed to be /dev/sdc):
Option 1: Package the image with Rockchip miniloader:
- - Create idbloader.img
-
- => cd /path/to/u-boot
- => ./tools/mkimage -n rk3399 -T rksd -d /path/to/rkbin/bin/rk33/rk3399_ddr_800MHz_v1.20.bin idbloader.img
- => cat /path/to/rkbin/bin/rk33/rk3399_miniloader_v1.19.bin >> idbloader.img
-
- Write idbloader.img at 64 sector
=> sudo dd if=idbloader.img of=/dev/sdc seek=64
--
2.16.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 1/5] rockchip, Makefile: add idbloader.img target【请注意,邮件由u-boot-bounces@lists.denx.de代发】
2019-08-23 17:29 ` [U-Boot] [PATCH 1/5] rockchip, Makefile: add idbloader.img target Matwey V. Kornilov
@ 2019-09-03 3:02 ` Kever Yang
0 siblings, 0 replies; 9+ messages in thread
From: Kever Yang @ 2019-09-03 3:02 UTC (permalink / raw)
To: u-boot
Hi Matwey,
On 2019/8/24 上午1:29, Matwey V. Kornilov wrote:
> 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>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Thanks,
- Kever
> ---
> 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)
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 2/5] doc: rockchip: use idbloader.img for rk3288
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
0 siblings, 0 replies; 9+ messages in thread
From: Kever Yang @ 2019-09-03 3:08 UTC (permalink / raw)
To: u-boot
Hi Matwey,
Could you merge patch 2/3/5 into one patch? I think they are the
one update for
the same reason, no need to split into 3 patches.
Thanks,
- Kever
On 2019/8/24 上午1:29, Matwey V. Kornilov wrote:
> Makefile now produces ready-to-deploy idbloader.img file.
>
> Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
> ---
> doc/README.rockchip | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/doc/README.rockchip b/doc/README.rockchip
> index 7d4dc1b33b..6e58cfde49 100644
> --- a/doc/README.rockchip
> +++ b/doc/README.rockchip
> @@ -276,9 +276,7 @@ As of now TPL is added on Vyasa-RK3288 board.
>
> To write an image that boots from an SD card (assumed to be /dev/mmcblk0):
>
> - ./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 &&
> + sudo dd if=idbloader.img of=/dev/mmcblk0 seek=64 &&
> sudo dd if=u-boot-dtb.img of=/dev/mmcblk0 seek=16384
>
> Booting from an SD card on RK3188
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 5/5] doc: rockchip: use idbloader.img for rk3399
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
0 siblings, 0 replies; 9+ messages in thread
From: Kever Yang @ 2019-09-03 3:10 UTC (permalink / raw)
To: u-boot
On 2019/8/24 上午1:29, Matwey V. Kornilov wrote:
> Makefile now produces ready-to-deploy idbloader.img file.
>
> u-boot has support for TPL at rk3399 platform for all boards,
> so there is not reason to refer binary loaders.
>
> Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
> ---
> doc/README.rockchip | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/doc/README.rockchip b/doc/README.rockchip
> index 401dc19d91..b5311adcd8 100644
> --- a/doc/README.rockchip
> +++ b/doc/README.rockchip
> @@ -324,12 +324,6 @@ To write an image that boots from an SD card (assumed to be /dev/sdc):
>
> Option 1: Package the image with Rockchip miniloader:
>
> - - Create idbloader.img
> -
> - => cd /path/to/u-boot
> - => ./tools/mkimage -n rk3399 -T rksd -d /path/to/rkbin/bin/rk33/rk3399_ddr_800MHz_v1.20.bin idbloader.img
> - => cat /path/to/rkbin/bin/rk33/rk3399_miniloader_v1.19.bin >> idbloader.img
> -
> - Write idbloader.img at 64 sector
This is create idbloader from rkbin, it should not be update since it's
not U-Boot target,
you should update below description for rk3399 instead:
474 Option 3: Package the image with TPL:
475
476 - Prefix rk3399 header to TPL image
477
478 => cd /path/to/u-boot
479 => ./tools/mkimage -n rk3399 -T rksd -d tpl/u-boot-tpl-dtb.bin out
480
481 - Concatinate tpl with spl
482
483 => cd /path/to/u-boot
484 => cat ./spl/u-boot-spl-dtb.bin >> out
Thanks,
- Kever
>
> => sudo dd if=idbloader.img of=/dev/sdc seek=64
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-09-03 3:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 17:29 [U-Boot] [PATCH 0/5] Introduce idbloader.img target for Makefile Matwey V. Kornilov
2019-08-23 17:29 ` [U-Boot] [PATCH 1/5] rockchip, Makefile: add idbloader.img target Matwey V. Kornilov
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
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.