public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 11/11] sunxi: Add limit with the MMC environment
Date: Fri, 5 Jan 2018 10:33:00 +0100	[thread overview]
Message-ID: <20180105093300.2cv27knspjshulca@flea.lan> (raw)
In-Reply-To: <CAD6G_RTqXsTpCoK_qq73oXn=XwM4T4rGesd603A1e6iBQfb5EQ@mail.gmail.com>

On Fri, Dec 22, 2017 at 02:34:35PM +0530, Jagan Teki wrote:
> On Fri, Dec 22, 2017 at 2:18 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Thu, Dec 21, 2017 at 10:52:04PM +0000, André Przywara wrote:
> >> Hi,
> >>
> >> On 21/12/17 12:40, Maxime Ripard wrote:
> >> > The MMC environment offset is getting very close to the end of the U-Boot
> >> > binary now. Since we want to make sure this will not overflow, add a size
> >> > limit in the board for arm64. arm32 has already that limit enforced in our
> >> > custom image generation.
> >> >
> >> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >> > ---
> >> >  include/configs/sunxi-common.h | 10 ++++++++++
> >> >  1 file changed, 10 insertions(+)
> >> >
> >> > diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> >> > index 3855c564f914..6236e129a89d 100644
> >> > --- a/include/configs/sunxi-common.h
> >> > +++ b/include/configs/sunxi-common.h
> >> > @@ -147,6 +147,16 @@
> >> >  #endif
> >> >
> >> >  #if defined(CONFIG_ENV_IS_IN_MMC)
> >> > +
> >> > +#ifdef CONFIG_ARM64
> >>
> >> Why is that? Isn't the limit applicable to all sunxi boards using MMC
> >> env? Maybe that's actually the better check (thanks for digging this up,
> >> btw)? I guess this would avoid to break compatibility with older
> >> sunxi-fel versions (those provided by distros not carrying your fix),
> >> also avoids blowing up u-boot-sunxi-with-spl.bin to 504K always?
> >>
> >> Or does this break anything on 32-bit boards?
> >
> > So there's a couple of arguments there, which are probably all a bit
> > weak, but the sum of them made me do it that way:
> >   - I tried to keep the changes as minimal as possible since it's
> >     going to be fixes, in one of the late -rc's. We know that the
> >     arm32 part works, so I didn't really want to disrupt that.
> >   - It's not really optimal, as the expression is used directly in the
> >     Makefile and therefore any arithmetic operations can't really be
> >     done. The arm32 part can, and is therefore correct in all
> >     cases. Here we just bet that the user will never have changed one
> >     of the values.
> 
> Based on the previous conversion, 2018.05 or future version will
> increase the u-boot partition size. Do we really need this in between
> which will anyway removed.

Yes, otherwise we might end up again in a situation where we'll allow
the compilation of a broken binary.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180105/09db40d8/attachment.sig>

  reply	other threads:[~2018-01-05  9:33 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-21 12:40 [U-Boot] [PATCH 00/11] sunxi: arm64 binary size fixes Maxime Ripard
2017-12-21 12:40 ` [U-Boot] [PATCH 01/11] cmd: crc32: Disable by default on sunXi Maxime Ripard
2017-12-21 14:50   ` Andre Przywara
2017-12-22  9:16     ` Jagan Teki
2018-01-05  9:54     ` Maxime Ripard
2018-01-10  6:17   ` Jagan Teki
2018-01-11 17:54   ` Jagan Teki
2018-01-11 18:41     ` Tom Rini
2018-01-12  9:00       ` Maxime Ripard
2018-01-12  8:56     ` Maxime Ripard
2018-01-12 11:33       ` Jagan Teki
2017-12-21 12:40 ` [U-Boot] [PATCH 02/11] cmd: unzip: " Maxime Ripard
2018-01-10  6:19   ` Jagan Teki
2017-12-21 12:40 ` [U-Boot] [PATCH 03/11] cmd: loadb: " Maxime Ripard
2018-01-10  6:20   ` Jagan Teki
2017-12-21 12:40 ` [U-Boot] [PATCH 04/11] cmd: loads: " Maxime Ripard
2018-01-10  6:21   ` Jagan Teki
2017-12-21 12:40 ` [U-Boot] [PATCH 05/11] cmd: misc: " Maxime Ripard
2017-12-21 14:50   ` Andre Przywara
2018-01-10  6:22   ` Jagan Teki
2017-12-21 12:40 ` [U-Boot] [PATCH 06/11] video: bpp8: " Maxime Ripard
2017-12-21 14:37   ` Andre Przywara
2017-12-21 16:01   ` Anatolij Gustschin
2018-01-10  6:23     ` Jagan Teki
2017-12-21 12:40 ` [U-Boot] [PATCH 07/11] video: bpp16: " Maxime Ripard
2017-12-21 14:38   ` Andre Przywara
2017-12-21 16:12   ` Anatolij Gustschin
2018-01-10  6:23     ` Jagan Teki
2017-12-21 12:40 ` [U-Boot] [PATCH 08/11] net: regex: " Maxime Ripard
2017-12-21 16:05   ` Andre Przywara
2018-01-10  6:25     ` Jagan Teki
2017-12-21 12:40 ` [U-Boot] [PATCH 09/11] sunxi: imply CONFIG_OF_LIBFDT_OVERLAY Maxime Ripard
2018-01-10  6:27   ` Jagan Teki
2017-12-21 12:40 ` [U-Boot] [PATCH 10/11] Makefile: Add size check to the u-boot.itb make target Maxime Ripard
2017-12-21 12:40 ` [U-Boot] [PATCH 11/11] sunxi: Add limit with the MMC environment Maxime Ripard
2017-12-21 22:52   ` André Przywara
2017-12-22  8:48     ` Maxime Ripard
2017-12-22  9:04       ` Jagan Teki
2018-01-05  9:33         ` Maxime Ripard [this message]
2017-12-21 12:56 ` [U-Boot] [PATCH 00/11] sunxi: arm64 binary size fixes Tom Rini
2018-01-04  5:28 ` Jagan Teki
2018-01-05 10:00   ` Maxime Ripard
2018-01-05 10:16     ` Jagan Teki

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=20180105093300.2cv27knspjshulca@flea.lan \
    --to=maxime.ripard@free-electrons.com \
    --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