[U-Boot] [RFC PATCH] rockchip, Makefile: add u-boot-tpl-with-spl.img target

Matwey V. Kornilov matwey.kornilov at gmail.com
Mon Aug 12 13:05:02 UTC 2019


вс, 11 авг. 2019 г. в 22:10, Mark Kettenis <mark.kettenis at xs4all.nl>:
>
> > From: "Matwey V. Kornilov" <matwey.kornilov at gmail.com>
> > Date: Sun, 11 Aug 2019 11:06:02 +0300
> >
> > 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 u-boot-tpl-with-spl.img target
> > which is the TPL image followed by the SPL binary.
>
> Nice.  Only comment/question I have is whether we should go with your
> name (which fits well with the way we name other U-Boot components) or
> use idbloader.img which is the name used in some external
> documentation such as:
>
>   http://opensource.rock-chips.com/wiki_Boot_option

I think it is for maintainers to decide.

What does idb in "idbloader" stands for?

>
> Cheers,
>
> Mark
>
> > Signed-off-by: Matwey V. Kornilov <matwey.kornilov at gmail.com>
> > ---
> >  Makefile | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/Makefile b/Makefile
> > index 8513db94e3..4d70b6ac2e 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 += u-boot-tpl-with-spl.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)
> > +u-boot-tpl-with-spl.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
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot



-- 
With best regards,
Matwey V. Kornilov


More information about the U-Boot mailing list