Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fdtextract
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
system
fdtextract
Commits
633939a9
Commit
633939a9
authored
4 years ago
by
Jonas Höglund
Browse files
Options
Downloads
Patches
Plain Diff
Change name to fdtextract.
parent
6cab103f
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+2
-1
2 additions, 1 deletion
.gitignore
Makefile
+2
-2
2 additions, 2 deletions
Makefile
README.md
+18
-57
18 additions, 57 deletions
README.md
fdtextract.c
+1
-1
1 addition, 1 deletion
fdtextract.c
with
23 additions
and
61 deletions
.gitignore
+
2
−
1
View file @
633939a9
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
This diff is collapsed.
Click to expand it.
Makefile
+
2
−
2
View file @
633939a9
...
@@ -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
This diff is collapsed.
Click to expand it.
README.md
+
18
−
57
View file @
633939a9
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
This diff is collapsed.
Click to expand it.
dumpimage
.c
→
fdtextract
.c
+
1
−
1
View file @
633939a9
...
@@ -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'
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment