21 Jul, 2018

2 commits


20 Jul, 2018

4 commits

  • RAW mode ARGS sector doesn't have to be used for all falcon boot. Skip
    loading ARGS sectors if not defined.

    Signed-off-by: York Sun

    York Sun
     
  • If FIT image is used, CONFIG_SYS_FDT_BASE is not needed.

    Signed-off-by: York Sun

    York Sun
     
  • Add support of loading FIT image from NOR flash.

    Signed-off-by: York Sun

    York Sun
     
  • The function set_default_env() sets the hashtable flags for import_r().
    Formally set_default_env() doesn't accept flags from its callers. In
    practice the caller can (un)set the H_INTERACTIVE flag, but it has to be
    done using the first character of the function's string argument. Other
    flags like H_FORCE can't be set by the caller.

    Change the function to accept flags argument. The benefits are:
    1. The caller will have to explicitly set the H_INTERACTIVE flag,
    instead of un-setting it using a special char in a string.
    2. Add the ability to propagate flags from the caller to himport(),
    especially the H_FORCE flag from do_env_default() in nvedit.c that
    currently gets ignored for "env default -a -f" commands.
    3. Flags and messages will not be coupled together. A caller will be
    able to set flags without passing a string and vice versa.

    Please note:
    The propagation of H_FORCE from do_env_default() does not introduce any
    functional changes, because currently himport_r() is set to destroy the
    old environment regardless if H_FORCE flag is set or not. More changes
    are needed to utilize the propagation of H_FORCE.

    Signed-off-by: Yaniv Levinsky
    Acked-by: Igor Grinberg

    Yaniv Levinsky
     

19 Jul, 2018

6 commits


11 Jul, 2018

9 commits

  • In ARM 64-bits, memory size can be supported is more than 4GB,
    hence increasing save array is needed to cope with testing larger memory.

    Signed-off-by: Tien Fong Chee

    Tien Fong Chee
     
  • Typically init_scsi() does not output anything. So initr_scsi() should
    provide a \n or we may see borked output like

    SCSI: Net: No ethernet found.

    as observed with sandbox_defconfig.

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     
  • The hashed-strings signature property includes two uint32_t values.
    The first is unneeded as there should never be a start offset into the
    strings region. The second, the size, is needed because the added
    signature node appends to this region.

    See tools/image-host.c, where a static 0 value is used for the offset.

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

    Teddy Reed
     
  • This adds a new config value FIT_SIGNATURE_MAX_SIZE, which controls the
    max size of a FIT header's totalsize field. The field is checked before
    signature checks are applied to protect from reading past the intended
    FIT regions.

    This field is not part of the vboot signature so it should be sanity
    checked. If the field is corrupted then the structure or string region
    reads may have unintended behavior, such as reading from device memory.
    A default value of 256MB is set and intended to support most max storage
    sizes.

    Suggested-by: Simon Glass
    Signed-off-by: Teddy Reed
    Reviewed-by: Simon Glass

    Teddy Reed
     
  • Verification of hashes needs to take place before any image post
    processing, thus matching full FIT image processing.
    This allows mechanisms such as encryption be applied to images
    prior to fit generation at the spl level.

    Signed-off-by: Ben Whitten

    Ben Whitten
     
  • Move the FPGA loading from IS_ENABLED(CONFIG_SPL_OS_BOOT) &&
    IS_ENABLED(CONFIG_SPL_GZIP) conditional. The FPGA loading can
    be used without OS loading and GZIP support in SPL. This issue
    was most likely induced by some merge conflict, so fix it.

    Signed-off-by: Marek Vasut
    Cc: Tom Rini

    Marek Vasut
     
  • Handle the case where the full fitImage support is enabled. In this
    case, the whole fitImage must be loaded up front as some parts of the
    fitImage code require memory-mapped access to the entire fitImage.

    Signed-off-by: Marek Vasut
    Cc: Pantelis Antoniou
    Cc: Simon Glass

    Marek Vasut
     
  • Handle the case where the full fitImage support is enabled. In this
    case, the whole fitImage must be loaded up front as some parts of the
    fitImage code require memory-mapped access to the entire fitImage.

    Signed-off-by: Marek Vasut
    Cc: Pantelis Antoniou
    Cc: Simon Glass

    Marek Vasut
     
  • Rather than verifying configuration signature of the configuration node
    containing the kernel image types, verify all configuration nodes, even
    those that do not contain kernel images. This is useful when the nodes
    contain ie. standalone OSes or U-Boot.

    Signed-off-by: Marek Vasut
    Cc: Tom Rini
    Cc: Pantelis Antoniou
    Cc: Simon Glass
    Reviewed-by: Simon Glass

    Marek Vasut
     

10 Jul, 2018

1 commit


28 Jun, 2018

1 commit


24 Jun, 2018

1 commit


19 Jun, 2018

7 commits

  • The ARM64 has 2 MiB alignment requirement for the kernel. When using
    fitImage, this requirement may by violated, the kernel will thus be
    executed from unaligned address and fail to boot. Do what booti does
    and run booti_setup() for kernel_noload images on arm64 to obtain a
    suitable aligned address to which the image shall be relocated.

    Signed-off-by: Marek Vasut
    Cc: Bin Chen
    Cc: Masahiro Yamada
    Cc: Tom Rini

    Marek Vasut
     
  • Both putc() and puts() can be called before global_data is set up. Some of
    the code paths don't handle this correctly. Add an explicit test before
    any member is accessed.

    Reported-by: Coverity (CID: 169030)
    Signed-off-by: Simon Glass
    Reviewed-by: Heinrich Schuchardt

    Simon Glass
     
  • This allows access to an element after the end of the array. Fix it.

    Reported-by: Coverity (CID: 173279)
    Signed-off-by: Simon Glass

    Simon Glass
     
  • Don't continue updating the offset when buffer is full.
    When the buffer size exhausts and there's no space left to write
    warn the user and update only the needed size and not both the
    offset and needed size.

    Add needed buffer size information in the iotrace command.

    Signed-off-by: Ramon Fried

    Ramon Fried
     
  • The header definitions are needed for reading
    record information in cmd/iotrace.c

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

    Ramon Fried
     
  • 1. Add initial support of boot states mode (red, green, yellow)
    2. Add functions for enforcing dm-verity configurations

    Signed-off-by: Igor Opaniuk

    Igor Opaniuk
     
  • Implement AVB ops on top of existing mmc subsystem API. Currently there
    is a full implementation of such operations, defined by [1]
    AVB2.0 specification:

    .read_from_partition() - reads N bytes from a partition identified by
    a name.
    .write_to_partition() - Writes N bytes to a partition identified by a name.
    .validate_vbmeta_public_key() - checks if the given public ‘vbmeta’
    partition is trusted.
    .get_unique_guid_for_partition() - Gets the GUID for a partition identified
    by a string name.

    As [1] specification recommends to use tamper-evident storage for storing
    rollback indexes and device state (LOCKED/UNLOCKED),
    currently are only stubs instead of full implementation for these ops:
    .read_rollback_index() - Gets the rollback index for a given index location
    .write_rollback_index() - Sets the rollback index to a given location
    .read_is_device_unlocked() - Gets where the device is unlocked

    [1] https://android.googlesource.com/platform/external/avb/+/master/README.md

    Signed-off-by: Igor Opaniuk

    Igor Opaniuk
     

18 Jun, 2018

1 commit

  • ARCH_MX6 has default values for SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
    and SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR.

    Do the same for ARCH_MX7 so that users may have a consistent
    experience through the i.MX families.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Otavio Salvador

    Fabio Estevam
     

13 Jun, 2018

1 commit


08 Jun, 2018

2 commits

  • Add timestamp to each iotrace record to aid in debugging
    of IO timing access bugs.

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

    Ramon Fried
     
  • When dealing with a lot of IO regions, sometimes
    it makes sense only to trace a specific one.
    This patch adds support for region limits.
    If region is not set, the iotrace works the same as it was.
    If region is set, the iotrace only logs io operation that falls
    in the defined region.

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

    Ramon Fried
     

06 Jun, 2018

2 commits

  • In case of no relocation we'll just waste some space at the very end
    of usable memory area. If target device has very limited amount of memory
    (for example 256 kB) this loss will be pretty inconvenient.

    Signed-off-by: Alexey Brodkin
    Reviewed-by: Simon Glass
    Cc: Bin Meng
    Cc: Heiko Schocher
    Cc: York Sun
    Cc: Stefan Roese

    Alexey Brodkin
     
  • For distro-boot, the TIMEOUT directive in the boot script specifies
    how long to pause in units of 1/10 sec. [1]

    Commit 8594753ba0a7 ("menu: only timeout when menu is displayed")
    corrected this by simply dividing the timeout value by 10 in
    menu_interactive_choice().

    I see two problems:

    - For example, "TIMEOUT 5" should wait for 0.5 sec, but the current
    implementation cannot handle the granularity of 1/10 sec.
    In fact, it never breaks because "m->timeout / 10" is zero,
    which means no timeout.

    - The menu API is used not only by cmd/pxe.c but also by
    common/autoboot.c . For the latter case, the unit of the
    timeout value is _second_ because its default is associated
    with CONFIG_BOOTDELAY.

    To fix the first issue, use DIV_ROUND_UP() so that the timeout value
    is rounded up to the closest integer.

    For the second issue, move the division to the boundary between
    cmd/pxe.c and common/menu.c . This is a more desirable place because
    the comment of struct pxe_menu says:

    * timeout - time in tenths of a second to wait for a user key-press before
    * booting the default label.

    Then, the comment of menu_create() says:

    * timeout - A delay in seconds to wait for user input. If 0, timeout is
    * disabled, and the default choice will be returned unless prompt is 1.

    [1] https://www.syslinux.org/wiki/index.php?title=SYSLINUX#TIMEOUT_timeout

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

03 Jun, 2018

1 commit


30 May, 2018

2 commits

  • Introduce CONFIG_IMAGE_SPARSE and CONFIG_CMD_MMC_SWRITE so the "mmc
    swrite" command is separated from the fastboot code.

    Move image-sparse from common to lib so it's clear it's library code.

    Rename CONFIG_FASTBOOT_FLASH_FILLBUF_SIZE to CONFIG_IMAGE_SPARSE_FILLBUF_SIZE
    and migrate it to Kconfig.

    Signed-off-by: Alex Kiernan
    Acked-by: Jassi Brar
    Reviewed-by: Simon Glass

    Alex Kiernan
     
  • Add the response string as a parameter to fastboot_okay/fail, instead
    of modifying a global, to match the contract expected by the AOSP
    U-Boot code.

    Signed-off-by: Alex Kiernan
    Reviewed-by: Joe Hershberger

    Alex Kiernan