[U-Boot] [PATCH 03/12] board_f: Don't require CONFIG_SYS_MONITOR_BASE

Simon Glass sjg at chromium.org
Thu May 19 05:59:00 CEST 2016


Hi Andreas,

On 18 May 2016 at 01:34, Andreas Bießmann <andreas at biessmann.org> wrote:
> Hi Simon,
>
> On 2016-05-15 02:49, Simon Glass wrote:
>>
>> Allow this to be unset, such that gd->mon_len is invalid. This seems to be
>> what the sh architecture does.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> ---
>>
>>  common/board_f.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/common/board_f.c b/common/board_f.c
>> index 109025a..d405b5b 100644
>> --- a/common/board_f.c
>> +++ b/common/board_f.c
>> @@ -274,7 +274,7 @@ static int setup_mon_len(void)
>>         gd->mon_len = CONFIG_SYS_MONITOR_LEN;
>>  #elif defined(CONFIG_NDS32)
>>         gd->mon_len = (ulong)(&__bss_end) - (ulong)(&_start);
>> -#else
>> +#elif defined(CONFIG_SYS_MONITOR_BASE)
>>         /* TODO: use (ulong)&__bss_end - (ulong)&__text_start; ? */
>>         gd->mon_len = (ulong)&__bss_end - CONFIG_SYS_MONITOR_BASE;
>
>
> before this produced an compile error for undefiend CONFIG_SYS_MONITOR_BASE,
> now it will be silently ignored. Why not leave the else case and use the
> TODO statement instead?

Yes that seems better. I'm a bit tired of the complexity here. Perhaps
I should add #error for the #else case?

> At best we should equalize the linker files and remove the whole ifdiffery
> here.

Yes that needs to be done. More people should contribute to this sort
of clean-up. It's a bit tedious but not super-hard.

Regards,
Simon


More information about the U-Boot mailing list