[U-Boot] [PATCH v2] pico-imx7d: Increase the CONFIG_ENV_OFFSET size

Wolfgang Denk wd at denx.de
Fri Nov 30 13:12:57 UTC 2018


Dear Fabio,

In message <CAOMZO5B3Dbub=XVMLKgDUQhkS7to8YsJeqsBmJE56y+itA2aMg at mail.gmail.com> you wrote:
> 
> > I find this hard to read: (12 * SZ_64K). Wouldn't (768 * SZ_1K) be
> > better?
...
> The only issue I see with this approach is that it does not accept
> expressions like (768 * SZ_1K):

This is why I always prefer to use expressions that are both
readable and computable, like (768 << 10).

> #define CONFIG_ENV_OFFSET 786432

Would

#define CONFIG_ENV_OFFSET (768 << 10)

or at least

#define CONFIG_ENV_OFFSET (768 * 1024)

work?

> /* Detect overlap between U-Boot image and environment area in build-time */
> #define CONFIG_BOARD_SIZE_LIMIT CONFIG_ENV_OFFSET

Note this is only correct if the U-Boot image gets written at offset
zero - is this the case?

> IMHO it is better to get an error in build time when U-Boot and env
> area overlaps than providing a pretty CONFIG_ENV_OFFSET format :-)

Agreed!

[Please ignore my previous message - working through the list
sequentially is not optimal...]

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"My name is Linus Torvalds, you messed with my kernel, prepare to die"
                                                  - Linus Torvalds in
      <Pine.LNX.3.91.960426110644.24860I-100000 at linux.cs.Helsinki.FI>


More information about the U-Boot mailing list