Skip to contentSkip to conversation

test/py: support 'memstart =' in u_boot_utils.find_ram_base()

PATCH In review Daniel Schwierzeck 3 participants 4 messages Jul 6, 2016 – Jul 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test/py: support 'memstart =' in u_boot_utils.find_ram_base()

Some archs like MIPS or PPC have a different 'bdinfo' output than ARM regarding the memory configuration. Also support 'memstart = 0x*' in u_boot_utils.find_ram_base() to make all tests requiring the RAM base working on those archs.

---

 test/py/u_boot_utils.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
test/py/u_boot_utils.py +1 -1
index 6a6b2ec..e4765e3 100644
@@ -201,7 +201,7 @@ def find_ram_base(u_boot_console):
     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:
+            if '-> start' in l or 'memstart    =' in l:
                 ram_base = int(l.split('=')[1].strip(), 16)
                 break
         if ram_base is None:
Signature · 1 line
2.9.0
#1 lore raw

PATCH 1/1 test/py: support 'memstart =' in u_boot_utils.find_ram_base()

Quoted 4 lines · Daniel Schwierzeck

Some archs like MIPS or PPC have a different 'bdinfo' output than ARM regarding the memory configuration. Also support 'memstart = 0x*' in u_boot_utils.find_ram_base() to make all tests requiring the RAM base working on those archs.

... although wouldn't it be better to fix the bdinfo command so that it printed the same thing on all architectures?

#2 lore raw

PATCH 1/1 test/py: support 'memstart =' in u_boot_utils.find_ram_base()

Am 06.07.2016 um 16:37 schrieb Stephen Warren:

Quoted 10 lines · Daniel Schwierzeck
Quoted 4 lines

Some archs like MIPS or PPC have a different 'bdinfo' output than ARM regarding the memory configuration. Also support 'memstart = 0x*' in u_boot_utils.find_ram_base() to make all tests requiring the RAM base working on those archs.

... although wouldn't it be better to fix the bdinfo command so that it printed the same thing on all architectures?

yes, but bdinfo isn't the only one affected. Currently we have two variants in "struct bd_info" of how to store the memory configuration:

- bi_memstart and bi_memsize
- struct bi_dram[CONFIG_NR_DRAM_BANKS] if a board or arch defines CONFIG_NR_DRAM_BANKS

Maybe we could unify this one day. But this requires changes to other commands and generic board init. Until then test/py should support both variants.

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160706/d716974b/attachment.sig>
#3 lore raw
In reply to Daniel Schwierzeck
Quoted 7 lines · Daniel Schwierzeck

Some archs like MIPS or PPC have a different 'bdinfo' output than ARM regarding the memory configuration. Also support 'memstart = 0x*' in u_boot_utils.find_ram_base() to make all tests requiring the RAM base working on those archs.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160709/cbebf5ba/attachment.sig>