#include <image-android-dt.h>
#include <common.h>
-enum cmd_dtimg_info {
- CMD_DTIMG_START = 0,
- CMD_DTIMG_SIZE,
+enum cmd_adtimg_info {
+ CMD_ADTIMG_START = 0,
+ CMD_ADTIMG_SIZE,
};
-static int do_dtimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_adtimg_dump(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
char *endp;
ulong hdr_addr;
return CMD_RET_SUCCESS;
}
-static int dtimg_get_fdt(int argc, char * const argv[], enum cmd_dtimg_info cmd)
+static int adtimg_get_fdt(int argc, char * const argv[],
+ enum cmd_adtimg_info cmd)
{
ulong hdr_addr;
u32 index;
return CMD_RET_FAILURE;
switch (cmd) {
- case CMD_DTIMG_START:
+ case CMD_ADTIMG_START:
snprintf(buf, sizeof(buf), "%lx", fdt_addr);
break;
- case CMD_DTIMG_SIZE:
+ case CMD_ADTIMG_SIZE:
snprintf(buf, sizeof(buf), "%x", fdt_size);
break;
default:
- printf("Error: Unknown cmd_dtimg_info value: %d\n", cmd);
+ printf("Error: Unknown cmd_adtimg_info value: %d\n", cmd);
return CMD_RET_FAILURE;
}
return CMD_RET_SUCCESS;
}
-static int do_dtimg_start(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_adtimg_start(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
- return dtimg_get_fdt(argc, argv, CMD_DTIMG_START);
+ return adtimg_get_fdt(argc, argv, CMD_ADTIMG_START);
}
-static int do_dtimg_size(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+static int do_adtimg_size(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
{
- return dtimg_get_fdt(argc, argv, CMD_DTIMG_SIZE);
+ return adtimg_get_fdt(argc, argv, CMD_ADTIMG_SIZE);
}
-static cmd_tbl_t cmd_dtimg_sub[] = {
- U_BOOT_CMD_MKENT(dump, 2, 0, do_dtimg_dump, "", ""),
- U_BOOT_CMD_MKENT(start, 4, 0, do_dtimg_start, "", ""),
- U_BOOT_CMD_MKENT(size, 4, 0, do_dtimg_size, "", ""),
+static cmd_tbl_t cmd_adtimg_sub[] = {
+ U_BOOT_CMD_MKENT(dump, 2, 0, do_adtimg_dump, "", ""),
+ U_BOOT_CMD_MKENT(start, 4, 0, do_adtimg_start, "", ""),
+ U_BOOT_CMD_MKENT(size, 4, 0, do_adtimg_size, "", ""),
};
-static int do_dtimg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_adtimg(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
cmd_tbl_t *cp;
- cp = find_cmd_tbl(argv[1], cmd_dtimg_sub, ARRAY_SIZE(cmd_dtimg_sub));
+ cp = find_cmd_tbl(argv[1], cmd_adtimg_sub, ARRAY_SIZE(cmd_adtimg_sub));
- /* Strip off leading 'dtimg' command argument */
+ /* Strip off leading 'adtimg' command argument */
argc--;
argv++;
}
U_BOOT_CMD(
- dtimg, CONFIG_SYS_MAXARGS, 0, do_dtimg,
+ adtimg, CONFIG_SYS_MAXARGS, 0, do_adtimg,
"manipulate dtb/dtbo Android image",
"dump <addr>\n"
" - parse specified image and print its structure info\n"
" <addr>: image address in RAM, in hex\n"
- "dtimg start <addr> <index> <varname>\n"
+ "adtimg start <addr> <index> <varname>\n"
" - get address (hex) of FDT in the image, by index\n"
" <addr>: image address in RAM, in hex\n"
" <index>: index of desired FDT in the image\n"
" <varname>: name of variable where to store address of FDT\n"
- "dtimg size <addr> <index> <varname>\n"
+ "adtimg size <addr> <index> <varname>\n"
" - get size (hex, bytes) of FDT in the image, by index\n"
" <addr>: image address in RAM, in hex\n"
" <index>: index of desired FDT in the image\n"