From: Heiko Stuebner <heiko@sntech.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 0/8] rockchip: mkimage: refactor rksd/rkspi padding calculation and add dumpimage support
Date: Fri, 19 May 2017 20:39:48 +0200 [thread overview]
Message-ID: <1828214.9pp2RnOGsf@phil> (raw)
In-Reply-To: <278C1B25-CF8D-48C7-AAB6-F2702687928B@theobroma-systems.com>
Hi Philipp,
Am Mittwoch, 17. Mai 2017, 12:12:51 CEST schrieb Dr. Philipp Tomsich:
> What are the requirements for BACK_TO_BROM?
> All I can see about how BACK_TO_BROM works is that it needs to save the register
> context on the stack for returning to the ROM, but that seems to be only half the story.
>
> Assuming that the header0 structure plays into this, the only significant change there
> is that I don’t set the 'hdr->init_boot_size’ to the maximum SPL size any longer...
Which is most likely the problem. back_to_bootrom-images are concatenated
with the spl in front (init_size) and when returned to the bootrom it
reads the rest up to init_boot_size into the sdram.
So ideally we would return that line back to RK_MAX_BOOT_SIZE (512KB).
Somewhat safe value and boards not using back_to_bootrom, as this value
really only affects that second stage and not the actual spl loading.
I'm sadly away from my boardfarm this and next week, so testing bootloader
on my rk3188 board can only happend after that, but I'm somewhat
confident that this would solve the problem. Maybe Kever can test that
meanwhile.
Heiko
>
> Regards,
> Philipp.
>
> > On 17 May 2017, at 11:50, Kever Yang <kever.yang@rock-chips.com> wrote:
> >
> > Hi Philipp,
> >
> > This patch makes all the Rockchip SoCs with BACK_TO_BROM enabled can not work,
> >
> > does the size correct for the SPL correct?
> >
> > Thanks,
> > - Kever
> > On 04/17/2017 11:47 PM, Philipp Tomsich wrote:
> >> We support booting both from SD/MMC images and SPI images on the
> >> RK3399-Q7 for different use-cases (e.g. external boot in development
> >> from the SD card, internal boot from MMC or SPI depending on whether
> >> the SPI flash is populated on any given configuration option).
> >>
> >> In getting the SPI image support ready for production, we found a
> >> few areas that warranted improvements:
> >> - we had broken SPI bootstrap earlier in the changes introducting
> >> boot0-style images for the RK3399 (this needed fixing)
> >> - in fixing the broken SPI padding calculation, it became apparent
> >> that it's best to refactor and document things before we make
> >> the same mistake again in the future
> >> - with both SD/MMC and SPI images being used for various purposes
> >> by various people, the wrong image style was inadvertendly used
> >> in some tests... so we support for 'dumpimage' (i.e. verify_header
> >> and print_header) had to be added to quickly check the image
> >> type being handled
> >>
> >> Note that with the refactored calculation of the image-size, we
> >> don't pad the image to the maximum SPL size any longer, but pad
> >> SD/MMC to the next 512 byte block (RK_BLK_SIZE) and SPI to the
> >> next 2K boundary.
> >>
> >>
> >> Philipp Tomsich (8):
> >> rockchip: mkimage: rkspi: include the header sector in the SPI size
> >> calculation
> >> rockchip: mkimage: rewrite padding calculation for SD/MMC and SPI
> >> images
> >> rockchip: mkimage: Update comments for header size
> >> rockchip: mkimage: rksd: pad SD/MMC images to a full blocksize
> >> rockchip: mkimage: clarify header0 initialisation
> >> rockchip: mkimage: play nice with dumpimage
> >> rockchip: mkimage: remove placeholder functions from rkimage
> >> rockchip: mkimage: add support for verify_header/print_header
> >>
> >> tools/rkcommon.c | 195 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
> >> tools/rkcommon.h | 29 ++++++++-
> >> tools/rkimage.c | 21 +-----
> >> tools/rksd.c | 47 +++++---------
> >> tools/rkspi.c | 62 +++++++++---------
> >> 5 files changed, 255 insertions(+), 99 deletions(-)
> >>
> >
> >
>
>
>
next prev parent reply other threads:[~2017-05-19 18:39 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-17 15:47 [U-Boot] [PATCH v1 0/8] rockchip: mkimage: refactor rksd/rkspi padding calculation and add dumpimage support Philipp Tomsich
2017-04-17 15:48 ` [U-Boot] [PATCH v1 1/8] rockchip: mkimage: rkspi: include the header sector in the SPI size calculation Philipp Tomsich
2017-04-18 4:00 ` Simon Glass
2017-04-20 21:06 ` Simon Glass
2017-04-17 15:48 ` [U-Boot] [PATCH v1 2/8] rockchip: mkimage: rewrite padding calculation for SD/MMC and SPI images Philipp Tomsich
2017-04-18 4:00 ` Simon Glass
2017-04-20 21:06 ` Simon Glass
2017-04-17 15:48 ` [U-Boot] [PATCH v1 3/8] rockchip: mkimage: Update comments for header size Philipp Tomsich
2017-04-18 4:00 ` Simon Glass
2017-04-20 21:06 ` Simon Glass
2017-04-17 15:48 ` [U-Boot] [PATCH v1 4/8] rockchip: mkimage: rksd: pad SD/MMC images to a full blocksize Philipp Tomsich
2017-04-18 4:00 ` Simon Glass
2017-04-20 21:06 ` Simon Glass
2017-05-27 7:12 ` Andy Yan
2017-04-17 15:48 ` [U-Boot] [PATCH v1 5/8] rockchip: mkimage: clarify header0 initialisation Philipp Tomsich
2017-04-18 4:00 ` Simon Glass
2017-04-20 21:06 ` Simon Glass
2017-05-27 6:58 ` Andy Yan
2017-04-17 15:48 ` [U-Boot] [PATCH v1 6/8] rockchip: mkimage: play nice with dumpimage Philipp Tomsich
2017-04-18 4:01 ` Simon Glass
2017-04-17 15:48 ` [U-Boot] [PATCH v1 7/8] rockchip: mkimage: remove placeholder functions from rkimage Philipp Tomsich
2017-04-18 4:00 ` Simon Glass
2017-04-20 21:06 ` Simon Glass
2017-04-17 15:48 ` [U-Boot] [PATCH v1 8/8] rockchip: mkimage: add support for verify_header/print_header Philipp Tomsich
2017-04-18 4:00 ` Simon Glass
2017-05-17 9:50 ` [U-Boot] [PATCH v1 0/8] rockchip: mkimage: refactor rksd/rkspi padding calculation and add dumpimage support Kever Yang
2017-05-17 10:12 ` Dr. Philipp Tomsich
2017-05-19 18:39 ` Heiko Stuebner [this message]
2017-05-19 18:44 ` Dr. Philipp Tomsich
2017-05-19 18:46 ` Heiko Stuebner
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=1828214.9pp2RnOGsf@phil \
--to=heiko@sntech.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox