27 Apr, 2020

4 commits

  • When DM SCSI is enabled with AHCI, use SCSI device to replace SATA
    device to access the peripheral.

    Signed-off-by: Ye Li
    (cherry picked from commit 097bf5dcf79a3fc461c3e27102113cac7372afcf)

    Ye Li
     
  • Add env_get_offset interface to override static CONFIG_ENV_OFFSET,
    and update env location driver to use env_get_offset. So for different
    storage medium, we are able to store the env at different offset.

    We don't support this feature when CONFIG_ENV_IS_EMBEDDED is set.

    Signed-off-by: Ye Li
    (cherry picked from commit 5b12d7cabb14bab9a95af7460b36c6c85db1b328)
    (cherry picked from commit 565d9002ac59b03d5bc77c6d88f2b93492166b66)

    Ye Li
     
  • The ENV_IS_IN_SATA config is missed, add it into env/Kconfig, that
    we can enable it for SATA boot.

    Signed-off-by: Ye Li
    (cherry picked from commit 75b6d78fbb2ed29039852f9e652f9acd80bf7eaa)
    (cherry picked from commit 338f20a1804a21ae11b70b83bd820e0e7e399a1d)

    Ye Li
     
  • 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
    (cherry picked from commit ffdc4c02e0a3eb18c7fddf307887265aa97699a6)

    Ye Li
     

10 Mar, 2020

1 commit


30 Jan, 2020

2 commits

  • Most of the SPI flash devices in rockchip are 16MiB size.

    So, keeping U-Boot proper offset start from 128MiB with 1MiB
    size and then start env of 8KiB would be a compatible location
    between all variants of flash sizes.

    This patch add env start from 0x14000 with a size of 8KiB.

    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     
  • Rockchip do support SPI flash as well, so there is
    a possibility of using flash environment for those
    use cases.

    So, restrict the current env offset, size for MMC.

    Signed-off-by: Jagan Teki
    Reviewed-by: Kever Yang

    Jagan Teki
     

23 Jan, 2020

1 commit

  • I'm also seeing the build failure that commit

    7d4776545b env: solve compilation error in SPL

    tried to fix, namely that the reference to env_flags_validate from
    env_htab cannot be satisfied when flags.o is not built in. However,
    that commit got reverted by

    d90fc9c3de Revert "env: solve compilation error in SPL"

    Necessary, but not sufficient conditions to see this are

    CONFIG_SPL=y (obviously)
    CONFIG_SPL_ENV_SUPPORT=n (so flags.o does not get compiled)
    CONFIG_SPL_LIBCOMMON_SUPPORT=y (so env/built-in.o is part of the SPL link)

    Now, these are satisfied for e.g. imx6q_logic_defconfig. But that
    builds just fine, and spl/u-boot-spl.map lists .data.env_htab among
    the discarded (garbage collected) sections. Yet, on our
    mpc8309-derived board, we do see the build failure, so perhaps the
    linker works a bit differently on ppc than on ARM, or there's yet some
    other configuration option needed to observe the break.

    This is another attempt at solving it, which also cleans up
    env/Makefile a bit: Introduce a def_bool y symbol CONFIG_ENV_SUPPORT
    which complements CONFIG_(SPL/TPL)_SUPPORT. Then use
    CONFIG_$(SPL_TPL_)ENV_SUPPORT to decide whether to include the five
    basic env/*.o files. For attr.o, flags.o and callback.o, this
    shouldn't change anything. Also, common.o and env.o still get
    unconditionally built for U-boot proper. But for TPL/SPL, those two
    are only included if CONFIG_(SPL/TPL)_SUPPORT is set.

    Having that symbol should also allow simplifying conditionals such as

    #if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT)

    found in drivers/reset/reset-socfpga.c to just
    CONFIG_IS_ENABLED(ENV_SUPPORT).

    Signed-off-by: Rasmus Villemoes

    Rasmus Villemoes
     

18 Jan, 2020

1 commit


05 Dec, 2019

1 commit


03 Dec, 2019

3 commits


21 Nov, 2019

3 commits

  • - In ARMv8 NXP Layerscape platforms we also need to make use of
    CONFIG_SYS_RELOC_GD_ENV_ADDR now, do so.
    - On ENV_IS_IN_REMOTE, CONFIG_ENV_OFFSET is never used, drop the define
    to 0.
    - Add Kconfig entry for ENV_ADDR.
    - Make ENV_ADDR / ENV_OFFSET depend on the env locations that use it.
    - Add ENV_xxx_REDUND options that depend on their primary option and
    SYS_REDUNDAND_ENVIRONMENT
    - On a number of PowerPC platforms, use SPL_ENV_ADDR not CONFIG_ENV_ADDR
    for the pre-main-U-Boot environment location.
    - On ENV_IS_IN_SPI_FLASH, check not for CONFIG_ENV_ADDR being set but
    rather it being non-zero, as it will now be zero by default.
    - Rework the env_offset absolute in env/embedded.o to not use
    CONFIG_ENV_OFFSET as it was the only use of ENV_OFFSET within
    ENV_IS_IN_FLASH.
    - Migrate all platforms.

    Cc: Wolfgang Denk
    Cc: Joe Hershberger
    Cc: Patrick Delaunay
    Cc: uboot-stm32@st-md-mailman.stormreply.com
    Signed-off-by: Tom Rini
    Acked-by: Joe Hershberger
    Reviewed-by: Simon Goldschmidt

    Tom Rini
     
  • We have CONFIG_ENV_SIZE_IS_REDUND but don't really use it. We have one
    board where we can simply multiple CONFIG_ENV_SIZE by two for the same
    result. The other place where we could but were not previously using
    this is for where env_internal.h checks for if we should set
    ENV_IS_EMBEDDED. This seems like the most likely use, historically, of
    the variable, but it was not used. Add logic to check for this now.

    Cc: Wolfgang Denk
    Cc: Joe Hershberger
    Signed-off-by: Tom Rini
    Reviewed-by: Simon Glass
    Acked-by: Joe Hershberger

    Tom Rini
     
  • Today in initr_reloc_global_data() we use some non-obvious tests to
    determine if we need to relocate the env_addr within gd or not. In
    order to facilitate migration of other symbols to Kconfig we need to
    introduce a new symbol for this particular use case.

    Cc: Wolfgang Denk
    Cc: Joe Hershberger
    Signed-off-by: Tom Rini

    Tom Rini
     

13 Nov, 2019

1 commit


16 Oct, 2019

1 commit

  • We check (with a #if defined()) the config ENV_UBI_VOLUME_REDUND
    to know if there is a redundant env. But this config is a string
    and is always defined with env is in ubi, so we always consider
    that a redundand env is used.

    To fix this issue, I've added a hidden flag ENV_UBI_IS_VOLUME_REDUND
    that is true when ENV_UBI_VOLUME_REDUND is not "". Then, I check
    this flag in the code, instead of the string ENV_UBI_VOLUME_REDUND.

    hs: fixed typo s/condider/consider

    Signed-off-by: Philippe Reynes
    Reviewed-by: Heiko Schocher

    Philippe Reynes
     

08 Oct, 2019

1 commit


05 Oct, 2019

1 commit


12 Aug, 2019

12 commits


18 Jul, 2019

2 commits

  • this adds erase environment for mmc storage

    squashed fixes:
    - add CONFIG_CMD_ERASEENV
    - env: erase redundant offset if defined
    - changes mentioned by Simon
    - fix whitespaces around errmsg

    Suggested-by: Simon Goldschmidt
    Signed-off-by: Frank Wunderlich
    Reviewed-by: Simon Goldschmidt

    Frank Wunderlich
     
  • this patch adds basic changes for adding a erase-subcommand to env

    with this command the environment stored on non-volatile storage written
    by saveenv can be cleared.

    Signed-off-by: Frank Wunderlich

    squashed fixes
    - start message with "Erasing"
    - mark erase-function as optional
    - env: separate eraseenv from saveenv

    Suggested-by: Simon Goldschmidt
    Reviewed-by: Simon Goldschmidt

    Frank Wunderlich
     

12 Jul, 2019

1 commit


09 Jul, 2019

3 commits

  • Introduce KConfig CONFIG_ENV_UBI_VID_OFFSET to allow providing custom
    VID header offsets for the environment on UBI.

    Signed-off-by: Hamish Guthrie
    Signed-off-by: Markus Klotzbuecher
    Reviewed-by: Heiko Schocher
    Cc: Kyungmin Park

    Hamish Guthrie
     
  • Enable the extended ENV options for AT91 and OMAP2PLUS in order to be
    able to use CONFIG_ENV_UBI_* on these architectures.

    As this change also makes the configs ENV_SIZE, ENV_SECT_SIZE,
    ENV_OFFSET visible to AT91 and OMAP2PLUS, migrate users of these to
    KConfig.

    This migration was run using an extended moveconfig.py which evaluates
    expressions such as "(512 << 10)". See patch ("moveconfig: expand
    simple expressions").

    All modified boards were built with SOURCE_DATE_EPOCH=0 before and
    after the change and successfully confirmed that the identical binary
    is generated (the only exception was igep00x0, which does not define
    CONFIG_ENV_IS_IN_UBI in the original board header. Once that is
    defined, the test passes too).

    hs: rebased patch to:
    68b90e57bc: "configs: tinker-rk3288 disable CONFIG_SPL_I2C_SUPPORT"

    Signed-off-by: Markus Klotzbuecher
    Cc: Heiko Schocher
    Cc: Eugen Hristev
    Cc: Tom Rini

    Markus Klotzbuecher
     
  • Introduce the KConfig option CONFIG_ENV_UBI_VOLUME_REDUND for defining
    the name of the UBI volume used to store the redundant environment.

    Signed-off-by: Markus Klotzbuecher
    Reviewed-by: Heiko Schocher
    Cc: Kyungmin Park

    hs: get rid of stm32mp1* build errors

    Markus Klotzbuecher
     

17 Jun, 2019

1 commit


13 Jun, 2019

1 commit