File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
board/aarch64/rootfs/usr/share/product/marvell,armada-ap807/etc/support.d Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 22
33set -e
44
5+ SUDO=" "
6+ if [ " $( id -u) " -ne 0 ]; then
7+ if command -v sudo > /dev/null 2>&1 ; then
8+ SUDO=" sudo"
9+ fi
10+ fi
11+
512ecc_stat ()
613{
714 local chan=
@@ -11,10 +18,10 @@ ecc_stat()
1118 base=$(( 0xf0020360 + 0x200 * chan))
1219
1320 echo " DRAM Channel $chan ECC Status"
14- echo -n " Log config: " ; devmem $(( base + 0x0 )) 32
15- echo -n " 1b errors: " ; devmem $(( base + 0x4 )) 32
16- echo -n " Info 0: " ; devmem $(( base + 0x8 )) 32
17- echo -n " Info 1: " ; devmem $(( base + 0xc )) 32
21+ echo -n " Log config: " ; $SUDO devmem $(( base + 0x0 )) 32
22+ echo -n " 1b errors: " ; $SUDO devmem $(( base + 0x4 )) 32
23+ echo -n " Info 0: " ; $SUDO devmem $(( base + 0x8 )) 32
24+ echo -n " Info 1: " ; $SUDO devmem $(( base + 0xc )) 32
1825 echo
1926 done
2027}
You can’t perform that action at this time.
0 commit comments