common: bootm: improve decompess image message
Make it more meaningful. Signed-off-by: Joseph Chen <chenjh@rock-chips.com> Change-Id: Ie26745d6c007cc1bae91ebf2fad88feb1742e8bb
This commit is contained in:
parent
622ccf343f
commit
98de7945ac
|
|
@ -299,14 +299,26 @@ static int bootm_find_other(cmd_tbl_t *cmdtp, int flag, int argc,
|
|||
* @comp_type: Compression type being used (IH_COMP_...)
|
||||
* @is_xip: true if the load address matches the image start
|
||||
*/
|
||||
static void print_decomp_msg(int comp_type, int type, bool is_xip)
|
||||
static void print_decomp_msg(int comp_type, int type, bool is_xip,
|
||||
ulong src, ulong dst)
|
||||
{
|
||||
const char *name = genimg_get_type_name(type);
|
||||
const char *comp_name[] = {
|
||||
[IH_COMP_NONE] = "",
|
||||
[IH_COMP_GZIP] = "GZIP",
|
||||
[IH_COMP_BZIP2] = "BZIP2",
|
||||
[IH_COMP_LZMA] = "LZMA",
|
||||
[IH_COMP_LZO] = "LZO",
|
||||
[IH_COMP_LZ4] = "LZ4",
|
||||
[IH_COMP_ZIMAGE]= "ZIMAGE",
|
||||
};
|
||||
|
||||
if (comp_type == IH_COMP_NONE)
|
||||
printf(" %s %s ... ", is_xip ? "XIP" : "Loading", name);
|
||||
printf(" %s %s from 0x%08lx to 0x%08lx ... ",
|
||||
is_xip ? "XIP" : "Loading", name, src, dst);
|
||||
else
|
||||
printf(" Uncompressing %s ... ", name);
|
||||
printf(" Uncompressing %s %s from 0x%08lx to 0x%08lx ... ",
|
||||
comp_name[comp_type], name, src, dst);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -379,7 +391,8 @@ int bootm_decomp_image(int comp, ulong load, ulong image_start, int type,
|
|||
int ret = 0;
|
||||
|
||||
*load_end = load;
|
||||
print_decomp_msg(comp, type, load == image_start);
|
||||
print_decomp_msg(comp, type, load == image_start,
|
||||
(ulong)image_buf, (ulong)load_buf);
|
||||
|
||||
/*
|
||||
* Load the image to the right place, decompressing if needed. After
|
||||
|
|
@ -454,7 +467,10 @@ int bootm_decomp_image(int comp, ulong load, ulong image_start, int type,
|
|||
return handle_decomp_error(comp, image_len, unc_len, ret);
|
||||
*load_end = load + image_len;
|
||||
|
||||
puts("OK\n");
|
||||
if (comp == IH_COMP_NONE || comp == IH_COMP_ZIMAGE)
|
||||
puts("OK\n");
|
||||
else
|
||||
printf("with %08lx bytes OK\n", image_len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue