[U-Boot] [PATCH 1/2] test/py: move find_ram_base() into u_boot_utils

Simon Glass sjg at chromium.org
Tue Jan 26 02:03:34 CET 2016


Hi Stephen,

On 25 January 2016 at 09:50, Stephen Warren <swarren at wwwdotorg.org> wrote:
> On 01/22/2016 03:30 PM, Wolfgang Denk wrote:
>>
>> Dear Stephen,
>>
>> In message <1453417531-23669-1-git-send-email-swarren at wwwdotorg.org> you
>> wrote:
>>>
>>>
>>> find_ram_base() is a shared utility function, not a core part of the
>>> U-Boot console interaction.
>>
>>
>> On which boards did you test this feature?  Eventually ARM only?
>
>
> It's been tested on a few ARM, sandbox, and at least one microblaze.
>
>>> +    with u_boot_console.log.section('find_ram_base'):
>>> +        response = u_boot_console.run_command('bdinfo')
>>> +        for l in response.split('\n'):
>>> +            if '-> start' in l:
>>> +                ram_base = int(l.split('=')[1].strip(), 16)
>>> +                break
>>
>>
>> Searching for "-> start" is probably not exactly portable.  For
>> example, on a PowerPC system the output of "bdi" might look like this:
>>
>> => bdi
>> memstart    = 0x00000000
>> memsize     = 0x04000000
>
> ...
>>
>>
>> [example is from a TQM5200S, U-Boot 2016.01-00223-gb57843e]
>
>
> Good point. I think the best fix here is to modify all implementations of
> "bdinfo" to print the same information and in the same format as much as
> possible. Do you agree?

Yes - and the best way to do this is to use the same code for all
boards if possible.

BTW I can't apply this patch as the u_boot_utils.py file is missing.
Can you please rebase and resend?

Regards,
Simon


More information about the U-Boot mailing list