16 Feb, 2019

1 commit

  • Since there is the SPL_USB_HOST_SUPPORT for enabling USB support in SPL,
    makes more sense to rename the SPL_USB_SUPPORT as SPL_USB_STORAGE.
    Everything that is not part of the usb storage support in SPL is now
    build under SPL_USB_HOST_SUPPORT.

    Signed-off-by: Abel Vesa
    Reviewed-by: Tom Rini
    Reviewed-by: Fabio Estevam
    Reviewed-by: Lukasz Majewski

    Abel Vesa
     

26 Jan, 2019

2 commits

  • CLI support with the HUSH parser is not currently SPL safe due to it's
    use of realloc. That function is not defined for SPLs that use
    SYS_MALLOC_SIMPLE. CLI support can be built in to SPL and some functions
    do work, but use of some like run_command() will cause build to fail.
    When no SPL code calls this function build works as the compiler removes
    this unreachable code so the unresolved symbols are ignored.

    If DFU support is enabled in SPL then MMU DFU support may get brought in
    also, this code does make a call to run_command() causing build to fail
    if the HUSH parser is not built-in. To break this odd and unneeded
    dependency chain we use CONFIG_IS_ENABLED where appropriate to prevent
    calls into HUSH code from SPL. This also removes our need to pull in the
    rather unrelated source file when SPL_DFU is defined.

    Signed-off-by: Andrew F. Davis
    Reviewed-by: Tom Rini

    Andrew F. Davis
     
  • The symbol CONFIG_SPL_DFU_SUPPORT in SPL build has the same
    meaning as CONFIG_DFU in regular U-Boot. Drop the _SUPPORT
    to allow for cleaner use in code.

    Signed-off-by: Andrew F. Davis
    Reviewed-by: Tom Rini
    Acked-by: Lukasz Majewski

    Andrew F. Davis
     

15 Dec, 2018

1 commit

  • Enable DM for USB peripheral in the musb-new driver.
    Also make sure that the driver can be used in the SPL.
    This implies that:
    * the driver must work with and without the OF_CONTROL option. That
    in turn, implies that the platform data can be passed in a struct
    ti_musb_platdata or be read from the dtb
    * usb.o is linked in the SPL if host support is enabled

    Another change is that the driver does not fail to bind (and stop the boot
    process) if one of the child driver does not bind. Reporting the error is
    enough. This kind of error would appear if the port is configured in the
    DTS but the driver is not activated in the config.

    Signed-off-by: Jean-Jacques Hiblot
    Reviewed-by: Tom Rini

    Jean-Jacques Hiblot
     

27 Nov, 2018

1 commit


26 Nov, 2018

2 commits

  • At present there is no standard way in U-Boot to pass information from SPL
    to U-Boot proper. But sometimes SPL wants to convey information to U-Boot
    that U-Boot cannot easily figure out. For example, if SPL sets up SDRAM
    then it might want to pass the size of SDRAM, or the location of each
    bank, to U-Boot proper.

    Add a new 'bloblist' feature which provides this. A bloblist is set up in
    the first phase of U-Boot that runs (i.e. TPL or SPL). The location of
    this info may be in SRAM or CAR (x86 cache-as-RAM) or somewhere else.

    Information placed in this region is preserved (with a checksum) through
    TPL and SPL and ends up in U-Boot. At this point it is copied into SDRAM
    so it can be used after relocation.

    Reviewed-by: Tom Rini
    Signed-off-by: Simon Glass
    Acked-by: Andreas Dannenberg

    Simon Glass
     
  • It is sometimes useful to log information in SPL and TPL. Add support for
    this.

    Reviewed-by: Tom Rini
    Signed-off-by: Simon Glass

    Simon Glass
     

21 Nov, 2018

1 commit


10 Nov, 2018

1 commit


20 Aug, 2018

1 commit

  • dtimg command allows user to work with Android DTB/DTBO image format.
    Such as, getting the address of desired DTB/DTBO file, printing the dump
    of the image in U-Boot shell, etc.

    This command is needed to provide Android boot with new Android DT image
    format further.

    Signed-off-by: Sam Protsenko
    Reviewed-by: Tom Rini

    Sam Protsenko
     

24 Jul, 2018

1 commit

  • 1. Since libavb library alone is highly portable, introduce dedicated
    Kconfig symbol for AVB bootloader-dependent operations, so it's possible
    to build libavb separately. AVB bootloader-dependent operations include:
    * Helpers to process strings in order to build OS bootargs.
    * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c.
    * Helpers to alloc/init/free avb ops.
    2. Add CONFIG_FASTBOOT dependency, as fastboot buffer is
    re-used in partition verification operations.

    Reported-by: Eugeniu Rosca
    Signed-off-by: Igor Opaniuk
    Reviewed-by: Eugeniu Rosca
    Tested-by: Eugeniu Rosca

    Igor Opaniuk
     

19 Jun, 2018

1 commit

  • Implement AVB ops on top of existing mmc subsystem API. Currently there
    is a full implementation of such operations, defined by [1]
    AVB2.0 specification:

    .read_from_partition() - reads N bytes from a partition identified by
    a name.
    .write_to_partition() - Writes N bytes to a partition identified by a name.
    .validate_vbmeta_public_key() - checks if the given public ‘vbmeta’
    partition is trusted.
    .get_unique_guid_for_partition() - Gets the GUID for a partition identified
    by a string name.

    As [1] specification recommends to use tamper-evident storage for storing
    rollback indexes and device state (LOCKED/UNLOCKED),
    currently are only stubs instead of full implementation for these ops:
    .read_rollback_index() - Gets the rollback index for a given index location
    .write_rollback_index() - Sets the rollback index to a given location
    .read_is_device_unlocked() - Gets where the device is unlocked

    [1] https://android.googlesource.com/platform/external/avb/+/master/README.md

    Signed-off-by: Igor Opaniuk

    Igor Opaniuk
     

30 May, 2018

2 commits

  • Introduce CONFIG_IMAGE_SPARSE and CONFIG_CMD_MMC_SWRITE so the "mmc
    swrite" command is separated from the fastboot code.

    Move image-sparse from common to lib so it's clear it's library code.

    Rename CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE to CONFIG_IMAGE_SPARSE_FILLBUF_SIZE
    and migrate it to Kconfig.

    Signed-off-by: Alex Kiernan
    Acked-by: Jassi Brar
    Reviewed-by: Simon Glass

    Alex Kiernan
     
  • Separate CMD_FASTBOOT from FASTBOOT and move code and configuration to
    drivers/fastboot.

    Switch dependencies on FASTBOOT to USB_FUNCTION_FASTBOOT as anyone who wants
    FASTBOOT before this series wants USB_FUNCTION_FASTBOOT. Split
    USB_FUNCTION_FASTBOOT from FASTBOOT so they retain their existing
    behaviour.

    Signed-off-by: Alex Kiernan
    Reviewed-by: Simon Glass
    Acked-by: Joe Hershberger

    Alex Kiernan
     

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
     

22 Feb, 2018

2 commits

  • Do the following to make the symbol names less confusing.

    sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \
    `git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u`

    Signed-off-by: Marek Vasut
    Cc: Lukasz Majewski

    Marek Vasut
     
  • Clean up the screaming mess of configuration options that DFU is.
    It was impossible to configure DFU such that TFTP is enabled and
    USB is not, this patch fixes that and assures that DFU TFTP and
    DFU USB can be enabled separatelly and that the correct pieces
    of code are compiled in.

    Signed-off-by: Marek Vasut
    Cc: Lukasz Majewski

    Marek Vasut
     

12 Jan, 2018

1 commit


08 Dec, 2017

2 commits


06 Oct, 2017

1 commit


19 Sep, 2017

1 commit


15 Aug, 2017

1 commit


13 Aug, 2017

1 commit

  • To allow for a finer-grained control of features for TPL and SPL
    builds all modules/boot-methods/etc. need to be consistently selected
    based on the $(SPL_TPL_) macros.

    This allows splitting the associated config-options in Kconfig: we
    don't split the Kconfig options here and now, as this should happen on
    an as-needed basis, whenever someone needs a feature/boot-method/etc.
    in their TPL.

    Signed-off-by: Philipp Tomsich
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Philipp Tomsich
     

27 Jul, 2017

1 commit

  • Some platforms have very limited SRAM to run SPL code, so there may
    not be the same amount space for a malloc pool before relocation in
    the SPL stage as the normal U-Boot stage.

    Make SPL and (the full) U-Boot stage use independent SYS_MALLOC_F_LEN,
    so the size of pre-relocation malloc pool can be configured memory
    space independently.

    Signed-off-by: Andy Yan
    Reviewed-by: Tom Rini
    Acked-by: Philipp Tomsich
    Reviewed-by: Philipp Tomsich
    [fixed up commit-message:]
    Signed-off-by: Philipp Tomsich

    Andy Yan
     

12 Jul, 2017

3 commits


11 Jul, 2017

2 commits


06 Jun, 2017

1 commit

  • At present bootstage only supports U-Boot proper. But SPL can also consume
    boot time so it is useful to have the record start there.

    Add bootstage support to SPL. Also support stashing the timing information
    when SPL finishes so that it can be picked up and reported by U-Boot
    proper. This provides a full boot time record, excluding only the time
    taken by the boot ROM.

    Signed-off-by: Simon Glass

    Simon Glass
     

23 May, 2017

2 commits

  • At present IDE support is controlled by CONFIG_CMD_IDE. Add a separate
    CONFIG_IDE option so that IDE support can be enabled without requiring
    the 'ide' command.

    Update existing users and move the ide driver into drivers/block since
    it should not be in common/.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present CONFIG_CMD_HASH enables the 'hash' command which also brings
    in the hashing API. Some boards may wish to enable the API without the
    command. Add a separate CONFIG to permit this.

    Signed-off-by: Simon Glass
    Reviewed-by: Tom Rini

    Simon Glass
     

12 May, 2017

2 commits

  • With gcc-6 and later we may get a warning such as:
    .../common/cli_readline.c:20:21: warning: ‘tab_seq’ defined but not used [-Wunused-const-variable=]
    static const char tab_seq[] = " "; /* used to expand TABs */
    ^~~~~~~
    .../common/cli_readline.c:19:19: warning: ‘erase_seq’ defined but not used [-Wunused-const-variable=]
    static const char erase_seq[] = "\b \b"; /* erase sequence */
    ^~~~~~~~~

    Because in SPL we're normally not doing interactive commands anyhow, so
    lets just not compile this at all in SPL. This also means that we need
    to correct the logic (and comment) about what the drivers/ddr/fsl/ and
    CONFIG_FSL_DDR_INTERACTIVE requires and this will be included in SPL
    there.

    Signed-off-by: Tom Rini

    Tom Rini
     
  • Adding support for fdt fixup to update the
    memory node in device tree for falcon boot.

    This is needed for single stage or falcon
    bootmode, to pass memory configuration to
    kernel through DT memory node.

    Signed-off-by: Ravi Babu
    Reviewed-by: Lukasz Majewski

    B, Ravi
     

13 Feb, 2017

1 commit


28 Sep, 2016

2 commits

  • The cmd_dfu functionality is been used by both SPL and
    u-boot, saperating the core dfu functionality moving
    it to common/dfu.c.

    Signed-off-by: Ravi Babu
    Reviewed-by: Tom Rini

    B, Ravi
     
  • Traditionally the DFU support is available only
    as part 2nd stage boot loader(u-boot) and DFU
    is not supported in SPL.

    The SPL-DFU feature is useful for boards which
    does not have MMC/SD, ethernet boot mechanism
    to boot the board and only has USB inteface.

    This patch add DFU support in SPL with RAM
    memory device support to load and execute u-boot.
    And then leverage full functionality DFU in
    u-boot to flash boot inital binary images to
    factory or bare-metal boards to memory devices
    like SPI, eMMC, MMC/SD card using USB interface.

    This SPL-DFU support can be enabled through
    Menuconfig->Boot Images->Enable SPL-DFU support

    Signed-off-by: Ravi Babu
    Reviewed-by: Tom Rini

    B, Ravi
     

17 Sep, 2016

1 commit

  • At present TPL uses the same options as SPL support. In a few cases the board
    config enables or disables the SPL options depending on whether
    CONFIG_TPL_BUILD is defined.

    With the move to Kconfig, options are determined for the whole build and
    (without a hack like an #undef in a header file) cannot be controlled in this
    way.

    Create new TPL options for these and update users. This will allow Kconfig
    conversion to proceed for these boards.

    Signed-off-by: Simon Glass

    Simon Glass
     

20 Aug, 2016

1 commit

  • The bootz and booti commands rely on common functionality that is found
    in common/bootm.c and common/bootm_os.c. They do not however rely on
    the rest of cmd/bootm.c to be implemented so split them into their own
    files. Have various Makefiles include the required infrastructure for
    CONFIG_CMD_BOOT[IZ] as well as CONFIG_CMD_BOOTM. Move the declaration
    of 'images' over to common/bootm.c.

    Cc: Masahiro Yamada
    Signed-off-by: Tom Rini

    Tom Rini