1. 28 May, 2014 3 commits
  2. 23 May, 2014 1 commit
  3. 16 May, 2014 1 commit
  4. 12 May, 2014 1 commit
    • Andreas Bießmann's avatar
      lib/sha256: fix compile on some hosts · 822ef00e
      Andreas Bießmann authored
      Commit 2842c1c2 introduced lib/sha256 into
      mkimage. Since then it will be compiled with HOSTCC which may produce errors
      on some systems. Most BSD systems (like OS X for me) do not ship a
      linux/string.h which will lead to take the U-Boot provided
      include/linux/string.h in the end. This header howver is completely wrong
      here. Just take the string.h if compiling with HOSTCC and linux/string.h when
      Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
      Cc: Heiko Schocher <hs@denx.de>
      Acked-by: Heiko Schocher<hs@denx.de>
  5. 18 Apr, 2014 1 commit
    • Stephen Warren's avatar
      aes: make apply_cbc_chain_data non-static · 53eb768d
      Stephen Warren authored
      Tegra's crypto.c uses apply_cbc_chain_data() to sign the warm restart
      code. This function was recently moved into the core aes.c and made
      static, which prevents the Tegra code from compiling. Make it public
      again to avoid the compile errors:
      arch/arm/cpu/tegra20-common/crypto.c: In function ‘sign_object’:
      arch/arm/cpu/tegra20-common/crypto.c:74:3: warning: implicit declaration of function ‘apply_cbc_chain_data’ [-Wimplicit-function-declaration]
      arch/arm/cpu/built-in.o: In function `sign_object':
      .../arch/arm/cpu/tegra20-common/crypto.c:74: undefined reference to `apply_cbc_chain_data'
      .../arch/arm/cpu/tegra20-common/crypto.c:78: undefined reference to `apply_cbc_chain_data'
      Fixes: 6e7b9f4f ("aes: Move the AES-128-CBC encryption function to common code")
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarMarek Vasut <marex@denx.de>
  6. 02 Apr, 2014 5 commits
    • Przemyslaw Marczak's avatar
      cmd:gpt: randomly generate each partition uuid if undefined · 39206382
      Przemyslaw Marczak authored
      - randomly generate partition uuid if any is undefined and CONFIG_RAND_UUID
        is defined
      - print debug info about set/unset/generated uuid
      - update doc/README.gpt
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Acked-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Cc: Piotr Wilczek <p.wilczek@samsung.com>
      Cc: Tom Rini <trini@ti.com>
      Cc: Stephen Warren <swarren@nvidia.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
    • Przemyslaw Marczak's avatar
      new commands: uuid and guid - generate random unique identifier · 89c8230d
      Przemyslaw Marczak authored
      Those commands basis on implementation of random UUID generator version 4
      which is described in RFC4122. The same algorithm is used for generation
      both ids but string representation is different as below.
      char:  0        9    14   19   24         36
      UUID:     be     be   be   be       be
      GUID:     le     le   le   be       be
      Commands usage:
      - uuid [<varname>]
      - guid [<varname>]
      The result is saved in environment as a "varname" variable if argument is given,
      if not then it is printed.
      New config:
      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
    • 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
      - 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.
      - 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>
    • Przemyslaw Marczak's avatar
      lib: uuid: code refactor for proper maintain between uuid bin and string · d718ded0
      Przemyslaw Marczak authored
      Changes in lib/uuid.c to:
      - uuid_str_to_bin()
      - uuid_bin_to_str()
      New parameter is added to specify input/output string format in listed functions
      This change allows easy recognize which UUID type is or should be stored in given
      string array. Binary data of UUID and GUID is always stored in big endian, only
      string representations are different as follows.
      String byte: 0                                  36
      String char: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
      string UUID:    be     be   be   be       be
      string GUID:    le     le   le   be       be
      This patch also updates functions calls and declarations in a whole code.
      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
    • 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.
      - 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
      - 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
  7. 28 Mar, 2014 2 commits
    • 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>
    • Jonghwa Lee's avatar
      Logo: TIZEN: Change booting logo size to official size. · 028d65fb
      Jonghwa Lee authored
      Since TIZEN group has been used 450 X 140 bmp logo for lunchbox,
      this patch tries to change the logo size from 500 X 150 to official size.
      By reducing image size, we also save about 35KB.
      To make row aligned 4 bytes, add 2 pixels to row. Therefore the real width
      of image size is 452.
      Signed-off-by: default avatarJonghwa Lee <jonghwa3.lee@samsung.com>
      Reviewed-by : Przemyslaw Marczak <p.marczak@samsung.com>
  8. 21 Mar, 2014 7 commits
  9. 18 Mar, 2014 3 commits
  10. 12 Mar, 2014 2 commits
  11. 07 Mar, 2014 1 commit
    • 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.
      defined in include/configs/${BOARD}.h.
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Cc: Sonic Zhang <sonic.zhang@analog.com>
  12. 04 Mar, 2014 1 commit
  13. 26 Feb, 2014 1 commit
    • 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>
  14. 19 Feb, 2014 2 commits
    • 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:
      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>
    • 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
      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>
  15. 03 Feb, 2014 2 commits
  16. 24 Jan, 2014 2 commits
  17. 14 Jan, 2014 1 commit
    • Antonios Vamporakis's avatar
      lzma: fix buffer bound check error · 4d3b8a0d
      Antonios Vamporakis authored
      Variable uncompressedSize references the space available, while outSizeFull is
      the actual expected uncompressed size. Using the wrong value causes LzmaDecode
      to return SZ_ERROR_INPUT_EOF. Problem was introduced in commit afca2942. While
      at it add additional debug message.
      Signed-off-by: default avatarAntonios Vamporakis <ant@area128.com>
      CC: Kees Cook <keescook@chromium.org>
      CC: Simon Glass <sjg@chromium.org>
      CC: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
      CC: Luka Perkov <luka@openwrt.org>
  18. 09 Jan, 2014 1 commit
  19. 13 Dec, 2013 1 commit
    • Stephen Warren's avatar
      time: fix usec_to_tick() · 2cd1b572
      Stephen Warren authored
      Commit 8dfafdde ("Introduce common timer functions") created a
      common definition of usec_to_tick() which had a couple problems:
      static unsigned long long usec_to_tick(unsigned long usec)
             uint64_t tick = usec * get_tbclk();
      That likely overflows.
             usec *= get_tbclk();
      That was an attempt to fix it by performing the multiply after the
      promotion of usec to 64-bit, but was applied to the wrong variable,
      which was never used.
      This patch fixes these issues. A user-visible symptom of the problem was
      the e.g. "dhcp zImage" using an ASIX USB Ethernet dongle would print:
      Waiting for Ethernet connection... unable to connect.
      ... with no delay before "unable to connect". There are likely other
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarRob Herring <rob.herring@calxeda.com>
  20. 25 Nov, 2013 1 commit
  21. 21 Nov, 2013 1 commit