1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-26 16:13:55 +01:00

bootm: refactor entry point code

Move entry point code out of each arch and into common code.
Keep the entry point in the bootm_headers_t images struct.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
Kumar Gala
2008-08-15 08:24:36 -05:00
committed by Wolfgang Denk
parent 20220d22b9
commit c160a95447
12 changed files with 37 additions and 182 deletions

View File

@@ -87,7 +87,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
bootm_headers_t * images)
{
char *bootargs;
ulong ep, load;
ulong load;
ulong initrd_start, initrd_end;
ulong rd_data_start, rd_data_end, rd_len;
unsigned int data, len, checksum;
@@ -97,17 +97,9 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
int ret;
if (images->legacy_hdr_valid) {
ep = image_get_ep(images->legacy_hdr_os);
load = image_get_load(images->legacy_hdr_os);
#if defined(CONFIG_FIT)
} else if (images->fit_uname_os) {
int ret = fit_image_get_entry(images->fit_hdr_os,
images->fit_noffset_os, &ep);
if (ret) {
puts("Can't get entry point property!\n");
goto error;
}
ret = fit_image_get_load(images->fit_hdr_os,
images->fit_noffset_os, &load);
if (ret) {
@@ -124,7 +116,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
linux_hdr = (void *)load;
/* */
kernel = (void (*)(struct linux_romvec *, void *))ep;
kernel = (void (*)(struct linux_romvec *, void *))images->ep;
/* check for a SPARC kernel */
if ((linux_hdr->hdr[0] != 'H') ||