08 Apr, 2014

1 commit


03 Apr, 2014

5 commits

  • Changes:
    - 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: Przemyslaw Marczak
    Acked-by: Lukasz Majewski
    Cc: Piotr Wilczek
    Cc: Tom Rini
    Cc: Stephen Warren
    Cc: Lukasz Majewski

    Przemyslaw Marczak
     
  • 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
    xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    UUID: be be be be be
    GUID: le le le be be

    Commands usage:
    - uuid []
    - guid []

    The result is saved in environment as a "varname" variable if argument is given,
    if not then it is printed.

    New config:
    - CONFIG_CMD_UUID

    Signed-off-by: Przemyslaw Marczak
    Cc: Stephen Warren
    Cc: Lukasz Majewski
    Cc: trini@ti.com

    Przemyslaw Marczak
     
  • 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
     
  • 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: Przemyslaw Marczak
    Cc: Stephen Warren
    Cc: Lukasz Majewski
    Cc: trini@ti.com

    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

2 commits

  • 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
     
  • 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: Jonghwa Lee
    Reviewed-by : Przemyslaw Marczak

    Jonghwa Lee
     

25 Mar, 2014

1 commit


18 Mar, 2014

3 commits

  • Add a simple LCD driver which uses SDL to display the image. We update the
    image regularly, while still providing for reasonable performance.

    Adjust the common lcd code to support sandbox.

    For command-line runs we do not want the LCD to be displayed, so add a
    --show_lcd option to enable it.

    Tested-by: Che-Liang Chiou
    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a simple emulation of the Chrome OS EC for sandbox, so that it can
    perform various EC tasks such as keyboard handling.

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

    Simon Glass
     
  • A flash map describes the layout of flash memory in terms of offsets and
    sizes for each region. Add a function to read a flash map entry from the
    device tree.

    Reviewed-by: Che-Liang Chiou
    Signed-off-by: Simon Glass

    Simon Glass
     

12 Mar, 2014

2 commits


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
     

05 Mar, 2014

1 commit

  • Add 64-bit data for memory commands, such as md, mw, mm, cmp. The new
    size ".q " is introduced.

    For 64-bit architecture, 64-bit data is enabled by default, by detecting
    compiler __LP64__. It is optional for other architectures.

    Signed-off-by: York Sun

    York Sun
     

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
     

13 Feb, 2014

1 commit


04 Feb, 2014

1 commit

  • Tegra124's MMC controller is very similar to earlier SoC generations,
    and can be supported by the same driver.

    However, there are some non-backwards-compatible HW differences, and
    hence a new DT compatible value must be used to describe the HW. This
    patch updates the driver to support that new compatible value.

    That said, the HW differences are only relevant when enabling certain
    high-performance transfer modes. Since the driver is currently very
    simple and doesn't enable those modes, we don't actually need to address
    any of these HW differences in the code yet, hence the simple nature of
    this patch.

    Signed-off-by: Stephen Warren
    Acked-by: Pantelis Antoniou
    Tested-by: Thierry Reding
    Acked-by: Simon Glass
    Signed-off-by: Tom Warren

    Stephen Warren
     

03 Feb, 2014

1 commit

  • Changes:
    - check image bpp instead of resolution when returns logo address
    - remove 32bpp logo
    - add 16bpp logo in two formats: bmp and gzipped bmp
    - init logo address with "0" for unsupported bpp mode
    - update boards configs with proper image size for gunzip
    - extend structure vidinfo by two fields: logo_x_offset and logo_y_offset.

    Signed-off-by: Przemyslaw Marczak
    Tested-by: Hyungwon Hwang
    Signed-off-by: Minkyu Kang

    Przemyslaw Marczak
     

25 Jan, 2014

2 commits

  • When CONFIG_SYS_VSNPRINTF is enabled, it protects print operations
    such as sprintf, snprintf, vsnprintf, etc., from buffer overflows.
    But vsnprintf_internal includes the terminating NULL character in
    the calculation of number of characters written. This affects sprintf
    and snprintf return values. Fix this issue by setting pointer 'str'
    back to the location of the '\0'.

    Signed-off-by: Darwin Rambo
    Reviewed-by: Steve Rae

    Darwin Rambo
     
  • If timer_init() is made a weak stub function, then it allows us to
    remove several empty timer_init functions for those boards that
    already have a timer initialized when u-boot starts. Architectures
    that use the timer framework may also remove the need for timer.c.

    Signed-off-by: Darwin Rambo
    Reviewed-by: Tim Kryger

    Darwin Rambo
     

14 Jan, 2014

1 commit

  • 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 afca294. While
    at it add additional debug message.

    Signed-off-by: Antonios Vamporakis
    CC: Kees Cook
    CC: Simon Glass
    CC: Daniel Schwierzeck
    CC: Luka Perkov

    Antonios Vamporakis
     

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
     

13 Dec, 2013

1 commit

  • Commit 8dfafdde88eb ("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
    symptoms.

    Signed-off-by: Stephen Warren
    Acked-by: Rob Herring

    Stephen Warren
     

25 Nov, 2013

2 commits


22 Nov, 2013

1 commit


18 Nov, 2013

1 commit


11 Nov, 2013

1 commit

  • Commit 8dfafdde88eb3e71d5569846396ae67a91017232 introduced
    new gcc warnings on MIPS64:

    time.c: In function 'tick_to_time':
    time.c:59:2: warning: comparison of distinct pointer types lacks a cast [enabled by default]
    time.c:59:2: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default]
    In file included from time.c:10:0:
    ./u-boot-mips/include/div64.h:22:17: note: expected 'uint64_t *' but argument is of type 'long long unsigned int *'
    time.c: In function 'usec_to_tick':
    time.c:76:2: warning: comparison of distinct pointer types lacks a cast [enabled by default]
    time.c:76:2: warning: passing argument 1 of '__div64_32' from incompatible pointer type [enabled by default]
    In file included from time.c:10:0:
    ./u-boot-mips/include/div64.h:22:17: note: expected 'uint64_t *' but argument is of type 'long long unsigned int *'

    Signed-off-by: Daniel Schwierzeck

    Daniel Schwierzeck
     

09 Nov, 2013

2 commits


05 Nov, 2013

2 commits

  • Many platforms duplicate pretty much the same timer code yet they all have
    a 32-bit freerunning counter register. Create a common implementation that
    minimally requires 2 or 3 defines to add timer support:

    CONFIG_SYS_TIMER_RATE - Clock rate of the timer counter
    CONFIG_SYS_TIMER_COUNTER - Address of 32-bit counter
    CONFIG_SYS_TIMER_COUNTS_DOWN - Define if counter counts down

    All functions are weak or ifdef'ed so they can still be overriden by any
    platform.

    Signed-off-by: Rob Herring

    Rob Herring
     
  • According to the README, CONFIG_SYS_HZ must be 1000 and most platforms
    follow that. In preparation to remove CONFIG_SYS_HZ from all these
    platforms, provide a common definition. The platforms which use a value
    other than 1000 will get build warning now. These configs are:

    include/configs/M5271EVB.h:#define CONFIG_SYS_HZ 1000000
    include/configs/balloon3.h:#define CONFIG_SYS_HZ 3250000 /* Timer @ 3250000 Hz */
    include/configs/idmr.h:#define CONFIG_SYS_HZ (50000000 / 64)
    include/configs/mini2440.h:#define CONFIG_SYS_HZ 1562500
    include/configs/mx1ads.h:#define CONFIG_SYS_HZ 3686400
    include/configs/omap3_zoom2.h:#define CONFIG_SYS_HZ ((V_SCLK) / (2 << CONFIG_SYS_PTV))
    include/configs/omap730p2.h:#define CONFIG_SYS_HZ ((CONFIG_SYS_CLK_FREQ)/(2 << CONFIG_SYS_PTV))
    include/configs/palmld.h:#define CONFIG_SYS_HZ 3250000 /* Timer @ 3250000 Hz */
    include/configs/palmtc.h:#define CONFIG_SYS_HZ 3686400 /* Timer @ 3686400 Hz */
    include/configs/rsk7203.h:#define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
    include/configs/rsk7264.h:#define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
    include/configs/rsk7269.h:#define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER)
    include/configs/scb9328.h:#define CONFIG_SYS_HZ 3686400 /* incrementer freq: 3.6864 MHz */
    include/configs/versatile.h:#define CONFIG_SYS_HZ (1000000 / 256)
    include/configs/zipitz2.h:#define CONFIG_SYS_HZ 3250000 /* Timer @ 3250000 Hz */

    Signed-off-by: Rob Herring

    Rob Herring
     

01 Nov, 2013

1 commit


21 Oct, 2013

1 commit


15 Oct, 2013

2 commits