mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/3] ARM: i.MX: Add max_load_size option to boards that will need it
Date: Thu, 29 Nov 2018 22:11:47 -0800	[thread overview]
Message-ID: <CAHQ1cqG4FSRnz_UkihPP-1mswx=hw=9V92-vS=tnF+oW5WmSVQ@mail.gmail.com> (raw)
In-Reply-To: <20181120084100.8737-3-s.hauer@pengutronix.de>

On Tue, Nov 20, 2018 at 8:04 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
> The max_load_size option makes sure that only the portion of the image
> is loaded to SRAM that fits into it.
>
> Note this does not cover the whole available SRAM area for all boards,
> for the bigger SRAM areas only a part is chosen that is enough to fit
> the initial loader in.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/boards/cm-fx6/flash-header-mx6-cm-fx6.imxcfg            | 1 +
>  arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg    | 1 +
>  .../flash-header-technexion-wandboard.imxcfg                     | 1 +
>  arch/arm/boards/zii-imx6q-rdu2/flash-header-rdu2.imxcfg          | 1 +
>  4 files changed, 4 insertions(+)
>
> diff --git a/arch/arm/boards/cm-fx6/flash-header-mx6-cm-fx6.imxcfg b/arch/arm/boards/cm-fx6/flash-header-mx6-cm-fx6.imxcfg
> index 400a870154..9e8dce5877 100644
> --- a/arch/arm/boards/cm-fx6/flash-header-mx6-cm-fx6.imxcfg
> +++ b/arch/arm/boards/cm-fx6/flash-header-mx6-cm-fx6.imxcfg
> @@ -1,3 +1,4 @@
>  soc imx6
>  loadaddr 0x00907000
> +max_load_size 0x11000
>  dcdofs 0x400
> diff --git a/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg b/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
> index a12c28fceb..14e4a595a0 100644
> --- a/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
> +++ b/arch/arm/boards/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg
> @@ -1,4 +1,5 @@
>  soc imx8mq
>
>  loadaddr 0x007E1000
> +max_load_size 0x10000
>  dcdofs 0x400
> diff --git a/arch/arm/boards/technexion-wandboard/flash-header-technexion-wandboard.imxcfg b/arch/arm/boards/technexion-wandboard/flash-header-technexion-wandboard.imxcfg
> index 33621117d4..68cb08e200 100644
> --- a/arch/arm/boards/technexion-wandboard/flash-header-technexion-wandboard.imxcfg
> +++ b/arch/arm/boards/technexion-wandboard/flash-header-technexion-wandboard.imxcfg
> @@ -1,3 +1,4 @@
>  loadaddr 0x00907000
>  soc imx6
> +max_load_size 0x11000
>  dcdofs 0x400
> diff --git a/arch/arm/boards/zii-imx6q-rdu2/flash-header-rdu2.imxcfg b/arch/arm/boards/zii-imx6q-rdu2/flash-header-rdu2.imxcfg
> index 400a870154..9e8dce5877 100644
> --- a/arch/arm/boards/zii-imx6q-rdu2/flash-header-rdu2.imxcfg
> +++ b/arch/arm/boards/zii-imx6q-rdu2/flash-header-rdu2.imxcfg
> @@ -1,3 +1,4 @@
>  soc imx6
>  loadaddr 0x00907000
> +max_load_size 0x11000

Sascha:

The change above bricks Barebox on RDU2 because load size of 0x11000
isn't enough. Tracing what hdr->boot_data.size was set to prior to
this series ends up with 0x1d000 as a number, using which appears to
fix the problem on the real board, so we probably should max_load_size
to at least that much. I am hoping you can fix it on your end, but let
me know if you need me to generate a fixup patch.

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-11-30  6:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20  8:40 [PATCH 0/3] ARM: images: Use piggydata Sascha Hauer
2018-11-20  8:40 ` [PATCH 1/3] scripts: imx-image: Add support for max_load_size option Sascha Hauer
2018-11-20  8:40 ` [PATCH 2/3] ARM: i.MX: Add max_load_size option to boards that will need it Sascha Hauer
2018-11-30  6:11   ` Andrey Smirnov [this message]
2018-11-30  7:35     ` Sascha Hauer
2018-12-01  0:34       ` Andrey Smirnov
2018-11-20  8:41 ` [PATCH 3/3] ARM: images: use piggydata Sascha Hauer
2019-01-14 16:34 ` [PATCH 0/3] ARM: images: Use piggydata Roland Hieber
2019-01-14 17:22   ` Sam Ravnborg

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='CAHQ1cqG4FSRnz_UkihPP-1mswx=hw=9V92-vS=tnF+oW5WmSVQ@mail.gmail.com' \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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