Skip to content
Snippets Groups Projects
Commit 633939a9 authored by Jonas Höglund's avatar Jonas Höglund
Browse files

Change name to fdtextract.

parent 6cab103f
No related branches found
No related tags found
No related merge requests found
dumpimage fdtextract
*.o *.o
.built .built
.built_check .built_check
...@@ -7,3 +7,4 @@ dumpimage ...@@ -7,3 +7,4 @@ dumpimage
.git_update .git_update
.prepared_* .prepared_*
.pkgdir .pkgdir
ipkg-arm_xscale
...@@ -7,10 +7,10 @@ CFLAGS += -Wextra -std=gnu99 ...@@ -7,10 +7,10 @@ CFLAGS += -Wextra -std=gnu99
LIBS += -lfdt LIBS += -lfdt
dumpimage: dumpimage.o util.o fdtextract: fdtextract.o util.o
$(CC) $(CFLAGS) $(INCLUDE_PATHS) -o $@ $^ $(LIBS) $(CC) $(CFLAGS) $(INCLUDE_PATHS) -o $@ $^ $(LIBS)
clean: clean:
rm -rf *.o rm -rf *.o
rm -rf dumpimage rm -rf fdtextract
Command to extract sub images from FIT images. Command to extract sub images from FIT images.
Dump Images The sub images of the FIT image can be extracted using the fdtextract
In the same way that FIT images are generated, the containing sub images can be extracted as well using dumpimage tool. tool.
The image header files can be listed with the following command:
dumpimage -l image.itb Usage: fdtextract [options] <file>
FIT description: U-Boot fitImage for plnx_aarch64 kernel Options: -[le:o:hV]
Created: Thu Sep 14 17:05:07 2017 -l, --list List images embedded in FIT
Image 0 (kernel@0) -e, --extract <arg> Extract image from FIT
Description: Linux Kernel -o, --out <arg> Outpute image name
Created: Thu Sep 14 17:05:07 2017 -h, --help Print this help and exit
Type: Kernel Image -V, --version Print version and exit
Compression: uncompressed
Data Size: 12263936 Bytes = 11976.50 kB = 11.70 MB
Architecture: AArch64
OS: Linux
Load Address: 0x00080000
Entry Point: 0x00080000
Hash algo: sha1
Hash value: 7e1178ec42f6ae6e39275a04234b0c7d73140f2a
Image 1 (fdt@0)
Description: Flattened Device Tree blob
Created: Thu Sep 14 17:05:07 2017
Type: Flat Device Tree
Compression: uncompressed
Data Size: 30150 Bytes = 29.44 kB = 0.03 MB
Architecture: AArch64
Hash algo: sha1
Hash value: 7f6bd3d535b8b214df392ffd6b2b2bcea058a485
Image 2 (ramdisk@0)
Description: ramdisk
Created: Thu Sep 14 17:05:07 2017
Type: RAMDisk Image
Compression: uncompressed
Data Size: 23563776 Bytes = 23011.50 kB = 22.47 MB
Architecture: AArch64
OS: Linux
Load Address: unavailable
Entry Point: unavailable
Hash algo: sha1
Hash value: c4f32910b03776481e2997e6e86a1a1d26f33a8f
Default Configuration: 'conf@1'
Configuration 0 (conf@1)
Description: Boot Linux kernel with FDT blob + ramdisk
Kernel: kernel@0
Init Ramdisk: ramdisk@0
FDT: fdt@0
An image can be extracted from the ITB using the following command: The image header files can be listed with the following
command:
dumpimage -T flat_dt -p 1 -i image.itb outputfile fdtextract -l /tmp/last.pkgtb
[0]: bootfs_6858_b0+
[1]: nand_squashfs
Extracted: An image can be extracted from the FIT using the following command:
Image 1 (fdt@0)
Description: Flattened Device Tree blob fdtextract -e bootfs_6858_b0+ /tmp/last.pkgtb -o /tmp/bootfs
Created: Thu Sep 14 17:05:07 2017 Extracting: bootfs_6858_b0+ to /tmp/bootfs
Type: Flat Device Tree
Compression: uncompressed
Data Size: 30150 Bytes = 29.44 kB = 0.03 MB
Architecture: AArch64
Hash algo: sha1
Hash value: 7f6bd3d535b8b214df392ffd6b2b2bcea058a485
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#define MAX_PATH_LEN 100 #define MAX_PATH_LEN 100
/* Usage related data. */ /* Usage related data. */
static const char usage_synopsis[] = "dumpimage [options] <file>"; static const char usage_synopsis[] = "fdtextract [options] <file>";
static const char usage_short_opts[] = "le:o:" USAGE_COMMON_SHORT_OPTS; static const char usage_short_opts[] = "le:o:" USAGE_COMMON_SHORT_OPTS;
static struct option const usage_long_opts[] = { static struct option const usage_long_opts[] = {
{"list", no_argument, NULL, 'l'}, {"list", no_argument, NULL, 'l'},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment