Skip to content

Commit

Permalink
elfloader: make check more intuitive
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Heider <[email protected]>
  • Loading branch information
axel-h committed Aug 9, 2024
1 parent fd0a5ec commit 2207f27
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions elfloader-tool/src/arch-arm/smp_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ void non_boot_main(void)
}

/* Do any driver specific non_boot core init */
if (initialise_devices_non_boot()) {
printf("ERROR: Did not successfully return from initialise_devices_non_boot()\n");
int ret = initialise_devices_non_boot();
if (0 != ret) {
printf("ERROR: device initialization failed (%d)\n", ret);
abort();
}

Expand Down
15 changes: 9 additions & 6 deletions elfloader-tool/src/arch-arm/sys_boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,13 @@ void relocate_below_kernel(void)
*/
void main(UNUSED void *arg)
{
int ret;
void *bootloader_dtb = NULL;

/* initialize platform to a state where we can print to a UART */
if (initialise_devices()) {
printf("ERROR: Did not successfully return from initialise_devices()\n");
ret = initialise_devices()
if (0 != ret) {
printf("ERROR: device initialization failed (%d)\n", ret);
abort();
}

Expand Down Expand Up @@ -144,8 +146,8 @@ void main(UNUSED void *arg)

/* Unpack ELF images into memory. */
unsigned int num_apps = 0;
int ret = load_images(&kernel_info, &user_info, 1, &num_apps,
bootloader_dtb, &dtb, &dtb_size);
ret = load_images(&kernel_info, &user_info, 1, &num_apps,
bootloader_dtb, &dtb, &dtb_size);
if (0 != ret) {
printf("ERROR: image loading failed\n");
abort();
Expand Down Expand Up @@ -179,8 +181,9 @@ void continue_boot(int was_relocated)
* driver model so all its pointers are set up properly.
*/
if (was_relocated) {
if (initialise_devices()) {
printf("ERROR: Did not successfully return from initialise_devices()\n");
int ret = initialise_devices()
if (0 != ret) {
printf("ERROR: device initialization failed (%d)\n", ret);
abort();
}
}
Expand Down

0 comments on commit 2207f27

Please sign in to comment.