Skip to content
Snippets Groups Projects
  1. Oct 08, 2016
    • B, Ravi's avatar
      spl: saveenv: adding saveenv support in SPL · d2d9bdfc
      B, Ravi authored
      
      By default saveenv option is not supported for SPL. This patch
      enable the support for save environment variable for SPL build.
      
      Enable save environment support in SPL after setenv. By default
      the saveenv option is not provided in SPL, but some boards need
      this support in 'Falcon' boot, where SPL need to boot from
      different images based on environment variable set by OS. For
      example OS may set "reboot_image" environment variable to
      "recovery" inorder to boot recovery image by SPL. The SPL read
      "reboot_image" and act accordingly and change the reboot_image
      to default mode using setenv and save the environemnt.
      
      Signed-off-by: default avatarRavi Babu <ravibabu@ti.com>
      Reviewed-by: default avatarSimon Glass <sig@chromium.org>
      
      change in v1:
      	- dropped SUPPORT, use CONFIG_SPL_SAVEENV
      	- updates the comments in mmc_private.h
      d2d9bdfc
  2. Sep 16, 2016
    • Simon Glass's avatar
      Use separate options for TPL support · 76f1f388
      Simon Glass authored
      
      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: default avatarSimon Glass <sjg@chromium.org>
      76f1f388
  3. Jul 15, 2016
  4. Jun 12, 2016
  5. Jun 06, 2016
  6. Mar 16, 2016
  7. Mar 14, 2016
    • Simon Glass's avatar
      fdt: Allow libfdt to be used in SPL · aa34fbc0
      Simon Glass authored
      
      Add an option to enable libfdt in SPL. This can be useful when decoding
      FIT files in SPL.
      
      We need to make sure this option is not enabled in SPL by this change.
      Also this option needs to be enabled in host builds. Si add a new
      IMAGE_USE_LIBFDT #define which can be used in files that are built on the
      host but must also build for U-Boot and SPL.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      aa34fbc0
  8. Feb 15, 2016
    • Stephen Warren's avatar
      Makefile: remove BUILD_TAG from KBUILD_CFLAGS · 15b51878
      Stephen Warren authored
      
      If BUILD_TAG is part of KBUILD_CFLAGS, then any time the value changes,
      all files get rebuilt. In a continuous integration environment, the value
      will change every build. This wastes time, assuming that incremental
      builds would otherwise occur.
      
      To solve this, remove BUILD_TAG from KBUILD_CFLAGS and add it to CFLAGS
      for just the one file that uses it. This does have the disadvantage that
      if any other files want to use the flag, we'll need to duplicate this
      custom CFLAGS setup logic. However, it seems unlikely we'll need this.
      
      An alternative would be to add BUILD_TAG to the "local version" and remove
      the special case code from display_options.c. However, that would affect
      the format of the U-Boot signon message, which may negatively affect
      people looking for specific data there. The approach of using
      file-specific CFLAGS was suggested by Masahiro Yamada.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Reviewed-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      15b51878
  9. Dec 14, 2015
  10. Nov 23, 2015
    • Stefan Roese's avatar
      lib/tiny-printf.c: Add tiny printf function for space limited environments · 7d9cde10
      Stefan Roese authored
      This patch adds a small printf() version that supports all basic formats.
      Its intented to be used in U-Boot SPL versions on platforms with very
      limited internal RAM sizes.
      
      To enable it, just define CONFIG_USE_TINY_PRINTF in your defconfig. This
      will result in the SPL using this tiny function and the main U-Boot
      still using the full-blown printf() function.
      
      This code was copied from:
      http://www.sparetimelabs.com/printfrevisited
      
      
      With mostly only coding style related changes so that its checkpatch
      clean.
      
      The size reduction is about 2.5KiB. Here a comparison for the db-mv784mp-gp
      (Marvell AXP) SPL:
      
      Without this patch:
        58963   18536    1928   79427   13643 ./spl/u-boot-spl
      
      With this patch:
        56542   18536    1956   77034   12cea ./spl/u-boot-spl
      
      Note:
      To make it possible to compile tiny-printf.c instead of vsprintf.c when
      CONFIG_USE_TINY_PRINTF is defined, the functions printf() and vprintf() are
      moved from common/console.c into vsprintf.c in this patch.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      7d9cde10
  11. Nov 20, 2015
  12. Oct 11, 2015
    • Julius Werner's avatar
      Add support for LZ4 decompression algorithm · 027b728d
      Julius Werner authored
      
      This patch adds support for LZ4-compressed FIT image contents. This
      algorithm has a slightly worse compression ration than LZO while being
      nearly twice as fast to decompress. When loading images from a fast
      storage medium this usually results in a boot time win.
      
      Sandbox-tested only since I don't have a U-Boot development system set
      up right now. The code was imported unchanged from coreboot where it's
      proven to work, though. I'm mostly interested in getting this recognized
      by mkImage for use in a downstream project.
      
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      027b728d
  13. Aug 18, 2015
  14. Aug 05, 2015
  15. Jul 21, 2015
  16. Apr 23, 2015
  17. Dec 11, 2014
    • Przemyslaw Marczak's avatar
      lib: errno: introduce errno_str(): returns errno related message · 59345b1f
      Przemyslaw Marczak authored
      
      The functions error's numbers are standarized - but the error
      messages are not.
      
      The errors are often handled with unclear error messages,
      so why not use an errno standarized messages.
      
      Advantages:
      - This could decrease the binary size.
      - Appended with a detailed information,
        the error message will be clear.
      
      This commit introduces new function:
      - const char *errno_to_str(int errno)
      
      The functions returns a pointer to the errno corresponding text message:
      - if errno is null or positive number - a pointer to "Success" message
      - if errno is negative - a pointer to errno related message
      
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Reviewed-by: default avatarTom Rini <trini@ti.com>
      59345b1f
  18. Dec 08, 2014
  19. Aug 25, 2014
    • Heiko Schocher's avatar
      lib, linux: move linux specific defines to linux/compat.h · 0c06db59
      Heiko Schocher authored
      
      - move linux specific defines from usb and video code
        into linux/compat.h
      - move common linux specific defines from include/ubi_uboot.h
        to linux/compat.h
      - add for new mtd/ubi/ubifs sync new needed linux specific
        defines to linux/compat.h
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Anatolij Gustschin <agust@denx.de>
      [trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from
      usb/lin_gadet_compat.h]
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      0c06db59
    • Heiko Schocher's avatar
      lib, list_sort: add list_sort from linux 3.14 · c068d44a
      Heiko Schocher authored
      
      from linux 3.14:
      
      commit 455c6fdbd219161bd09b1165f11699d6d73de11c
      Author: Linus Torvalds <torvalds@linux-foundation.org>
      Date:   Sun Mar 30 20:40:15 2014 -0700
      
          Linux 3.14
      
      Needed for the MTD/UBI/UBIFS resync
      
      Just copied the files from Linux, and added in the c-file
      the "#define __UBOOT__" for adding U-Boot special code. In
      this case we use this just for adding including U-Boot
      headers.
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Sergey Lapin <slapin@ossfans.org>
      Cc: Scott Wood <scottwood@freescale.com>
      Cc: Tom Rini <trini@ti.com>
      c068d44a
  20. Jun 23, 2014
    • Heiko Schocher's avatar
      lib, fdt: move fdtdec_get_int() out of lib/fdtdec.c · b047d671
      Heiko Schocher authored
      
      move fdtdec_get_int() out of lib/fdtdec.c into lib/fdtdec_common.c
      as this function is also used, if CONFIG_OF_CONTROL is not
      used. Poped up on the ids8313 board using signed FIT images,
      and activating CONFIG_SYS_GENERIC_BOARD. Without this patch
      it shows on boot:
      
      No valid FDT found - please append one to U-Boot binary, use u-boot-dtb.bin or define CONFIG_OF_EMBED. For sandbox, use -d <file.dtb>
      
      With this patch, it boots again with CONFIG_SYS_GENERIC_BOARD
      enabled.
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Cc: Tom Rini <trini@ti.com>
      b047d671
  21. May 23, 2014
  22. Apr 02, 2014
    • Przemyslaw Marczak's avatar
      lib: uuid: add functions to generate UUID version 4 · 4e4815fe
      Przemyslaw Marczak authored
      This patch adds support to generate UUID (Universally Unique Identifier)
      in version 4 based on RFC4122, which is randomly.
      
      Source: https://www.ietf.org/rfc/rfc4122.txt
      
      
      
      Changes:
      - new configs:
        - CONFIG_LIB_UUID for compile lib/uuid.c
        - CONFIG_RANDOM_UUID for functions gen_rand_uuid() and gen_rand_uuid_str()
      - add configs dependency to include/config_fallbacks.h for lib uuid.
      
      lib/uuid.c:
      - add gen_rand_uuid() - this function writes 16 bytes len binary representation
        of UUID v4 to the memory at given address.
      
      - add gen_rand_uuid_str() - this function writes 37 bytes len hexadecimal
        ASCII string representation of UUID v4 to the memory at given address.
      
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Cc: Stephen Warren <swarren@nvidia.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      [trini: Add CONFIG_EFI_PARTITION to fallbacks]
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      4e4815fe
    • Przemyslaw Marczak's avatar
      part_efi: move uuid<->string conversion functions into lib/uuid.c · a96a0e61
      Przemyslaw Marczak authored
      
      This commit introduces cleanup for uuid library.
      Changes:
      - move uuid<->string conversion functions into lib/uuid.c so they can be
        used by code outside part_efi.c.
      - rename uuid_string() to uuid_bin_to_str() for consistency with existing
        uuid_str_to_bin()
      - add an error return code to uuid_str_to_bin()
      - update existing code to the new library functions.
      
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Cc: Stephen Warren <swarren@nvidia.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: trini@ti.com
      a96a0e61
  23. Mar 28, 2014
    • Przemyslaw Marczak's avatar
      lib: rand: introduce new configs: CONFIG_LIB_RAND and CONFIG_LIB_HW_RAND · 3c1c68cc
      Przemyslaw Marczak authored
      
      New configs:
      - CONFIG_LIB_RAND    - to enable implementation of rand library in lib/rand.c
      - CONFIG_LIB_HW_RAND - to enable hardware based implementations of lib rand
      
      Other changes:
      - add CONFIG_LIB_RAND to boards configs which needs rand()
      - put only one rand.o dependency in lib/Makefile
      
      CONFIG_LIB_HW_RAND should be defined for drivers which implements rand library
      (declared in include/common.h):
      - void srand(unsigned int seed)
      - unsigned int rand(void)
      - unsigned int rand_r(unsigned int *seedp)
      
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Cc: Michael Walle <michael@walle.cc>
      Cc: Tom Rini <trini@ti.com>
      Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
      3c1c68cc
  24. Mar 07, 2014
    • Masahiro Yamada's avatar
      kbuild, blackfin: Add CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED · e91df49f
      Masahiro Yamada authored
      
      Many (but not all) of Blackfin boards give -O2 option
      to compile under lib/ directory.
      That means lib/ should be speed-optimized,
      whereas other parts should be size-optimized.
      
      We want to keep the same behavior,
      but do not want to parse board/*/config.mk again and again.
      We've got no choice but to invent a new method.
      
      CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED, if it is enabled,
      gives -O2 flag only for building under lib/ directory.
      
      Dirty codes which I had marked as "FIX ME"
      in board/${BOARD}/config.mk have been deleted.
      Instead, CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED has been
      defined in include/configs/${BOARD}.h.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Cc: Sonic Zhang <sonic.zhang@analog.com>
      e91df49f
  25. Feb 26, 2014
    • Tom Rini's avatar
      arm: Switch to -mno-unaligned-access when supported by the compiler · 1551df35
      Tom Rini authored
      
      When we tell the compiler to optimize for ARMv7 (and ARMv6 for that
      matter) it assumes a default of SCTRL.A being cleared and unaligned
      accesses being allowed and fast at the hardware level.  We set this bit
      and must pass along -mno-unaligned-access so that the compiler will
      still breakdown accesses and not trigger a data abort.
      
      To better help understand the requirements of the project with respect
      to unaligned memory access, the
      Documentation/unaligned-memory-access.txt file has been added as
      doc/README.unaligned-memory-access.txt and is taken from the v3.14-rc1
      tag of the kernel.
      
      Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
      Cc: Mans Rullgard <mans@mansr.com>
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      1551df35
  26. Feb 19, 2014
    • Masahiro Yamada's avatar
      kbuild: use Linux Kernel build scripts · 6825a95b
      Masahiro Yamada authored
      
      Now we are ready to switch over to real Kbuild.
      
      This commit disables temporary scripts:
        scripts/{Makefile.build.tmp, Makefile.host.tmp}
      and enables real Kbuild scripts:
        scripts/{Makefile.build,Makefile.host,Makefile.lib}.
      
      This switch is triggered by the line in scripts/Kbuild.include
        -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
        +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
      
      We need to adjust some build scripts for U-Boot.
      But smaller amount of modification is preferable.
      
      Additionally, we need to fix compiler flags which are
      locally added or removed.
      
      In Kbuild, it is not allowed to change CFLAGS locally.
      Instead, ccflags-y, asflags-y, cppflags-y,
      CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
      are prepared for that purpose.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Tested-by: default avatarGerhard Sittig <gsi@denx.de>
      6825a95b
    • Masahiro Yamada's avatar
      kbuild: change out-of-tree build · 9e414032
      Masahiro Yamada authored
      
      This commit changes the working directory
      where the build process occurs.
      
      Before this commit, build process occurred under the source
      tree for both in-tree and out-of-tree build.
      
      That's why we needed to add $(obj) prefix to all generated
      files in makefiles like follows:
        $(obj)u-boot.bin:  $(obj)u-boot
      
      Here, $(obj) is empty for in-tree build, whereas it points
      to the output directory for out-of-tree build.
      
      And our old build system changes the current working directory
      with "make -C <sub-dir>" syntax when descending into the
      sub-directories.
      
      On the other hand, Kbuild uses a different idea
      to handle out-of-tree build and directory descending.
      
      The build process of Kbuild always occurs under the output tree.
      When "O=dir/to/store/output/files" is given, the build system
      changes the current working directory to that directory and
      restarts the make.
      
      Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=<sub-dir>"
      syntax for descending into sub-directories.
      (We can write it like "make $(obj)=<sub-dir>" with a shorthand.)
      This means the current working directory is always the top
      of the output directory.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Tested-by: default avatarGerhard Sittig <gsi@denx.de>
      9e414032
  27. Jan 09, 2014
  28. Nov 25, 2013
  29. Oct 31, 2013
  30. Jul 24, 2013
  31. Jun 26, 2013
    • Simon Glass's avatar
      Add trace library · b2e16a85
      Simon Glass authored
      
      Add a library which supports tracing of execution using built-in gcc
      features and a microsecond timer. This can be used to record a list of
      function which are executed, along with a timestamp for each. Later
      this information can be sent to the host for processing.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      b2e16a85
Loading