X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fcmd_bootm.c;h=046e22ff48f57efd4e9957d311b64377c2e048dd;hb=0c9e2dc612e8b970ea2d13712b0e0f3f1282be4f;hp=72d8837cd55755bf8f0c2db54374c12c1100c5a4;hpb=ec3902919307f1e1defbefa177a9298f0ddb7e53;p=karo-tx-uboot.git diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index 72d8837cd5..046e22ff48 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -2,23 +2,7 @@ * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ @@ -542,10 +526,6 @@ static int boot_selected_os(int argc, char * const argv[], int state, bootm_start_standalone(argc, argv); return 0; } -#ifdef CONFIG_SILENT_CONSOLE - if (images->os.os == IH_OS_LINUX) - fixup_silent_linux(); -#endif arch_preboot_os(); boot_fn(state, argc, argv, images); if (state == BOOTM_STATE_OS_FAKE_GO) /* We expect to return */ @@ -656,6 +636,10 @@ static int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, goto err; else if (ret == BOOTM_ERR_OVERLAP) ret = 0; +#ifdef CONFIG_SILENT_CONSOLE + if (images->os.os == IH_OS_LINUX) + fixup_silent_linux(); +#endif } /* Relocate the ramdisk */ @@ -703,13 +687,6 @@ static int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, if (!ret && (states & BOOTM_STATE_OS_PREP)) ret = boot_fn(BOOTM_STATE_OS_PREP, argc, argv, images); - /* Check for unsupported subcommand. */ - if (ret) { - puts("subcommand not supported\n"); - return ret; - } - - #ifdef CONFIG_TRACE /* Pretend to run the OS, then run a user command */ if (!ret && (states & BOOTM_STATE_OS_FAKE_GO)) { @@ -721,15 +698,17 @@ static int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc, ret = run_command_list(cmd_list, -1, flag); } #endif + + /* Check for unsupported subcommand. */ + if (ret) { + puts("subcommand not supported\n"); + return ret; + } + /* Now run the OS! We hope this doesn't return */ - if (!ret && (states & BOOTM_STATE_OS_GO)) { + if (!ret && (states & BOOTM_STATE_OS_GO)) ret = boot_selected_os(argc, argv, BOOTM_STATE_OS_GO, images, boot_fn); - if (ret) - goto err; - } - - return ret; /* Deal with any fallout */ err: @@ -988,7 +967,7 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, case IMAGE_FORMAT_FIT: os_noffset = fit_image_load(images, FIT_KERNEL_PROP, img_addr, - &fit_uname_kernel, fit_uname_config, + &fit_uname_kernel, &fit_uname_config, IH_ARCH_DEFAULT, IH_TYPE_KERNEL, BOOTSTAGE_ID_FIT_KERNEL_START, FIT_LOAD_IGNORED, os_data, os_len); @@ -997,6 +976,7 @@ static const void *boot_get_kernel(cmd_tbl_t *cmdtp, int flag, int argc, images->fit_hdr_os = map_sysmem(img_addr, 0); images->fit_uname_os = fit_uname_kernel; + images->fit_uname_cfg = fit_uname_config; images->fit_noffset_os = os_noffset; break; #endif @@ -1472,6 +1452,8 @@ static int do_bootm_netbsd(int flag, int argc, char * const argv[], char *consdev; char *cmdline; + if (flag & BOOTM_STATE_OS_PREP) + return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; @@ -1551,6 +1533,8 @@ static int do_bootm_lynxkdi(int flag, int argc, char * const argv[], { image_header_t *hdr = &images->legacy_hdr_os_copy; + if (flag & BOOTM_STATE_OS_PREP) + return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; @@ -1573,6 +1557,8 @@ static int do_bootm_rtems(int flag, int argc, char * const argv[], { void (*entry_point)(bd_t *); + if (flag & BOOTM_STATE_OS_PREP) + return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; @@ -1606,6 +1592,8 @@ static int do_bootm_ose(int flag, int argc, char * const argv[], { void (*entry_point)(void); + if (flag & BOOTM_STATE_OS_PREP) + return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; @@ -1640,6 +1628,8 @@ static int do_bootm_plan9(int flag, int argc, char * const argv[], void (*entry_point)(void); char *s; + if (flag & BOOTM_STATE_OS_PREP) + return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; @@ -1687,6 +1677,8 @@ static int do_bootm_vxworks(int flag, int argc, char * const argv[], { char str[80]; + if (flag & BOOTM_STATE_OS_PREP) + return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; @@ -1710,6 +1702,8 @@ static int do_bootm_qnxelf(int flag, int argc, char * const argv[], char *local_args[2]; char str[16]; + if (flag & BOOTM_STATE_OS_PREP) + return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; @@ -1735,6 +1729,8 @@ static int do_bootm_integrity(int flag, int argc, char * const argv[], { void (*entry_point)(void); + if (flag & BOOTM_STATE_OS_PREP) + return 0; if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1;