Introduce idbloader.img target for Makefile
Subsystems (2)
cover Introduce idbloader.img target for Makefile
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(-)
Signature · 1 line
2.16.4
PATCH 1/5 rockchip, Makefile: add idbloader.img target
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.
--- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+)
Makefile +12 -0
@@ -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)
Signature · 1 line
2.16.4
PATCH 1/5 rockchip, Makefile: add idbloader.img target【请注意,邮件由[email protected]代发】
Hi Matwey,
Quoted 26 lines · Matwey V. Kornilov
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=64RK3328:
./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=64RK3368:
./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=64RK3399:
Quoted 8 lines
./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=64Here, we introduce generic idbloader.img target which is the TPL image followed by the SPL binary.
Signed-off-by Matwey V. Kornilov <[email protected]>
Thanks,
- Kever
Quoted 34 lines
--- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+)Makefile +12
-0@@ -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)
PATCH 2/5 doc: rockchip: use idbloader.img for rk3288
In reply to Matwey V. KornilovMakefile now produces ready-to-deploy idbloader.img file.
--- doc/README.rockchip | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
doc/README.rockchip +1 -3
@@ -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
Signature · 1 line
2.16.4
PATCH 2/5 doc: rockchip: use idbloader.img for rk3288
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
Quoted 22 lines · Matwey V. Kornilov
Makefilenow produces ready-to-deploy idbloader.img file.Signed-off-by Matwey V. Kornilov <[email protected]>--- doc/README.rockchip | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)doc/README.rockchip +1
-3@@ -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
PATCH 3/5 doc: rockchip: use idbloader.img for rk3328
In reply to Matwey V. KornilovMakefile now produces ready-to-deploy idbloader.img file.
--- doc/README.rockchip | 5 ----- 1 file changed, 5 deletions(-)
doc/README.rockchip +0 -5
@@ -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
Signature · 1 line
2.16.4
PATCH 4/5 doc: lion_rk3368: use idbloader.img for rk3368
In reply to Matwey V. KornilovMakefile now produces ready-to-deploy idbloader.img file.
--- board/theobroma-systems/lion_rk3368/README | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
board/theobroma-systems/lion_rk3368/README +1 -3
@@ -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
Signature · 1 line
2.16.4
PATCH 5/5 doc: rockchip: use idbloader.img for rk3399
In reply to Matwey V. KornilovMakefile 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.
--- doc/README.rockchip | 6 ------ 1 file changed, 6 deletions(-)
doc/README.rockchip +0 -6
@@ -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
Signature · 1 line
2.16.4
PATCH 5/5 doc: rockchip: use idbloader.img for rk3399
Quoted 15 lines · Matwey V. Kornilov
Makefilenow 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 <[email protected]>--- doc/README.rockchip | 6 ------ 1 file changed, 6 deletions(-)doc/README.rockchip +0
-0
doc/README.rockchip To write an image that boots from an SD card (assumed to be /dev/sdc): · line 327
Quoted 10 lines
doc/README.rockchip +0
-6@@ -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
Quoted 2 lines
doc/README.rockchip +0
-0=> sudo dd if=idbloader.img of=/dev/sdc seek=64