From 8ee652a86a0d1a657e7d7332807f3a192776fede Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Fri, 7 Oct 2016 16:37:59 +0200 Subject: move memtool from $prefix/sbin to $prefix/bin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit memtool can be useful for non-root users, too, so simplify running it. Signed-off-by: Uwe Kleine-König --- Makefile.am | 4 ++-- memtool.1 | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ memtool.8 | 78 ------------------------------------------------------------- 3 files changed, 80 insertions(+), 80 deletions(-) create mode 100644 memtool.1 delete mode 100644 memtool.8 diff --git a/Makefile.am b/Makefile.am index 778d241..3de789d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ EXTRA_DIST = README.devel -sbin_PROGRAMS = memtool +bin_PROGRAMS = memtool memtool_SOURCES = memtool.c -dist_man_MANS = memtool.8 +dist_man_MANS = memtool.1 diff --git a/memtool.1 b/memtool.1 new file mode 100644 index 0000000..f18ba12 --- /dev/null +++ b/memtool.1 @@ -0,0 +1,78 @@ +.TH memtool "1" "December 2015" "memtool - display and modify memory" +.SH NAME +memtool \- display and modify memory +.SH SYNOPSIS +.B memtool md +.RB [\| \-b \||\| \-w \||\| \-l \||\| \-q \|] +.RB [\| \-x \|] +.RB [\| \-s +.IR filename \|] +.I region +.br +.B memtool mw +.RB [\| \-b \||\| \-w \||\| \-l \||\| \-q \|] +.RB [\| \-d +.IR filename \|] +.I start +.I data... + +.SH DESCRIPTION +memtool allows one to read and write regions of files. When applied to +.I /dev/mem +(which is the default file) the regions represent memory mapped registers. +.PP +There are currently two subcommands: +.B mw +to write to memory/a file; and +.B md +to read from memory/a file. + +Note that on some machines there are alignment restrictions that forbid for +example to read a word from an address that is not word aligned. memtool +doesn't try to be smart here but simply tries what is requested by the caller. +This might result in all kind of errors which are not considered to be a bug of +the tool, but either the machine or the caller. + +.SH OPTIONS +.TP +.B \-b +Use byte wise (8-bit) access +.TP +.B \-w +Use word wise (16-bit) access +.TP +.B \-l +Use long wise (32-bit) access +.TP +.BR \-q +Use quad wise (64-bit) access +.TP +\fB\-d \fIfilename +Write to +.IR filename . +.TP +\fB\-s \fIfilename +Read from +.IR filename . +.TP +.B \-x +Swap bytes at output + +.SH REGIONS +Memory regions can be specified in two different forms: +.TP +\fIstart\fR[\fB+\fIsize\fR] +.TP +.IB start \- end +.PP +.I start +specifies the byte offset of the region's beginning, i.e. the first included +address. +.I size +specifies the size of the region in bytes and defaults to 0x100. Alternatively +.I end +specifies the offset of the last included address. +Offsets can be specified in decimal or hexadecimal with a prefix 0x. +Additionally you can use suffixes +.BR G ", " M ", and " k , +which multiply by 1024^3, 1024^2, and 1024 respectively. diff --git a/memtool.8 b/memtool.8 deleted file mode 100644 index c79d3cd..0000000 --- a/memtool.8 +++ /dev/null @@ -1,78 +0,0 @@ -.TH memtool "8" "December 2015" "memtool - display and modify memory" -.SH NAME -memtool \- display and modify memory -.SH SYNOPSIS -.B memtool md -.RB [\| \-b \||\| \-w \||\| \-l \||\| \-q \|] -.RB [\| \-x \|] -.RB [\| \-s -.IR filename \|] -.I region -.br -.B memtool mw -.RB [\| \-b \||\| \-w \||\| \-l \||\| \-q \|] -.RB [\| \-d -.IR filename \|] -.I start -.I data... - -.SH DESCRIPTION -memtool allows one to read and write regions of files. When applied to -.I /dev/mem -(which is the default file) the regions represent memory mapped registers. -.PP -There are currently two subcommands: -.B mw -to write to memory/a file; and -.B md -to read from memory/a file. - -Note that on some machines there are alignment restrictions that forbid for -example to read a word from an address that is not word aligned. memtool -doesn't try to be smart here but simply tries what is requested by the caller. -This might result in all kind of errors which are not considered to be a bug of -the tool, but either the machine or the caller. - -.SH OPTIONS -.TP -.B \-b -Use byte wise (8-bit) access -.TP -.B \-w -Use word wise (16-bit) access -.TP -.B \-l -Use long wise (32-bit) access -.TP -.BR \-q -Use quad wise (64-bit) access -.TP -\fB\-d \fIfilename -Write to -.IR filename . -.TP -\fB\-s \fIfilename -Read from -.IR filename . -.TP -.B \-x -Swap bytes at output - -.SH REGIONS -Memory regions can be specified in two different forms: -.TP -\fIstart\fR[\fB+\fIsize\fR] -.TP -.IB start \- end -.PP -.I start -specifies the byte offset of the region's beginning, i.e. the first included -address. -.I size -specifies the size of the region in bytes and defaults to 0x100. Alternatively -.I end -specifies the offset of the last included address. -Offsets can be specified in decimal or hexadecimal with a prefix 0x. -Additionally you can use suffixes -.BR G ", " M ", and " k , -which multiply by 1024^3, 1024^2, and 1024 respectively. -- cgit v1.2.3