@@ -59,8 +59,7 @@ static void boot_prep_linux_qemu(bootm_headers_t *images)
}
}
-int do_bootm_linux(int flag, int argc, char * const argv[],
- bootm_headers_t *images)
+static void boot_jump_linux_qemu(bootm_headers_t *images)
{
void (*theKernel) (int, char **, char **, int *);
@@ -72,12 +71,17 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
debug("## Transferring control to Linux (at address %08lx) ...\n",
(ulong) theKernel);
- boot_prep_linux_qemu(images);
-
/* we assume that the kernel is in place */
printf("\nStarting kernel ...\n\n");
theKernel(0, NULL, NULL, 0);
+}
+
+int do_bootm_linux(int flag, int argc, char * const argv[],
+ bootm_headers_t *images)
+{
+ boot_prep_linux_qemu(images);
+ boot_jump_linux_qemu(images);
/* does not return */
return 1;
Move the actual jump code into a separate function. This is just a cosmetic change. The function will be remved by a subsequent change. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com> --- This is compile tested only. I don't have suitable kernel images for mips,mipsel,mips64,mipsel64 systems to try it yet. -Gabor --- arch/mips/lib/bootm_qemu_mips.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)