summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2016-10-13 20:03:33 -0400
committerTom Rini <trini@konsulko.com>2016-10-13 20:03:33 -0400
commit4504062b271bf4d1cf256e4e87e156de6029e088 (patch)
treea0cac720a2687f2ed4ccf15f473d06bb7c8dcb07 /cmd
parent44afdc4a12b9f6f48338e7975e4f08cfe90dba74 (diff)
parent42b7600d62ae288a8c12431d232b89b26ec61721 (diff)
Merge git://git.denx.de/u-boot-fdt
Diffstat (limited to 'cmd')
-rw-r--r--cmd/fdt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 58af7727ba..b503357dc3 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -662,7 +662,12 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#endif
/* resize the fdt */
else if (strncmp(argv[1], "re", 2) == 0) {
- fdt_shrink_to_minimum(working_fdt);
+ uint extrasize;
+ if (argc > 2)
+ extrasize = simple_strtoul(argv[2], NULL, 16);
+ else
+ extrasize = 0;
+ fdt_shrink_to_minimum(working_fdt, extrasize);
}
else {
/* Unrecognized command */
@@ -1056,7 +1061,7 @@ static char fdt_help_text[] =
"fdt systemsetup - Do system-specific set up\n"
#endif
"fdt move <fdt> <newaddr> <length> - Copy the fdt to <addr> and make it active\n"
- "fdt resize - Resize fdt to size + padding to 4k addr\n"
+ "fdt resize [<extrasize>] - Resize fdt to size + padding to 4k addr + some optional <extrasize> if needed\n"
"fdt print <path> [<prop>] - Recursive print starting at <path>\n"
"fdt list <path> [<prop>] - Print one level starting at <path>\n"
"fdt get value <var> <path> <prop> - Get <property> and store in <var>\n"