23 Jan, 2020

1 commit


12 Aug, 2019

1 commit


25 Jul, 2019

1 commit

  • This patch adds part_get_info_by_dev_and_name_or_num() function which
    allows us to get partition info from its number or name. Partition of
    interest is specified by string like "device_num:partition_number" or
    "device_num#partition_name".

    The patch was extracted from [1].

    [1] https://android-review.googlesource.com/c/platform/external/u-boot/+/729880/2

    Signed-off-by: Ruslan Trofymenko
    Signed-off-by: Igor Opaniuk
    Reviewed-by: Alistair Strachan
    Reviewed-by: Sam Protsenko
    Reviewed-by: Simon Glass

    Ruslan Trofymenko
     

21 Jun, 2019

1 commit

  • blk_get_device_by_str was skipping part_init when hw partition 0 was
    selected because it is the default. However, this caused issues when
    switching to a non-zero partition and then back to partition zero, as
    stale data from the wrong partition was returned.

    Remove this optimization and call part_init regardless of the selected
    partition.

    Signed-off-by: Robert Hancock

    Robert Hancock
     

15 Jun, 2019

1 commit


27 Apr, 2019

1 commit


15 Nov, 2018

1 commit


11 Aug, 2018

1 commit

  • Underlying API should already print some meaningful error message, so
    this one is just brings more noise. E.g. we can see log like this:

    MMC: no card present
    ** Bad device mmc 0 **

    Obviously, second error message is unwanted. Let's only print it in case
    when DEBUG is defined to keep log short and clear.

    Signed-off-by: Sam Protsenko

    Sam Protsenko
     

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
     

28 Apr, 2018

1 commit


14 Mar, 2018

2 commits


09 Feb, 2018

1 commit

  • config_fallbacks.h has some logic that sets HAVE_BLOCK_DEVICE
    based on a list of enabled options. Moving HAVE_BLOCK_DEVICE to
    Kconfig allows us to drastically shrink the logic in
    config_fallbacks.h

    Signed-off-by: Adam Ford
    [trini: Rename HAVE_BLOCK_DEVICE to CONFIG_BLOCK_DEVICE]
    Signed-off-by: Tom Rini

    Adam Ford
     

06 Oct, 2017

1 commit


15 Sep, 2017

1 commit

  • Needed to support efi file protocol. The fallback.efi loader wants
    to be able to read the contents of the /EFI directory to find an OS
    to boot.

    Modelled after POSIX opendir()/readdir()/closedir(). Unlike the other
    fs APIs, this is stateful (ie. state is held in the FS_DIR "directory
    stream"), to avoid re-traversing of the directory structure at each
    step. The directory stream must be released with closedir() when it
    is no longer needed.

    Signed-off-by: Rob Clark
    Reviewed-by: Łukasz Majewski
    Reviewed-by: Simon Glass

    Rob Clark
     

16 Aug, 2017

1 commit

  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

14 Aug, 2017

1 commit


04 Aug, 2017

1 commit


12 May, 2017

1 commit


28 Jan, 2017

6 commits


28 Dec, 2016

1 commit

  • With capacities getting bigger, we can see see messages with negative
    numbers like "Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)".
    Here the printed LBA is -387938128 when it should have been 3907029168.
    To fix this, use the right format when displaying the unsigned integers.

    Signed-off-by: Jean-Jacques Hiblot
    Reported-by: Yan Liu

    Jean-Jacques Hiblot
     

02 Oct, 2016

2 commits

  • In both DOS and ISO partition tables the same code to create partition name
    like "hda1" was repeated.

    Code moved to into a new function part_set_generic_name() in part.c and optimized.
    Added recognition of MMC and SD types, name is like "mmcsda1".

    Signed-off-by: Petr Kulhavy
    Reviewed-by: Tom Rini
    Acked-by: Steve Rae
    Reviewed-by: Simon Glass

    Petr Kulhavy
     
  • So far partition search by name has been supported only on the EFI partition
    table. This patch extends the search to all partition tables.

    Rename part_get_info_efi_by_name() to part_get_info_by_name(), move it from
    part_efi.c into part.c and make it a generic function which traverses all part
    drivers and searches all partitions (in the order given by the linked list).

    For this a new variable struct part_driver.max_entries is added, which limits
    the number of partitions searched. For EFI this was GPT_ENTRY_NUMBERS.
    Similarly the limit is defined for DOS, ISO, MAC and AMIGA partition tables.

    Signed-off-by: Petr Kulhavy
    Reviewed-by: Tom Rini
    Acked-by: Steve Rae

    Petr Kulhavy
     

17 May, 2016

12 commits