25 Mar, 2016

5 commits

  • Support saveenv for sata.

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Integrate the FSL android fastboot features into community's fastboot.

    1. Use USB gadget g_dnl driver
    2. Integrate the FSL SD/SATA/NAND flash operations, since the GPT and
    EFI partitions are not support by i.MX.
    3. Add FDT support to community's android image.
    4. Add a new boot command "boota" for android image boot. The boota
    implements to load ramdisk and fdt to their loading addresses
    specified in boot.img header, while bootm won't do it for android image.
    5. Support the authentication of boot.img at the "load_addr" for
    both SD and NAND.
    6. We use new configuration CONFIG_FSL_FASTBOOT for Freescale's fastboot
    with relevant header file "fsl_fastboot.h". While disabling the
    configuration, the community fastboot is used.
    7. Overwrite the cmdline in boot.img by using bootargs saved in local environment.
    8. Add recovery and reboot-bootloader support.

    Signed-off-by: Ye Li

    Ye Li
     
  • If boot from usb, reset environment to default value.
    Auto apply mfgtools setting and boot mfgtools kernel.
    Porting this from fsl uboot to uboot 2016.

    The 7dsabresd has already added the environment and usb boot
    related functions. No need to add them more. Only need to add
    NAND parts environment for mfgtools.

    Signed-off-by: Ye Li

    Ye Li
     
  • Fix build warning:
    common/lcd.c: In function 'lcd_clear':
    common/lcd.c:166:6: warning: variable 'bg_color' set but not used [-Wunused-but-set-variable]
    int bg_color;
    ^
    common/lcd.c: In function 'lcd_setmem':
    common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 2 has type 'u_long' [-Wformat=]
    debug("LCD panel info: %d x %d, %d bit/pix\n", panel_info.vl_col,
    ^
    common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long' [-Wformat=]

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Support EPDC.
    E-Ink feature is supported by i.MX6DL/SL and i.MX7D.
    For now this driver only supports i.MX6DL/SL, because the
    i.MX7D EPDC driver needs pxp support which is not included
    in U-Boot.

    Support user defined logo file, if there is no logo file, it will
    draw a black border around a white screen.

    If need to enable EPDC, a waveform file is required to let all
    work.

    Since we need LCD_MONOCHROME mode for EPDC, we introduce LCD_MONOCHROME
    support.

    Please refer to Linux Reference Manual for how to flash WAVEFORM file.

    Signed-off-by: Peng Fan
    Signed-off-by: Robby Cai
    Signed-off-by: Nitin Garg
    Signed-off-by: Ye.Li

    Peng Fan
     

09 Mar, 2016

1 commit

  • Following the previous patch, malloc() is never called before gd is set,
    so we can remove the special-case check for this condition.

    This reverts commit 854d2b9753e4 "dlmalloc: ensure gd is set for early
    alloc".

    Cc: Rabin Vincent
    Signed-off-by: Stephen Warren
    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass

    Stephen Warren
     

26 Feb, 2016

3 commits

  • When using the early timer, we need to manually trigger setting up the
    real timer. This will not happen automatically. Do this immediately after
    starting driver model.

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

    Simon Glass
     
  • This reverts commit 84ca65aa4bd0d03867e9e49805201d0564d3ffb0.

    On signature verification failures fit_image_verify() should NOT exit with
    error. Only keys marked 'required' can cause image verification failure.
    This logic is already there and works correctly.

    Add a comment to make this clear.

    Fixes: 84ca65aa (image-fit: Fix signature checking)
    Signed-off-by: Simon Glass

    Simon Glass
     
  • A recent change broke the 'bootm' command on sandbox. The root cause is
    using a pointer as an address. Conversion from pointer to address needs to
    use map_to_sysmem() so that sandbox can do the right thing. The problem was
    pre-existing but uncovered by a recent commit.

    Fix this. Also move fit_get_end() to the C file to avoid needing to include
    mapmem.h (and thus asm/io.h) everywhere.

    Fixes: 1fec3c5d (common/image.c: Make boot_get_ramdisk() perform a check for Android images)

    Signed-off-by: Simon Glass

    Simon Glass
     

19 Feb, 2016

1 commit

  • Since commit fd61d39970b9901217efc7536d9f3a61b4e1752a:
    spl: mmc: add break statements in spl_mmc_load_image()
    RAW and FS boot modes are now exclusive again. So, if MMCSD_MODE_RAW fails, the
    board hangs. This patch allows to try MMCSD_MODE_FS then.

    It has been tested on a beaglebone black to boot on an EXT partition.

    Signed-off-by: Guillaume GARDET
    Cc: Tom Rini
    Cc: Nikita Kiryanov
    Cc: Igor Grinberg
    Cc: Paul Kocialkowski
    Cc: Pantelis Antoniou
    Cc: Simon Glass
    Cc: Matwey V. Kornilov
    Acked-by: Nikita Kiryanov

    Guillaume GARDET
     

16 Feb, 2016

1 commit

  • $ make tools-all
    ...
    In file included from tools/env/env_flags.c:1:0:
    tools/env/../../common/env_flags.c: In function
    ‘env_flags_parse_varaccess_from_binflags’:
    tools/env/../../common/env_flags.c:156:18: warning: implicit declaration
    of function ‘ARRAY_SIZE’ [-Wimplicit-function-declaration]
    for (i = 0; i < ARRAY_SIZE(env_flags_varaccess_mask); i++)
    ^
    Seems like the other utilities just add a copy of ARRAY_SIZE since
    there's nowhere to include it from (tools/imagetool.h,
    tools/mxsimage.h). Let's do the same here.

    Signed-off-by: Lubomir Rintel

    Lubomir Rintel
     

12 Feb, 2016

2 commits


10 Feb, 2016

1 commit


08 Feb, 2016

9 commits


06 Feb, 2016

1 commit

  • Correct spelling of "U-Boot" shall be used in all written text
    (documentation, comments in source files etc.).

    Signed-off-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Reviewed-by: Simon Glass
    Reviewed-by: Minkyu Kang

    Bin Meng
     

05 Feb, 2016

1 commit

  • The x86 build target "efi-x86" has no TEXT_BASE configured. And with the
    introduction of CONFIG_BOOTDELAY for x86, this function is now called
    for this board as well. Resulting in compile errors for this target.

    Without TEXT_BASE it makes no sense to fill these values. So lets only
    configure the env variable if TEXT_BASE is defined.

    Signed-off-by: Stefan Roese
    Cc: Simon Glass
    Cc: Bin Meng
    Cc: Tom Rini
    Reviewed-by: Simon Glass
    Reviewed-by: Bin Meng

    Stefan Roese
     

02 Feb, 2016

1 commit

  • Use of memalign can trigger fragmentation issues such as:

    // Internally, this needs to find a free block quite bit larger than s.
    // Once the free region is found, any unaligned "padding" immediately
    // before and after the block is marked free, so that the allocation
    // takes only s bytes (plus malloc header overhead).
    p = memalign(a, s);
    // If there's little fragmentation so far, this allocation is likely
    // located immediately after p.
    p2 = malloc(x);
    free(p);
    // In theory, this should return the same value for p. However, the hole
    // left by the free() call is only s in size (plus malloc header overhead)
    // whereas memalign searches for a larger block in order to guarantee it
    // can adjust the returned pointer to the alignment requirements. Hence,
    // the pointer returned, if any, won't be p. If there's little or no space
    // left after p2, this allocation will fail.
    p = memalign(a, s);

    In practice, this issue occurs when running the "dfu" command repeatedly
    on NVIDIA Tegra boards, since DFU allocates a large 32M data buffer, and
    then initializes the USB controller. If this is the first time USB has
    been used in the U-Boot session, this causes a probe of the USB driver,
    which causes various allocations, including a strdup() of a GPIO name
    when requesting the VBUS GPIO. When DFU is torn down, the USB driver
    is left probed, and hence its memory is left allocated. If "dfu" is
    executed again, allocation of the 32M data buffer fails as described
    above.

    In practice, there is a memory hole exactly large enough to hold the 32M
    data buffer than DFU needs. However, memalign() can't know that in a
    general way. Given that, it's particularly annoying that the allocation
    fails!

    The issue is that memalign() tries to allocate something larger to
    guarantee the ability to align the returned pointer. This patch modifies
    memalign() so that if the "general case" over-sized allocation fails,
    another allocation is attempted, of the exact size the user desired. If
    that allocation just happens to be aligned in the way the user wants,
    (and in the case described above, it will be, since the free memory
    region is located where a previous identical allocation was located),
    the pointer can be returned.

    This patch is somewhat related to 806bd245b1ab "dfu: don't keep
    freeing/reallocating". That patch worked around the issue by removing
    repeated free/memalign within a single execution of "dfu". However,
    the same technique can't be applied across multiple invocations, since
    there's no reason to keep the DFU buffer allocated while DFU isn't
    running. This patch addresses the root-cause a bit more directly.

    This problem highlights some of the disadvantages of dynamic allocation
    and deferred probing of devices.

    This patch isn't checkpatch-clean, since it conforms to the existing
    coding style in dlmalloc.c, which is different to the rest of U-Boot.

    Signed-off-by: Stephen Warren
    Reviewed-by: Tom Rini
    Acked-by: Lukasz Majewski

    Stephen Warren
     

28 Jan, 2016

2 commits


26 Jan, 2016

3 commits


25 Jan, 2016

4 commits

  • clang-3.8 reports that these functions are unused, remove them. As this
    is the last part of CONFIG_MODEM_SUPPORT_DEBUG, drop that from README.

    Reviewed-by: Bin Meng
    Signed-off-by: Tom Rini

    Tom Rini
     
  • This enables boards to choose where to/from the environment should be
    saved/loaded. They can then for example support using the same device
    (dynamically) from which the bootloader was launched to load and save
    env data and do not have to define CONFIG_SYS_MMC_ENV_DEV statically.

    In my use case, the environment needs to be on the same device I
    booted from. It can be the eMMC or an optional SD card.
    I therefore would override mmc_get_env_dev in the board code, read the
    CPU registers to determine where we booted from and return the
    corresponding device index.

    Cc: Tom Rini
    Cc: Stephen Warren
    Cc: Tim Harvey
    Cc: Simon Glass
    Cc: Hans de Goede

    Signed-off-by: Clemens Gruber
    Reviewed-by: Stephen Warren
    Reviewed-by: Tom Rini

    Clemens Gruber
     
  • Variable _load_end_ points to end address of uncompressed buffer
    (*not* uncomress_buffer_end / sizeof(ulong)), so multipling uncompressed
    size with sizeof(ulong) is grossly incorrect in flush_cache().
    It might lead to access of address beyond valid memory range and hang the CPU.

    Tested on MIPS architecture by using compressed(gzip, lzma)
    and uncompressed uImage.

    Signed-off-by: Purna Chandra Mandal
    Reviewed-by: Simon Glass
    Reviewed-by: Daniel Schwierzeck

    Purna Chandra Mandal
     
  • There are a lot of unrelated files in common, including all of the commands.
    Moving them into their own directory makes them easier to find and is more
    logical.

    Some commands include non-command code, such as cmd_scsi.c. This should be
    sorted out at some point so that the function can be enabled with or without
    the associated command.

    Unfortunately, with m68k I get this error:

    m68k: + M5329AFEE
    +arch/m68k/cpu/mcf532x/start.o: In function `_start':
    +arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o

    I hope someone can shed some light on what this means. I hope it isn't
    depending on the position of code in the image.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass
     

24 Jan, 2016

1 commit

  • The testpattern of the lcd was only working in 8bit mode(2x3 tiles in
    different colors). With this patch now 8bit and 16bit is supported.
    In 16bit mode there are 2x4 tiles in different colors.
    The number of LCD-colors is defined in the include/configs/.h

    Signed-off-by: Andreas Neubacher
    Signed-off-by: Anatolij Gustschin

    Andreas Neubacher
     

22 Jan, 2016

4 commits