Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elfloader: make check more intuitive #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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