summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAKASHI Takahiro <takahiro.akashi@linaro.org>2018-08-01 09:22:28 +0900
committerAKASHI Takahiro <takahiro.akashi@linaro.org>2018-08-01 09:22:28 +0900
commit7c8e4c74b91fad1737deaac0a9b1f5cd08658094 (patch)
treef6c768b47df5a87e235531758b654964d4c29fbe
parentf3b532118aeba7da84c521ac608c60eb9745627c (diff)
downloadkexec-tools-arm64/kexec_file.tar.gz
arm64: add verbose messages for image probingarm64/kexec_file
Without this patch, for instance, kexec_file with Image will generates $ kexec -d -s ... Image ... arch_process_options:171: command_line: ... arch_process_options:173: initrd: (null) arch_process_options:175: dtb: (system's dtb) elf_arm64_probe: Not an ELF executable. $ odd debug messages, just saying "Not an ELF executable," which may easily cause some confusion. So add messages when probe functions detect their own image type. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-rw-r--r--kexec/arch/arm64/kexec-elf-arm64.c1
-rw-r--r--kexec/arch/arm64/kexec-image-arm64.c1
-rw-r--r--kexec/arch/arm64/kexec-uImage-arm64.c4
3 files changed, 6 insertions, 0 deletions
diff --git a/kexec/arch/arm64/kexec-elf-arm64.c b/kexec/arch/arm64/kexec-elf-arm64.c
index 9bc4494..32a41bd 100644
--- a/kexec/arch/arm64/kexec-elf-arm64.c
+++ b/kexec/arch/arm64/kexec-elf-arm64.c
@@ -34,6 +34,7 @@ int elf_arm64_probe(const char *kernel_buf, off_t kernel_size)
goto on_exit;
}
+ dbgprintf("%s: detected an ELF executable.\n", __func__);
result = 0;
on_exit:
free_elf_info(&ehdr);
diff --git a/kexec/arch/arm64/kexec-image-arm64.c b/kexec/arch/arm64/kexec-image-arm64.c
index 685a993..685daf2 100644
--- a/kexec/arch/arm64/kexec-image-arm64.c
+++ b/kexec/arch/arm64/kexec-image-arm64.c
@@ -30,6 +30,7 @@ int image_arm64_probe(const char *kernel_buf, off_t kernel_size)
return -1;
}
+ dbgprintf("%s: detected an Image.\n", __func__);
return 0;
}
diff --git a/kexec/arch/arm64/kexec-uImage-arm64.c b/kexec/arch/arm64/kexec-uImage-arm64.c
index fb05d15..13be818 100644
--- a/kexec/arch/arm64/kexec-uImage-arm64.c
+++ b/kexec/arch/arm64/kexec-uImage-arm64.c
@@ -14,6 +14,10 @@ int uImage_arm64_probe(const char *buf, off_t len)
int ret;
ret = uImage_probe_kernel(buf, len, IH_ARCH_ARM64);
+ if (ret > 0)
+ dbgprintf("%s: detected an uImage.\n", __func__);
+ else
+ dbgprintf("%s: not an uImage or corrupted.\n", __func__);
return ret > 0;
}