09 Oct, 2018

1 commit

  • Add a way in configuration files (exlinux.conf for sysboot command)
    to select a specific FIT configuration. The configuration is selected
    with a string added after the FIT filename in the label "KERNEL" or
    "LINUX", using the same format than bootm command:

    KERNEL [Filename]#[#.

    bootm []#[#

    Patrick Delaunay
     

06 Jun, 2018

1 commit

  • For distro-boot, the TIMEOUT directive in the boot script specifies
    how long to pause in units of 1/10 sec. [1]

    Commit 8594753ba0a7 ("menu: only timeout when menu is displayed")
    corrected this by simply dividing the timeout value by 10 in
    menu_interactive_choice().

    I see two problems:

    - For example, "TIMEOUT 5" should wait for 0.5 sec, but the current
    implementation cannot handle the granularity of 1/10 sec.
    In fact, it never breaks because "m->timeout / 10" is zero,
    which means no timeout.

    - The menu API is used not only by cmd/pxe.c but also by
    common/autoboot.c . For the latter case, the unit of the
    timeout value is _second_ because its default is associated
    with CONFIG_BOOTDELAY.

    To fix the first issue, use DIV_ROUND_UP() so that the timeout value
    is rounded up to the closest integer.

    For the second issue, move the division to the boundary between
    cmd/pxe.c and common/menu.c . This is a more desirable place because
    the comment of struct pxe_menu says:

    * timeout - time in tenths of a second to wait for a user key-press before
    * booting the default label.

    Then, the comment of menu_create() says:

    * timeout - A delay in seconds to wait for user input. If 0, timeout is
    * disabled, and the default choice will be returned unless prompt is 1.

    [1] https://www.syslinux.org/wiki/index.php?title=SYSLINUX#TIMEOUT_timeout

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

07 May, 2018

1 commit

  • When U-Boot started using SPDX tags we were among the early adopters and
    there weren't a lot of other examples to borrow from. So we picked the
    area of the file that usually had a full license text and replaced it
    with an appropriate SPDX-License-Identifier: entry. Since then, the
    Linux Kernel has adopted SPDX tags and they place it as the very first
    line in a file (except where shebangs are used, then it's second line)
    and with slightly different comment styles than us.

    In part due to community overlap, in part due to better tag visibility
    and in part for other minor reasons, switch over to that style.

    This commit changes all instances where we have a single declared
    license in the tag as both the before and after are identical in tag
    contents. There's also a few places where I found we did not have a tag
    and have introduced one.

    Signed-off-by: Tom Rini

    Tom Rini
     

16 Oct, 2017

1 commit

  • As the code currently stands, we first check that the length of the
    given command line, along with ip_str/mac_str along with an additional 1
    for the NULL termination will fit within the buffer we have, and if not,
    we return an error. The way this code was originally written however
    left Coverity "unhappy" due to using strcat rather than strncat.
    Switching this to strncat however causes clang to be unhappy that we
    aren't enforcing the "1" portion within strncat. Rather than further
    re-work the code to include a "- 1" in this case as well, make the
    strcat code only be done within the else side of the length test. This
    keeps both clang and Coverity happy.

    Fixes: 48ee0a87bc46 ("cmd/pxe.c: Rework initrd and bootargs handling slightly")
    Signed-off-by: Tom Rini

    Tom Rini
     

06 Oct, 2017

1 commit

  • For the initrd portion of handling our bootm arguments we do not have a
    sufficiently long enough buffer for some improbable 64bit cases. Expand
    this buffer to allow for a 64bit address and almost 256MB initrd to be
    used. Make use of strncpy/strncat when constructing the values here
    since we know what the worst case valid values are, length wise.

    Similarly for bootargs themselves, we need to make use of strlen/sizeof
    and strncpy/strncat to ensure that we don't overflow bootargs itself.

    Cc: Simon Glass
    Cc: Alexander Graf
    Reported-by: Coverity (CID: 131256)
    Signed-off-by: Tom Rini

    Tom Rini
     

16 Aug, 2017

3 commits


07 Sep, 2016

1 commit

  • When FIT image is used, a single image provides kernel, device
    tree and optionally ramdisk. Argc and argv need to be adjusted
    to support this.

    Test cases:
    1. Booting with legacy images
    2. Booting with legacy images without initrd
    3. Booting with FIT image
    Test commands:
    1. pxe get && pxe boot
    2. sysboot

    Signed-off-by: York Sun
    Signed-off-by: Wenbin Song

    York Sun
     

06 Feb, 2016

1 commit

  • Correct spelling of "U-Boot" shall be used in all written text
    (documentation, comments in source files etc.).

    Signed-off-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Reviewed-by: Simon Glass
    Reviewed-by: Minkyu Kang

    Bin Meng
     

25 Jan, 2016

1 commit

  • Now that they are in their own directory, we can remove this prefix.
    This makes it easier to find a file since the prefix does not get in the
    way.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass