Md for linux

From HDebugWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Linux shell macros to access /dev/mem with commands similar to U-Boot's U-Boot Memory Display

Download and Install

wget http://hdebug.com/Fedora/f23/mmraw_e6500.tgz

  1. untar it.
  2. put the binaries: mmrraw, mmwraw, mmcpraw, and strtoulx in the path (/usr/local/bin)
  3. source the correct script to define the shell functions:
    • if using bash:
    source define_md.bashrc and define_raw_mmraw.bashrc
    • If using sh:
    source define_md.rc and define_raw_mmraw.rc

Example

[root@t4 mmraw_e6500]# bash
[root@t4 mmraw_e6500]# source define_md.bashrc; source define_raw_mmraw.bashrc
[root@t4 mmraw_e6500]# PATH=$PWD:$PATH
# ccsrbar
[root@t4 mmraw_e6500]# md ffe000000 100
000000 0000000f fe000000 00000000 00000000  >................<
000010 00000000 00000000 00000000 00000000  >................<
000020 00000000 7ffff000 8170000b 00000000  >.........p......<
000030 00000000 00000000 01e00000 00000000  >................<
000040 00000000 00000000 00000000 00000000  >................<
*
000100
# laws
[root@t4 mmraw_e6500]# md ffe000c00 400
000000 0000000f e0000000 81f0001b 00000000  >................<
000010 0000000f f4000000 81800018 00000000  >................<
000020 0000000f f6000000 83c00018 00000000  >................<
000030 0000000f ffdf0000 81f0000b 00000000  >................<
000040 0000000f 00000000 81d00018 00000000  >................<
000050 0000000f ff800000 81f0000f 00000000  >................<
000060 0000000c 00000000 8000001c 00000000  >................<
000070 0000000f f8000000 8000000f 00000000  >................<
000080 0000000c 40000000 8020001c 00000000  >....@.... ......<
000090 0000000f f8020000 8020000f 00000000  >......... ......<
0000a0 00000000 00000000 00000000 00000000  >................<
*
0001e0 00000004 00000000 81700020 00000000  >.........p. ....<
0001f0 00000000 00000000 81700021 00000000  >.........p.!....<
000200 00000000 00000000 00000000 00000000  >................<
*
000400
# pcie1
[root@t4 mmraw_e6500]# md ffe240000 1000
000000 8000003c ff010000 00000000 0013ffff  >...<............<
000010 0400ffff 00080028 00000000 00000000  >.......(........<
000020 00000000 00000000 000cffff 00000000  >................<
000030 00000000 00000000 00000000 00000000  >................<
000040 00000094 00000000 00000000 00000000  >................<
...
001000


Ed.Swarthout at hdebug.com