[U-Boot-Users] [PATCH] fix compilation problem for mpc8349itx CFG_RAMBOOT

Wolfgang Grandegger wg at grandegger.com
Thu May 24 21:43:03 CEST 2007


Jon Loeliger wrote:
> On Thu, 2007-05-24 at 07:36, Wolfgang Denk wrote:
>> Dear Nikita,
>>
>> in message <200705241210.19623 at zigzag.lvk.cs.msu.su> you wrote:
>>>> * all commands except foo, bar and baz
>>> #include "define_all_cmds.h"
>>> #undef CONFIG_CMD_FOO
>>> #undef CONFIG_CMD_BAR
>>> #undef CONFIG_CMD_BAZ
>>>
>>>> * all default commands plus foo, but without baz
>>> #include "define_default_cmds.h"
>>> #define CONFIG_CMD_FOO
>>> #undef CONFIG_CMD_BAZ
>>>
>>>> I guess then you will have to  list  up  all  commands  you  want  to
>>>> include  somewhere  -  either  in  the board onfig file or in another
>>>> header file.
>>> Sure - in separate headers files. I see no problems here. It scales.
>> Good idea. Shall we go for that?
>>
>> Any other opinions, ACKs or NACKs?
> 
> I am, in general, in favor of the approach.
> 
> We should be a bit cautious though.
> In this example:
> 
> #include "define_default_cmds.h"
> #define CONFIG_CMD_FOO
> #undef CONFIG_CMD_BAZ
> 
> it is likely that this should rather be:
> 
> #include "define_default_cmds.h"
> #ifndef CONFIG_CMD_FOO
> #define CONFIG_CMD_FOO
> #endif
> #undef CONFIG_CMD_BAZ
> 
> or
> 
> #include "define_default_cmds.h"
> #undef CONFIG_CMD_FOO
> #define CONFIG_CMD_FOO
> #undef CONFIG_CMD_BAZ
> 
> just in case CONFIG_CMD_FOO is previously defined
> to something non-empty like "1" or so.

Then it should be removed from the config file because it is obviously 
already defined.

Wolfgang.




More information about the U-Boot mailing list