summary refs log tree commit diff stats
path: root/hw/arm/boot.c
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@huawei.com>2024-09-03 21:39:40 +0800
committerPeter Maydell <peter.maydell@linaro.org>2024-09-05 13:12:37 +0100
commit2b490f150af4beee10250c8cb0da8a5b66b308e7 (patch)
tree3a6b4995aeac0035ebba474a0e15ab9f28961e4e /hw/arm/boot.c
parent4ab25d1aa6c17f29cac029d91cd5b920e0c2929d (diff)
downloadfocaccia-qemu-2b490f150af4beee10250c8cb0da8a5b66b308e7.tar.gz
focaccia-qemu-2b490f150af4beee10250c8cb0da8a5b66b308e7.zip
hw/arm/boot: Report error msg if loading elf/dtb failed
Print errors before exit. Do not exit silently.

Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Changbin Du <changbin.du@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240903133940.3447430-1-changbin.du@huawei.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm/boot.c')
-rw-r--r--hw/arm/boot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index d480a7da02..6c895e05cb 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -839,6 +839,8 @@ static ssize_t arm_load_elf(struct arm_boot_info *info, uint64_t *pentry,
                       1, data_swab, as);
     if (ret <= 0) {
         /* The header loaded but the image didn't */
+        error_report("Couldn't load elf '%s': %s",
+                     info->kernel_filename, load_elf_strerror(ret));
         exit(1);
     }