26 Aug, 2014

2 commits

  • - 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: Heiko Schocher
    Cc: Marek Vasut
    Cc: Anatolij Gustschin
    [trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from
    usb/lin_gadet_compat.h]
    Signed-off-by: Tom Rini

    Heiko Schocher
     
  • from linux 3.14:

    commit 455c6fdbd219161bd09b1165f11699d6d73de11c
    Author: Linus Torvalds
    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: Heiko Schocher
    Cc: Marek Vasut
    Cc: Sergey Lapin
    Cc: Scott Wood
    Cc: Tom Rini

    Heiko Schocher
     

23 Jun, 2014

1 commit

  • 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

    With this patch, it boots again with CONFIG_SYS_GENERIC_BOARD
    enabled.

    Signed-off-by: Heiko Schocher
    Acked-by: Simon Glass
    Cc: Tom Rini

    Heiko Schocher
     

23 May, 2014

1 commit


03 Apr, 2014

2 commits

  • 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: Przemyslaw Marczak
    Cc: Stephen Warren
    Cc: Lukasz Majewski
    [trini: Add CONFIG_EFI_PARTITION to fallbacks]
    Signed-off-by: Tom Rini

    Przemyslaw Marczak
     
  • This commit introduces cleanup for uuid library.
    Changes:
    - move uuidstring 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: Przemyslaw Marczak
    Cc: Stephen Warren
    Cc: Lukasz Majewski
    Cc: trini@ti.com

    Przemyslaw Marczak
     

29 Mar, 2014

1 commit

  • 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: Przemyslaw Marczak
    Cc: Michael Walle
    Cc: Tom Rini
    Cc: Masahiro Yamada

    Przemyslaw Marczak
     

07 Mar, 2014

1 commit

  • 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: Masahiro Yamada
    Cc: Sonic Zhang

    Masahiro Yamada
     

27 Feb, 2014

1 commit

  • 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
    Cc: Mans Rullgard
    Signed-off-by: Tom Rini

    Tom Rini
     

20 Feb, 2014

2 commits

  • 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: Masahiro Yamada
    Tested-by: Gerhard Sittig

    Masahiro Yamada
     
  • 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 " 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="
    syntax for descending into sub-directories.
    (We can write it like "make $(obj)=" with a shorthand.)
    This means the current working directory is always the top
    of the output directory.

    Signed-off-by: Masahiro Yamada
    Tested-by: Gerhard Sittig

    Masahiro Yamada
     

09 Jan, 2014

1 commit

  • Add an implementation of the CRC8 algorithm. This is required by the TPM
    emulation, but is probably useful to U-Boot in general.

    Signed-off-by: Simon Glass

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

    Simon Glass
     

25 Nov, 2013

1 commit


01 Nov, 2013

1 commit


24 Jul, 2013

1 commit


26 Jun, 2013

1 commit

  • 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: Simon Glass

    Simon Glass
     

21 Jun, 2013

1 commit

  • Move the common makefile line shared by the SPL and non-SPL to the public area,
    so that we can avoid excessive SPL symbols. Some of them will be used by the
    SPL later.

    This patch is on top of the patch "common/Makefile: Add new symbol
    CONFIG_SPL_ENV_SUPPORT for environment in SPL".

    Signed-off-by: Ying Zhang
    Acked-by: Tom Rini
    Acked-by: Tom Rini
    Signed-off-by: Andy Fleming

    Ying Zhang
     

06 May, 2013

1 commit

  • This patch adds the bitrev library from the linux kernel. This is a simple
    algorithm that uses an 8 bit look-up table to reverse the bits in data types of
    8, 16, or 32 bit widths. The docg4 nand flash driver uses it.

    [port from linux kernel v3.9 commit 7ee32a6d30d1c8a3b7a07a6269da8f0a08662927]
    [originally added: v2.6.20 by commit a5cfc1ec58a07074dacb6aa8c79eff864c966d12]

    Signed-off-by: Mike Dunn

    Mike Dunn
     

02 May, 2013

2 commits

  • Delete all occurrences of hang() and provide a generic function.

    Signed-off-by: Andreas Bießmann
    Acked-by: Albert ARIBAUD
    [trini: Modify check around puts() in hang.c slightly]
    Signed-off-by: Tom Rini

    Andreas Bießmann
     
  • Downloaded from http://slre.sourceforge.net/
    and adapted for U-Boot environment.

    Used to implement regex operations on environment variables.
    Code size is ~ 3.5 KiB on PPC.

    To enable this code, define the CONFIG_REGEX option in your board
    config file.

    Note: There are more recent versions of the SLRE library available at
    http://slre.googlecode.com ; unfortunately, the new code has a heavily
    reorked API which makes it less usable for our purposes:
    - the return code is strings, which are more difficult to process
    - we don't get any information any more which sub-string of the data
    was matched by the given regex
    - it is much more cumbersome to work with arbitrary expressions, where
    for example the number of substrings for capturing are not known at
    compile time
    Also, there does not seem to be any real changes or improvements of
    the functionality.

    Because of this, we deliberately stick with the older code.

    Note 2: the test code (built when SLRE_TEST is defined) was modified
    to allow for more extensive testing; now we can test the regexp
    matching on all lines on a text file (instead of the whole data in the
    file as a single block).

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk
     

15 Apr, 2013

1 commit


13 Apr, 2013

1 commit

  • TPM command library implements a subset of TPM commands defined in TCG
    Main Specification 1.2 that are useful for implementing secure boot.
    More TPM commands could be added out of necessity.

    You may exercise these commands through the 'tpm' command. However, the
    raw TPM commands are too primitive for writing secure boot in command
    interpreter scripts; so the 'tpm' command also provides helper functions
    to make scripting easier.

    For example, to define a counter in TPM non-volatile storage and
    initialize it to zero:

    $ tpm init
    $ tpm startup TPM_ST_CLEAR
    $ tpm nv_define d 0x1001 0x1
    $ tpm nv_write d 0x1001 0

    And then increment the counter by one:

    $ tpm nv_read d 0x1001 i
    $ setexpr.l i $i + 1
    $ tpm nv_write d 0x1001 $i

    Signed-off-by: Che-Liang Chiou

    Che-liang Chiou
     

08 Apr, 2013

1 commit

  • The kernel states:

    ---88---

    And we do so in u-boot.

    This implementation uses the same layout for BCH8 but it is fix. The current
    provided layout does only work with 64 Byte OOB.

    Signed-off-by: Andreas Bießmann
    Cc: Tom Rini
    Cc: Ilya Yanok
    Cc: Scott Wood
    Cc: Mansoor Ahamed
    Cc: Thomas Weber

    Andreas Bießmann
     

16 Mar, 2013

1 commit


14 Dec, 2012

1 commit

  • isspace() and strim() are not in the typical user-mode string.h, so
    put them in a separate compilation unit so that they can be built into
    tools that need them independent of the other common string functions.

    This allows code shared by u-boot and the linux user-mode tools to link.

    Signed-off-by: Joe Hershberger

    Joe Hershberger
     

07 Dec, 2012

1 commit


16 Oct, 2012

1 commit

  • Under option -munaligned-access, gcc can perform local char
    or 16-bit array initializations using misaligned native
    accesses which will throw a data abort exception. Fix files
    where these array initializations were unneeded, and for
    files known to contain such initializations, enforce gcc
    option -mno-unaligned-access.

    Signed-off-by: Albert ARIBAUD
    [trini: Switch to usign call cc-option for -mno-unaligned-access as
    Albert had done previously as that's really correct]
    Signed-off-by: Tom Rini

    Albert ARIBAUD
     

02 Oct, 2012

1 commit

  • This patch adds support for networking in SPL. Some devices are
    capable of loading SPL via network so it makes sense to load the
    main U-Boot binary via network too. This patch tries to use
    existing network code as much as possible. Unfortunately, it depends
    on environment which in turn depends on other code so SPL size
    is increased significantly. No effort was done to decouple network
    code and environment so far.

    Signed-off-by: Ilya Yanok
    Acked-by: Joe Hershberger
    Signed-off-by: Tom Rini

    Ilya Yanok
     

29 Sep, 2012

1 commit


07 Jul, 2012

3 commits


15 May, 2012

1 commit

  • Add support for AES using an implementation from Karl Malbrain.
    This offers small code size (around 5KB on ARM) and supports 128-bit
    AES only.

    Signed-off-by: Yen Lin
    Signed-off-by: Simon Glass
    Signed-off-by: Tom Warren

    Yen Lin
     

29 Mar, 2012

1 commit

  • The fdtdec_find_aliases_for_id() function is complicated enough that
    it really should have some tests. This does not necessarily need to be
    committed to U-Boot, but it might be useful.

    (note there are a few minor inconsistencies with this patch which will be
    cleaned up when the USB series is applied)

    Signed-off-by: Simon Glass
    Signed-off-by: Tom Warren

    Simon Glass
     

27 Mar, 2012

1 commit

  • Adds support for loading U-Boot from UART using YMODEM protocol.
    If YMODEM support is enabled in SPL and the romcode indicates
    that SPL loaded via UART then SPL will wait for start of a
    YMODEM transfer via the console port.

    Signed-off-by: Matt Porter
    Signed-off-by: Tom Rini

    Matt Porter
     

27 Jan, 2012

1 commit

  • [backport from linux commit 02f8c6aee8df3cdc935e9bdd4f2d020306035dbe]

    This patch merges the BCH ECC algorithm from the 3.0 Linux kernel.
    This enables U-Boot to support modern NAND flash chips that
    require more than 1-bit of ECC in software.

    Signed-off-by: Christian Hitz
    Cc: Scott Wood
    Signed-off-by: Scott Wood

    Christian Hitz
     

24 Dec, 2011

1 commit


27 Oct, 2011

1 commit

  • This library provides useful functions to drivers which want to use
    the fdt to control their operation. Functions are provided to:

    - look up and enumerate a device type (for example assigning i2c bus 0,
    i2c bus 1, etc.)
    - decode basic types from the fdt, like addresses and integers

    While this library is not strictly necessary, it helps to minimise the
    changes to a driver, in order to make it work under fdt control. Less
    code is required, and so the barrier to switch drivers over is lower.

    Additional functions to read arrays and GPIOs could be made available
    here also.

    Signed-off-by: Simon Glass

    Simon Glass
     

18 Oct, 2011

1 commit


26 Jul, 2011

1 commit