busybox devmem
busybox devmem
is my preferred version of devmem2
which was mentioned at: https://unix.stackexchange.com/a/134661/32558
devmem2
came in many different versions from several upstreams, notably Buildroot http://free-electrons.com/pub/mirror/devmem2.c
But a Busybox utility is more canonical, widely available and maintained.
For example,devmem2
was rejected from Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=595805 (but an Ubuntu package was created nevetheless).
You can get it in Ubuntu with:
sudo apt-get install busybox
Usage: read 4 bytes from the physical address 0x12345678
:
sudo busybox devmem 0x12345678
Write 0x9abcdef0
to that address:
sudo busybox devmem 0x12345678 w 0x9abcdef0
Here are some cool ways to test devmem
out: https://stackoverflow.com/questions/12040303/accessing-physical-address-from-user-space/45127890#45127890