[U-Boot-Users] Compile-time flash dependencies (was: PATCH: RPXlite configuration fixes)

Yuli Barcohen yuli at arabellasw.com
Mon Jun 6 19:16:01 CEST 2005

>>>>> Wolfgang Denk writes:

    Yuli> different boards. In real world, CFG_MONITOR_LEN and
    Yuli> CFG_ENV_SECT_SIZE must be specified in compile time so
    Yuli> different flashes can result in

    Wolfgang> You can define a CFG_MONITOR_LEN that matches all
    Wolfgang> supported boards;

It's what I do in my ports.

    Wolfgang> CFG_ENV_SECT_SIZE is more difficult to handle.

    Yuli> different images. I'd like to remove these compile time
    Yuli> values. Any ideas if and how it's possible?

    Wolfgang> The problem is that in the current code a lot of
    Wolfgang> dependency checking is doen at compile time. This is
    Wolfgang> *intentional* to keep the code size minimal. If you can
    Wolfgang> figure out how to avoid #defined CFG_ENV_* settings while
    Wolfgang> *not* increasing the code size

It's what I'm trying to do. I'd like to clarify "increasing the code
size" concern which appears from time to time on the list. As we all
know, U-Boot occupies entire flash sector (or several sectors). So,
IMHO, if the increase does not require additional sector, the increase
should not be a problem. Even if you're concerned about RAM size, I'm
not sure U-Boot size can be an issue. In most cases, there is at least
8MB of RAM, so if U-Boot is 170K or 200K should not make any
difference. I personally never had such an issue with our customers. In
cases when such a difference is critical, current method (compile-time
CFG_ENV_SECT_SIZE) can be used. In any case, I believe that run-time vs
compile-time code size difference can be 2-3K in the worst case.

    Wolfgang> your patches will be welcome.

 Yuli Barcohen       | Phone +972-9-765-1788 |  Software Project Leader
 yuli at arabellasw.com | Fax   +972-9-765-7494 | Arabella Software, Israel

More information about the U-Boot mailing list