
When i do a memtest without any args, it crashes after printing the first line.
=> mtest Pattern 00000000 Writing...
After reboot, when i do and md for the base address 0x0, i get the following, which proabbly is the uboot image itself in RAM.
Not exactly. At address 0 you have the internal boot ROM. That code is not u-boot, as you can see from comparing with the u-boot.bin you compiled.
Actually, your ram start at 2GB physical (CSD0_BASE, 0x80000000) but the MX31 config file in current git says:
#define CONFIG_SYS_MEMTEST_START 0 /* memtest works on */ #define CONFIG_SYS_MEMTEST_END 0x10000
So, most likely memtest without arguments has never been used on the board.
[disclaimer: I have mx21 but not mx31, I just assume it's similar]
/alessandro