Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Miao Yan's avatar
    5b629319
    common/cmd_bootm.c: fix subcommand processing in OS specific do_bootm_xxx() functions · 5b629319
    Miao Yan authored
    
    In commit "5c427e49: use BOOTM_STATE_OS_CMDLINE flag for plain bootm"
    and "3d187b39: Only pass BOOTM_STATE_OS_CMDLINE on PowerPC/MIPS",
    BOOTM_STATE_OS_CMDLINE was added to do_bootm for PowerPC and MIPS. This
    breaks other OSes (vxworks, netbsd, plan9,...) that don't support
    subcommand processing, e.g. they all contain the following code in their
    do_bootm_xxx():
    
        if (flag & BOOTM_STATE_OS_PREP)
                return 0;
        if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
                return 1;
    
    which will result a "subcommand not supported" error.
    This patch changes the above logic to:
    
        /* if not go command, pretend everything to be OK */
        if (flag != BOOTM_STATE_OS_GO)
             return 0;
    
    Signed-off-by: default avatarMiao Yan <miao.yan@windriver.com>
    5b629319
    History
    common/cmd_bootm.c: fix subcommand processing in OS specific do_bootm_xxx() functions
    Miao Yan authored
    
    In commit "5c427e49: use BOOTM_STATE_OS_CMDLINE flag for plain bootm"
    and "3d187b39: Only pass BOOTM_STATE_OS_CMDLINE on PowerPC/MIPS",
    BOOTM_STATE_OS_CMDLINE was added to do_bootm for PowerPC and MIPS. This
    breaks other OSes (vxworks, netbsd, plan9,...) that don't support
    subcommand processing, e.g. they all contain the following code in their
    do_bootm_xxx():
    
        if (flag & BOOTM_STATE_OS_PREP)
                return 0;
        if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
                return 1;
    
    which will result a "subcommand not supported" error.
    This patch changes the above logic to:
    
        /* if not go command, pretend everything to be OK */
        if (flag != BOOTM_STATE_OS_GO)
             return 0;
    
    Signed-off-by: default avatarMiao Yan <miao.yan@windriver.com>