diff options
author | Matwey V. Kornilov <matwey.kornilov@gmail.com> | 2019-09-03 19:29:01 +0300 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2019-09-11 16:16:12 +0800 |
commit | 1b0a936b52606af87b6576817a0e939da731b6d9 (patch) | |
tree | f977334838d8f6422d739b711e0de6838651a9e1 /Makefile | |
parent | c9ec5fe0185d9867afe18dc7bf01fd492db8c4a9 (diff) | |
download | u-boot-1b0a936b52606af87b6576817a0e939da731b6d9.tar.gz u-boot-1b0a936b52606af87b6576817a0e939da731b6d9.tar.bz2 u-boot-1b0a936b52606af87b6576817a0e939da731b6d9.zip |
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.
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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. @@ -1314,6 +1318,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) |