
Dear Fabio,
In message CAOMZO5B3Dbub=XVMLKgDUQhkS7to8YsJeqsBmJE56y+itA2aMg@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