29 May, 2017

1 commit

  • This introduces the ability to override the environment offets from the
    device tree by setting the following nodes in '/config':
    'u-boot,mmc-env-offset' - overrides CONFIG_ENV_OFFSET
    'u-boot,mmc-env-offset-redundant'
    - overrides CONFIG_ENV_OFFSET_REDUND

    To keep with the previous logic, the CONFIG_* defines still need to
    be available and the statically defined values become the defaults,
    when the corresponding properties are not set in the device-tree.

    Signed-off-by: Philipp Tomsich
    Acked-by: Simon Glass

    Philipp Tomsich
     

23 May, 2017

3 commits

  • trini: Make Kconfig SPL_xxx entires only show if SPL, so that we don't
    get Kconfig errors on platforms without SPL, ie sandbox (without SPL).

    Signed-off-by: Tom Rini

    Tom Rini
     
  • 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
     

22 May, 2017

2 commits

  • Commit 94e3c8c4fd7b ("crypto/fsl - Add progressive hashing support
    using hardware acceleration.") created entries for CONFIG_SHA1,
    CONFIG_SHA256, CONFIG_SHA_HW_ACCEL, and CONFIG_SHA_PROG_HW_ACCEL.
    However, no defconfig has migrated to it. Complete the move by first
    adding additional logic to various Kconfig files to select this when
    required and then use the moveconfig tool. In many cases we can select
    these because they are required to implement other drivers. We also
    correct how we include the various hashing algorithms in SPL.

    This commit was generated as follows (after Kconfig additions):

    [1] tools/moveconfig.py -y SHA1 SHA256 SHA_HW_ACCEL
    [2] tools/moveconfig.py -y SHA_PROG_HW_ACCEL

    Note:
    We cannot move SHA_HW_ACCEL and SHA_PROG_HW_ACCEL simultaneously
    because there is dependency between them.

    Cc: Poonam Aggrwal
    Cc: Naveen Burmi
    Cc: Po Liu
    Cc: Shengzhou Liu
    Cc: Priyanka Jain
    Cc: Shaohui Xie
    Cc: Chunhe Lan
    Cc: Chander Kashyap
    Cc: Steve Rae
    Cc: Dirk Eibach
    Cc: Feng Li
    Cc: Alison Wang
    Cc: Sumit Garg
    Cc: Mingkai Hu
    Cc: York Sun
    Cc: Prabhakar Kushwaha
    Cc: Jaehoon Chung
    Cc: Akshay Saraswat
    Cc: Heiko Schocher
    Cc: Jagan Teki
    Signed-off-by: Tom Rini
    Reviewed-by: Simon Glass
    Signed-off-by: Tom Rini

    Tom Rini
     
  • This converts the following to Kconfig:
    CONFIG_SPL_BOARD_INIT

    Signed-off-by: Ley Foon Tan
    [trini: Update the Kconfig logic]
    Signed-off-by: Tom Rini

    Ley Foon Tan
     

18 May, 2017

5 commits

  • So far we were not using the FIT image format to its full potential:
    The SPL FIT loader was just loading the first image from the /images
    node plus one of the listed DTBs.
    Now with the refactored loader code it's easy to load an arbitrary
    number of images in addition to the two mentioned above.
    As described in the FIT image source file format description, iterate
    over all images listed at the "loadables" property in the configuration
    node and load every image at its desired location.
    This allows to load any kind of images:
    - firmware images to execute before U-Boot proper (for instance
    ARM Trusted Firmware (ATF))
    - firmware images for management processors (SCP, arisc, ...)
    - firmware images for devices like WiFi controllers
    - bit files for FPGAs
    - additional configuration data
    - kernels and/or ramdisks
    The actual usage of this feature would be platform and/or board specific.

    Also update the FIT documentation to mention the new SPL feature and
    provide an example .its file to demonstrate its features.

    Signed-off-by: Andre Przywara
    Reviewed-by: Lokesh Vutla
    Reviewed-by: Simon Glass
    Tested-by: Heiko Stuebner
    Reviewed-by: Kever Yang
    Tested-by: Kever Yang
    Tested-by: Jagan Teki
    Reviewed-by: Jagan Teki

    Andre Przywara
     
  • At the moment we load two images from a FIT image: the actual U-Boot
    image and the .dtb file. Both times we have very similar code, that deals
    with alignment requirements the media we load from imposes upon us.
    Factor out this code into a new function, which we just call twice.

    Signed-off-by: Andre Przywara
    Reviewed-by: Simon Glass
    Tested-by: Heiko Stuebner
    Reviewed-by: Kever Yang
    Tested-by: Kever Yang
    Tested-by: Jagan Teki

    Andre Przywara
     
  • At the moment we ignore any errors due to missing FIT properties,
    instead go ahead and calculate our addresses with the -1 return value.
    Fix this and bail out if any of the mandatory properties are missing.

    Signed-off-by: Andre Przywara
    Reviewed-by: Simon Glass
    Tested-by: Heiko Stuebner
    Reviewed-by: Kever Yang
    Tested-by: Kever Yang
    Tested-by: Jagan Teki
    Reviewed-by: Jagan Teki

    Andre Przywara
     
  • Currently the SPL FIT loader always looks only for the first image in
    the /images node a FIT tree, which it loads and later executes.

    Generalize this by looking for a "firmware" property in the matched
    configuration subnode, or, if that does not exist, for the first string
    in the "loadables" property. Then using the string in that property,
    load the image of that name from the /images node.
    This still loads only one image at the moment, but refactors the code to
    allow extending this in a following patch.
    To simplify later re-usage, we also generalize the spl_fit_select_index()
    function to not return the image location, but just the node offset.

    Signed-off-by: Andre Przywara
    Reviewed-by: Lokesh Vutla
    Reviewed-by: Simon Glass
    Tested-by: Heiko Stuebner
    Reviewed-by: Kever Yang
    Tested-by: Kever Yang
    Tested-by: Jagan Teki

    Andre Przywara
     
  • Currently the SPL FIT loader uses the spl_fit_select_fdt() function to
    find the offset to the right DTB within the FIT image.
    For this it iterates over all subnodes of the /configuration node in
    the FIT tree and compares all "description" strings therein using a
    board specific matching function.
    If that finds a match, it uses the string in the "fdt" property of that
    subnode to locate the matching subnode in the /images node, which points
    to the DTB data.
    Now this works very well, but is quite specific to cover this particular
    use case. To open up the door for a more generic usage, let's split this
    function into:
    1) a function that just returns the node offset for the matching
    configuration node (spl_fit_find_config_node())
    2) a function that returns the image data any given property in a given
    configuration node points to, additionally using a given index into
    a possbile list of strings (spl_fit_select_index())
    This allows us to replace the specific function above by asking for the
    image the _first string of the "fdt" property_ in the matching
    configuration subnode points to.

    This patch introduces no functional changes, it just refactors the code
    to allow reusing it later.

    (diff is overly clever here and produces a hard-to-read patch, so I
    recommend to throw a look at the result instead).

    Signed-off-by: Andre Przywara
    Reviewed-by: Lokesh Vutla
    Reviewed-by: Simon Glass
    Tested-by: Heiko Stuebner
    Reviewed-by: Kever Yang
    Tested-by: Kever Yang
    Tested-by: Jagan Teki

    Andre Przywara
     

16 May, 2017

6 commits


15 May, 2017

7 commits


12 May, 2017

11 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
     
  • env_attr_lookup call env_attr_walk with
    callback = regex_callback.

    In env_attr_walk
    attributes = strchr(entry_cpy, ENV_ATTR_SEP)
    will return NULL if ENV_ATTR_SEP is not found.

    In the aftermath regex_callback may call
    strlen(attributes)
    with a NULL value which will lead to a failure.

    The problem was indicated by scan-clam.

    Signed-off-by: Heinrich Schuchardt

    xypron.glpk@gmx.de
     
  • Error codes should be negative.

    Signed-off-by: Heinrich Schuchardt

    xypron.glpk@gmx.de
     
  • The SPL-DFU feature enable to load and
    execute u-boot from RAM over usb from
    PC using dfu-util.
    Hence dfu-reset should not be issued
    when dfu-util -R switch is issued.

    Signed-off-by: Ravi Babu

    B, Ravi
     
  • Since SPL_DFU_SUPPORT is depends on SPL_RAM_SUPPORT,
    hence select SPL_DFU_SUPPORT only when
    SPL_RAM_SUPPORT is chosen.

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

    B, Ravi
     
  • In single stage bootmode or falcon boot mode, the SPL shall update the
    device tree that we load with the normal fixups done via
    arch_fixup_fdt(), when possible (ie we have enough information in this
    restricted environment to be able to do that still). This will include
    for example updating them memory nodes.

    Signed-off-by: Ravi Babu
    [trini: Reword commit message]

    B, Ravi
     
  • 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
     
  • Move the assignment of board info to global data a bit early which is
    safe,
    so that ram details can be used to enable caches.

    Signed-off-by: Lokesh Vutla
    Signed-off-by: Ravi Babu
    Reviewed-by: Lukasz Majewski
    Reviewed-by: Tom Rini

    Lokesh Vutla
     
  • For the RK3399-Q7, we need some flexibility (depending on the feature
    set we include in the SPL stage and how large our SPI flash is) in
    positioning the SPL payload (i.e. the FIT image containing U-Boot, ATF
    and the M0 payload) in our SPI flash.

    To avoid having to deal with this through different U-Boot images, we
    introduce a the '/config/u-boot,spl-payload-offset' property node
    allow it to override the default setting.

    Signed-off-by: Philipp Tomsich
    Acked-by: Simon Glass

    Philipp Tomsich
     
  • Similar to what blk_get_device_part_str() does, this patch makes
    part_get_info_by_name() return the partition number in case of a match.
    This is useful when the partition number is needed and not just the
    descriptor.

    Signed-off-by: Alex Deymo
    Reviewed-by: Simon Glass

    Alex Deymo
     
  • Update the Android image header format to the latest version published
    in AOSP. The original code moved to a new repository, so this patch also
    updates the reference to that path.

    Signed-off-by: Alex Deymo
    Reviewed-by: Simon Glass

    Alex Deymo
     

10 May, 2017

3 commits


09 May, 2017

1 commit


08 May, 2017

1 commit

  • At present fdt blob or argument address being passed to kernel is fixed at
    compile time using macro CONFIG_SYS_SPL_ARGS_ADDR. FDT blob from
    different media like nand, nor flash are copied to the address pointed
    by the macro.
    The problem is, it makes args/fdt blob compulsory to copy which is not required
    in cases like for NOR Flash. This patch removes this limitation.

    Signed-off-by: Vikas Manocha

    Vikas Manocha