Extracting Files from a ROM or a ROFS image
The READIMAGE tool enables you to extract a single or a set of files from
a ROM or ROFS image, using the -x
and -z
options.
This helps to validate efficiently the compatibility between the files
extracted from the ROM or ROFS image.
Use the following syntax to extract the files from a ROM or ROFS image:
> readimage
-x
<pattern> [-r] [-z
<path>] <imagename>
where
-
-x <pattern>
is used to extract one or more files
from a ROM or ROFS image into the current directory. For more information, see
Extracting a set of files.
-
-r
is used to recursively extract the files from a ROM
or ROFS image. This option is always used with the -x
option. For
more information, see Extracting a set of files.
-
-z <path>
is used to extract files from a ROM or
ROFS image to the specified location. For more information, see
Extracting all the files.
For more information about using the READIMAGE tool, see the
READIMAGE section.
Extracting all the files
The READIMAGE tool provides the -z <path>
option to
extract all the files from a ROM or ROFS image into a specified location.
For example:
> readimage -z C:\test\
sample.img
This command extracts all the files from sample.img
to the
C:\test
location.
Extracting a set of files
The READIMAGE tool provides the -x
option to extract one
or more files from a ROM or ROFS image, based on a pattern that matches the
name of the file. This pattern contains either a single file name or a file
name with the following wild cards:
-
?
: To match one instance of any character
in a file name, within the directory.
> readimage -x \sys\bin\??.exe
sample.img
This command extracts all the .exe
files from the
\sys\bin
directory present in the sample.img
file,
whose file name consists of two characters.
-
*
: To match zero or more instances of any
character in a file name, within the directory.
> readimage -x \sys\bin\*.exe
sample.img
This command extracts all the .exe
files from the
\sys\bin
directory present in the sample.img
file.
For example:
-
> readimage -x \sys\bin\*.exe
sample.img
This command extracts all the .exe
files from the
\sys\bin
directory present in the sample.img
file,
into the current directory.
-
> readimage -x \sys\bin\*.exe -z C:\test
sample.img
This command extracts all the .exe
files from the
\sys\bin
directory present in the sample.img
file,
into the C:\test
location.
-
> readimage -x \sys\bin\*.dll -r
sample.img
This command extracts all the .dll
files from the
\sys\bin\
directory and its sub-directories present in the
sample.img
file, into the current directory.
Notes: