1. 23 May, 2019 1 commit
    • Patrick Delaunay's avatar
      env: solve compilation error in SPL · 7d477654
      Patrick Delaunay authored
      Solve compilation issue when cli_simple.o is used in SPL
      and CONFIG_SPL_ENV_SUPPORT is not defined.
      
      env/built-in.o:(.data.env_htab+0xc): undefined reference to `env_flags_validate'
      u-boot/scripts/Makefile.spl:384: recipe for target 'spl/u-boot-spl' failed
      make[2]: *** [spl/u-boot-spl] Error 1
      u-boot/Makefile:1649: recipe for target 'spl/u-boot-spl' failed
      make[1]: *** [spl/u-boot-spl] Error 2
      Signed-off-by: default avatarPatrick Delaunay <patrick.delaunay@st.com>
      7d477654
  2. 26 Jan, 2019 1 commit
    • Sam Protsenko's avatar
      env: common: Return specific error code on bad CRC · 49d04c58
      Sam Protsenko authored
      Callers of env_import*() functions might want to check the case when we
      have incorrect environment (with bad CRC). For example, when environment
      location is being defined in env_load(), call chain may look like this:
      
          env_load() -> drv->load() = env_mmc_load() -> env_import()
      
      Return code will be passed from env_import() all way up to env_load().
      Right now both env_mmc_load() and env_import() return -EIO error code,
      so env_load() can't differentiate between two cases:
        1. Driver reports the error, because device is not accessible
        2. Device is actually accessible, but environment is broken
      
      Let's return -ENOMSG in env_import(), so we can distinguish two cases
      mentioned above. It will make it possible to continue working with "bad
      CRC" environment (like doing "env save"), instead of considering it not
      functional (implemented in subsequent patch).
      Signed-off-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
      Reviewed-by: default avatarSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
      49d04c58
  3. 15 Jan, 2019 1 commit
  4. 20 Jul, 2018 1 commit
  5. 19 Jul, 2018 3 commits
    • Yaniv Levinsky's avatar
      env: common: accept flags on reset to default env · c5d548a9
      Yaniv Levinsky authored
      The function set_default_env() sets the hashtable flags for import_r().
      Formally set_default_env() doesn't accept flags from its callers. In
      practice the caller can (un)set the H_INTERACTIVE flag, but it has to be
      done using the first character of the function's string argument. Other
      flags like H_FORCE can't be set by the caller.
      
      Change the function to accept flags argument. The benefits are:
      1. The caller will have to explicitly set the H_INTERACTIVE flag,
         instead of un-setting it using a special char in a string.
      2. Add the ability to propagate flags from the caller to himport(),
         especially the H_FORCE flag from do_env_default() in nvedit.c that
         currently gets ignored for "env default -a -f" commands.
      3. Flags and messages will not be coupled together. A caller will be
         able to set flags without passing a string and vice versa.
      
      Please note:
      The propagation of H_FORCE from do_env_default() does not introduce any
      functional changes, because currently himport_r() is set to destroy the
      old environment regardless if H_FORCE flag is set or not. More changes
      are needed to utilize the propagation of H_FORCE.
      Signed-off-by: default avatarYaniv Levinsky <yaniv.levinsky@compulab.co.il>
      Acked-by: default avatarIgor Grinberg <grinberg@compulab.co.il>
      c5d548a9
    • Yaniv Levinsky's avatar
      cmd: nvedit: set H_INTERACTIVE in do_env_default · 5a04264e
      Yaniv Levinsky authored
      The function set_default_vars() in common.c adds H_INTERACTIVE to the
      h_import() flag, but the function has no way of telling if the command
      actually was user directed like this flag suggest. The flag should be
      set by the calling function do_env_default() in nvedit.c instead, where
      the command is certainty user directed.
      
      Move the H_INTERACTIVE flag from set_default_vars() to do_env_default().
      Signed-off-by: default avatarYaniv Levinsky <yaniv.levinsky@compulab.co.il>
      Acked-by: default avatarIgor Grinberg <grinberg@compulab.co.il>
      5a04264e
    • Yaniv Levinsky's avatar
      cmd: nvedit: propagate envflag to set_default_vars · 477f8116
      Yaniv Levinsky authored
      The env_flag in do_env_default() doesn't get propagated and therefore
      gets ignored by himport_r(). This breaks to ability to "forcibly" reset
      variables to their default values using the environment command.
      
      Scenario example of the problem:
      	# setenv kernel uImage
      	# setenv .flags kernel:so
      	# env default -f kernel
      	## Error: Can't overwrite "kernel"
      	himport_r: can't insert "kernel=zImage" into hash table
      
      Change the call path so it will pass the flag correctly.
      Signed-off-by: default avatarYaniv Levinsky <yaniv.levinsky@compulab.co.il>
      Acked-by: default avatarIgor Grinberg <grinberg@compulab.co.il>
      477f8116
  6. 07 May, 2018 1 commit
    • Tom Rini's avatar
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini authored
      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: default avatarTom Rini <trini@konsulko.com>
      83d290c5
  7. 17 Apr, 2018 1 commit
  8. 01 Feb, 2018 2 commits
  9. 27 Jan, 2018 1 commit
  10. 21 Nov, 2017 1 commit
  11. 04 Oct, 2017 1 commit
    • Masahiro Yamada's avatar
      treewide: replace with error() with pr_err() · 9b643e31
      Masahiro Yamada authored
      U-Boot widely uses error() as a bit noisier variant of printf().
      
      This macro causes name conflict with the following line in
      include/linux/compiler-gcc.h:
      
        # define __compiletime_error(message) __attribute__((error(message)))
      
      This prevents us from using __compiletime_error(), and makes it
      difficult to fully sync BUILD_BUG macros with Linux.  (Notice
      Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)
      
      Let's convert error() into now treewide-available pr_err().
      
      Done with the help of Coccinelle, excluing tools/ directory.
      
      The semantic patch I used is as follows:
      
      // <smpl>
      @@@@
      -error
      +pr_err
       (...)
      // </smpl>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      [trini: Re-run Coccinelle]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      9b643e31
  12. 21 Aug, 2017 1 commit
  13. 16 Aug, 2017 5 commits
  14. 15 Aug, 2017 6 commits
  15. 22 Jul, 2017 1 commit
  16. 12 Apr, 2017 1 commit
  17. 07 Oct, 2016 1 commit
  18. 16 Jul, 2016 1 commit
    • Robert P. J. Day's avatar
      Various, unrelated tree-wide typo fixes. · 62a3b7dd
      Robert P. J. Day authored
          Fix a number of typos, including:
      
           * "compatble" -> "compatible"
           * "eanbeld" -> "enabled"
           * "envrionment" -> "environment"
           * "FTD" -> "FDT" (for "flattened device tree")
           * "ommitted" -> "omitted"
           * "overriden" -> "overridden"
           * "partiton" -> "partition"
           * "propogate" -> "propagate"
           * "resourse" -> "resource"
           * "rest in piece" -> "rest in peace"
           * "suport" -> "support"
           * "varible" -> "variable"
      Signed-off-by: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
      62a3b7dd
  19. 06 Jun, 2016 1 commit
  20. 22 Jul, 2014 1 commit
  21. 18 Jul, 2014 1 commit
  22. 21 Mar, 2014 2 commits
  23. 14 Oct, 2013 1 commit
  24. 20 Aug, 2013 1 commit
  25. 24 Jul, 2013 1 commit
  26. 13 Dec, 2012 2 commits