20 Aug, 2018

1 commit

  • Move the A/B slot check to SPL, the A/B slot switch
    workflow is just like what we have in libavb_ab.

    Test: A/B select works fine on imx8m.

    Change-Id: Ie3d827a9be0298b491bf2bc8d48833597fd70e90
    Signed-off-by: Luo Ji

    Luo Ji
     

13 Jun, 2018

1 commit


26 Apr, 2018

1 commit

  • Fix below build warning and errors:
    env/sata.c: In function ‘env_sata_save’:
    env/sata.c:59:9: warning: implicit declaration of function ‘sata_get_dev’ [-Wimplicit-function-declaration]
    sata = sata_get_dev(env_sata);
    ^~~~~~~~~~~~
    env/sata.c:59:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    sata = sata_get_dev(env_sata);
    ^
    env/sata.c: In function ‘env_sata_load’:
    env/sata.c:101:10: warning: ‘return’ with a value, in function returning void
    return -EIO;
    ^
    env/sata.c:94:13: note: declared here
    static void env_sata_load(void)
    ^~~~~~~~~~~~~
    env/sata.c:105:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    sata = sata_get_dev(env_sata);
    ^
    env/sata.c:108:10: warning: ‘return’ with a value, in function returning void
    return -EIO;
    ^
    env/sata.c:94:13: note: declared here
    static void env_sata_load(void)
    ^~~~~~~~~~~~~
    env/sata.c:113:10: warning: ‘return’ with a value, in function returning void
    return -EIO;
    ^
    env/sata.c:94:13: note: declared here
    static void env_sata_load(void)
    ^~~~~~~~~~~~~
    env/sata.c:116:9: warning: ‘return’ with a value, in function returning void
    return env_import(buf, 1);
    ^~~~~~~~~~~~~~~~~~
    env/sata.c:94:13: note: declared here
    static void env_sata_load(void)
    ^~~~~~~~~~~~~
    env/sata.c: At top level:
    env/sata.c:120:14: error: ‘ENVL_ESATA’ undeclared here (not in a function)
    .location = ENVL_ESATA,
    ^~~~~~~~~~
    env/sata.c:122:11: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
    .load = env_sata_load,

    Signed-off-by: Ye Li

    Ye Li
     

06 Oct, 2017

1 commit


20 Sep, 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
     

03 Sep, 2017

1 commit


05 Aug, 2017

1 commit


04 Aug, 2017

4 commits


12 May, 2017

1 commit


18 Feb, 2017

1 commit

  • the socfpga bootrom supports mmc booting from either a raw image
    starting at 0x0, or from a partition of type 0xa2. This patch
    adds support for locating the boot image in the first type 0xa2
    partition found.

    Assigned a partition number of -1 will cause a search for a
    partition of type CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_TYPE
    and use it to find the u-boot image

    Signed-off-by: Dalon Westergreen

    Dalon Westergreen
     

28 Jan, 2017

3 commits


02 Oct, 2016

3 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
     
  • Add special target "mbr" (otherwise configurable via CONFIG_FASTBOOT_MBR_NAME)
    to write MBR partition table.
    Partitions are now searched using the generic function which finds any
    partiiton by name. For MBR the partition names hda1, sda1, etc. are used.

    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

9 commits


12 Apr, 2016

1 commit

  • The patch "dm: part: Convert partition API use to linker lists"
    (sha1: 96e5b03c8ab749b6547f6a3ceb4d4b9f274211aa) is adding new
    dependency for enabling SPL_EXT_SUPPORT to be able to get
    information about DOS partition.
    get_info is also required for FAT support only which is used on Xilinx
    Zynq boards.

    Reported-by: Nathan Rossi
    Signed-off-by: Michal Simek
    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass

    Michal Simek
     

16 Mar, 2016

1 commit

  • We have a pretty nice and generic interface to ask for a specific block
    device. However, that one is still based around the magic notion that
    we know the driver name.

    In order to be able to write fully generic disk access code, expose the
    currently internal list to other source files so that they can scan through
    all available block drivers.

    Signed-off-by: Alexander Graf
    Reviewed-by: Simon Glass
    Tested-by: Simon Glass

    Alexander Graf
     

15 Mar, 2016

9 commits

  • Rename three partition functions so that they start with part_. This makes
    it clear what they relate to.

    Signed-off-by: Simon Glass
    Tested-by: Stephen Warren

    Simon Glass
     
  • We can use linker lists instead of explicitly declaring each function.
    This makes the code shorter by avoiding switch() statements and lots of
    header file declarations.

    While this does clean up the code it introduces a few code issues with SPL.
    SPL never needs to print partition information since this all happens from
    commands. SPL mostly doesn't need to obtain information about a partition
    either, except in a few cases. Add these cases so that the code will be
    dropped from each partition driver when not needed. This avoids code bloat.

    I think this is still a win, since it is not a bad thing to be explicit
    about which features are used in SPL. But others may like to weigh in.

    Signed-off-by: Simon Glass
    Reviewed-by: Tom Rini
    Tested-by: Stephen Warren

    Simon Glass
     
  • Rename this function to blk_get_device_part_str(). This is a better name
    because it makes it clear that the function returns a block device and
    parses a string.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     
  • The current name is too generic. The function returns a block device based
    on a provided string. Rename it to aid searching and make its purpose
    clearer. Also add a few comments.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     
  • The current name is too generic. Add a 'blk_' prefix to aid searching and
    make its purpose clearer.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     
  • The block interface is not well documented in the code. Pick two important
    functions and add comments.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     
  • At present block devices are tied up with partitions. But not all block
    devices have partitions within them. They are in fact separate concepts.

    Create a separate blk.h header file for block devices.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     
  • We should not include in header files. Each C file should include
    it if needed.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass
     
  • Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
    and causes 80-column violations, rename it to struct blk_desc.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Stephen Warren

    Simon Glass