11 Apr, 2016

2 commits


04 Mar, 2016

17 commits

  • When using ft_system_setup, the return value fdt_ret is not assigned,
    so the fdt_strerror(fdt_ret) uses a uninitialized value.

    Signed-off-by: Ye Li

    Ye Li
     
  • The fdt command "fdt systemsetup" can't work because the do_fdt check the
    start char 's' for command "fdt set". So the fdt systemsetup will also go into
    the "fdt set" in fault. Fix this problem by checking the whole word "set" for
    "fdt set" command.

    Signed-off-by: Ye Li

    Ye Li
     
  • We support max 16 endpoints, but endpoint starts from 0.
    So we need to use >= 16 but not > 16 to check whether we
    already reach max endpoints or not.

    Coverity ID 17955:
    Out-of-bounds read (OVERRUN)
    37. overrun-local: Overrunning array dev->config.if_desc[ifno].ep_desc of 16
    9-byte elements at element index 16 (byte offset 144) using index epno
    (which evaluates to 16).

    Signed-off-by: Peng Fan

    Peng Fan
     
  • We should use ARRAY_SIZE, but not directly sizeof, otherwise
    we may access memory that is not belong the array env_flags_varaccess_mask.

    Coverity ID: 17949

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Report Coverity log:
    Destination buffer too small (STRING_OVERFLOW)
    string_overflow: You might overrun the 1024 byte destination string
    lastcommand by writing 1025 bytes from console_buffer

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Reported by coverity ID: 17900 17902
    Using uninitialized value e. Field e.flags is uninitialized when calling hsearch_r

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Before calling hsearch_r, initialize callback entry to NULL.

    Coverity log:
    "
    Uninitialized scalar variable (UNINIT)
    uninit_use_in_call: Using uninitialized value e.
    Field e.callback is uninitialized when calling hsearch_r.
    "

    Reported-by: Coverity
    Signed-off-by: Peng Fan
    Cc: Tom Rini
    Cc: Simon Glass
    (cherry picked from commit 5a6894397a657edec5d0cf4e20968cc66a368c51)

    Peng Fan
     
  • Use snprintf to replace sprintf.

    Coverity log:
    "
    Unbounded source buffer (STRING_SIZE)
    string_size: Passing string init_val of unknown size to sprintf.
    "

    Reported-by: Coverity
    Signed-off-by: Peng Fan
    Cc: Tom Rini
    Cc: Simon Glass
    Reviewed-by: Joe Hershberger
    (cherry picked from commit 5d49b4cdf9417b88476567c8ec78ff185d84b10f)

    Peng Fan
     
  • Whether CONFIG_SYS_HUSH_PARSER is defined or not, should always
    check to free 'buff' to avoid memory leak.

    Signed-off-by: Peng Fan
    Cc: Tom Rini
    Cc: Masahiro Yamada
    Cc: Simon Glass
    (cherry picked from commit 09a788624dbe32aeeb0d74c97c0965303eb96d8c)

    Peng Fan
     
  • Need to free memory avoid memory leak, when error.

    Signed-off-by: Peng Fan
    Reviewed-by: Simon Glass
    Cc: Simon Glass
    Cc: Tom Rini
    (cherry picked from commit c6bb23c819b5dcbc5c3491673f5e408c0b9c38b3)

    Peng Fan
     
  • The following code will alloc memory for new_dev and ldev:
    "
    new_dev = mdio_alloc();
    ldev = malloc(sizeof(*ldev));
    "
    Either new_dev or ldev is NULL, directly return, but this may leak memory.
    So before return, using free(ldev) and mdio_free(new_dev) to avoid
    leaking memory, also free can handle NULL pointer.

    Signed-off-by: Peng Fan
    Cc: Joe Hershberger
    Cc: Simon Glass
    Cc: Bin Meng
    Reviewed-by: Bin Meng
    Acked-by: Joe Hershberger
    (cherry picked from commit 746da1bd42aa5ecc47898399514c9c76d0329706)

    Peng Fan
     
  • "enable" is unsigned char type and its value will not be
    negative, so discard "enable < 0".

    Signed-off-by: Peng Fan
    Cc: Diego Santa Cruz
    Cc: Pantelis Antoniou
    Cc: Andrew Gabbasov
    Cc: Simon Glass
    Cc: Stefano Babic
    Cc: Tom Rini
    Reviewed-by: Simon Glass
    (cherry picked from commit 678e9316d48f78d162f705846b6f6eeab4aa5dd0)

    Peng Fan
     
  • The entry name of mii_dev is an array not pointer, so
    no need to check.

    Signed-off-by: Peng Fan
    Cc: Joe Hershberger
    Cc: Simon Glass
    Cc: Bin Meng
    Reviewed-by: Simon Glass
    Acked-by: Joe Hershberger
    Reviewed-by: Bin Meng
    (cherry picked from commit d39449b110c8da47bf5b8dc372bd5cd1c33a1a67)

    Peng Fan
     
  • If condition of "(load == image_start || load == image_data)" is true,
    should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;",
    or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);"
    at the end of the switch case.

    Signed-off-by: Peng Fan
    Cc: Simon Glass
    Cc: Joe Hershberger
    Cc: Max Krummenacher
    Cc: Marek Vasut
    Cc: Suriyan Ramasami
    Cc: Paul Kocialkowski
    Cc: Tom Rini
    Reviewed-by: Simon Glass
    (cherry picked from commit 2ea47be02f356ff275fa5c50392ea510ddb4a96c)

    Peng Fan
     
  • Condition "(value == NULL && ++value == NULL)" actully will
    always return false.

    Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect
    such expression "c=". To "c=", *(value + 1) is 0, so directly return -1,
    but not continue.

    Signed-off-by: Peng Fan
    Cc: Rabin Vincent
    Cc: Simon Glass
    Cc: Tom Rini
    Reviewed-by: Simon Glass
    (cherry picked from commit aa722529635c16c52d9d609122fecc96ec8d03e4)

    Peng Fan
     
  • Currently there is no API to uninitialize mdio. Add two APIs for this.

    Signed-off-by: Bin Meng
    Acked-by: Joe Hershberger
    (cherry picked from commit cb6baca77bca0ef999203a7ed73bd123e7da062e)

    Bin Meng
     
  • This reverts commit 24356fe059abbc9eae1b192f7af8a46f204a36f4.

    Conflicts:
    common/image-android.c

    Conflicts:
    common/image-android.c

    guoyin.chen
     

06 Nov, 2015

1 commit


13 Aug, 2015

1 commit


28 Jul, 2015

1 commit

  • The bootargs is not set correctly.
    The final bootargs consist of uboot's bootargs and bootimg's bootargs.
    This patch set bootimg's bootargs as final bootargs if uboot's bootargs is not set.
    And take uboot's bootargs as final bootargs if uboot's bootargs is set.

    Signed-off-by: zhang sanshan

    zhang sanshan
     

14 Jul, 2015

1 commit

  • For USB boot, eg, mfgtool programming case, some laptops/pcs
    may not work properly if the board do not disconnect until
    linux kernel usb driver initialization process, finishes the
    ROM code connection at u-boot can fix this problem, and this
    was the original work flow when mfgtool flow was introduced at
    u-boot.

    Tested-by: Spring Zhang
    Tested-by: Zhang Sanshan
    Signed-off-by: Peter Chen

    Peter Chen
     

13 Jul, 2015

1 commit

  • 1. Replace the UDC driver with community's USB gadget d_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. Change the booti command to boota, due to the booti has been used for
    ARM64 image boot.
    5. Modify boota implementation to load ramdisk and fdt to their loading
    addresses specified in boot.img header, while bootm won't do it for
    android image.
    6. Modify the android image HAB implementation. Authenticate the boot.img
    on the "load_addr" for both SD and NAND.
    7. Enable 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.
    8. Use community's way to combine cmdline in boot.img and u-boot environment,
    not overwrite the cmdline in boot.img

    Signed-off-by: Ye.Li

    Ye.Li
     

01 Jul, 2015

1 commit

  • 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
     

29 Apr, 2015

11 commits


10 Apr, 2015

4 commits

  • The ARM reference designs all use a special flash image format
    that stores a footer (two versions exist) at the end of the last
    erase block of the image in flash memory.

    Version one of the footer is indicated by the magic number
    0xA0FFFF9F at 12 bytes before the end of the flash block and
    version two is indicated by the magic number 0x464F4F54 0x464C5348
    (ASCII for "FLSHFOOT") in the very last 8 bytes of the erase block.

    This command driver implements support for both versions of the
    AFS images (the name comes from the Linux driver in drivers/mtd/afs.c)
    and makes it possible to list images and load an image by name into
    the memory with these commands:

    afs - lists flash contents
    afs load - loads image to address indicated in the image
    afs load - loads image to a specified address

    This image scheme is used on the ARM Integrator family, ARM
    Versatile family, ARM RealView family (not yet supported in U-Boot)
    and ARM Versatile Express family up to and including the new
    Juno board for 64 bit development.

    Reviewed-by: Tom Rini
    Signed-off-by: Linus Walleij

    Linus Walleij
     
  • Tom Rini
     
  • The ubi check command is expected to not fail and just check whether
    a volume exist or not. Currently, when a volume does not exist, the
    command fails which leads to an error:
    "exit not allowed from main input shell."

    Use 1 to indicate that a volume does not exist. This allows to use
    ubi check in an if statement, e.g.
    if ubi check rootfs; then; echo "exists"; else; echo "not there"; fi

    Stefan Agner
     
  • introduce CONFIG_SPL_PANIC_ON_RAW_IMAGE.
    An SPL which define this will panic() if the
    image it has loaded does not have a mkimage
    signature.

    Signed-off-by: Albert ARIBAUD (3ADEV)

    Albert ARIBAUD \(3ADEV\)