19 Jun, 2018

6 commits

  • Add option to the booti_setup() which indicates to it that the caller
    requires the image to be relocated to the beginning of the RAM and
    that the information whether the image can be located anywhere in RAM
    at 2 MiB aligned boundary or not is to be ignored. This is useful ie.
    in case the Image is wrapped in another envelope, ie. fitImage and not
    relocating it but moving it would corrupt the envelope.

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

    Marek Vasut
     
  • When the `mmc hwpartition` command is disabled, remove the associated help
    text.

    Signed-off-by: Alex Kiernan

    Alex Kiernan
     
  • 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
     
  • Add dump trace command which dump all trace
    buffer content in a much more readable fashion
    than md.

    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
     
  • Enable a "avb" command to execute Android Verified
    Boot 2.0 operations. It includes such subcommands:
    avb init - initialize avb2 subsystem
    avb read_rb - read rollback index
    avb write_rb - write rollback index
    avb is_unlocked - check device lock state
    avb get_uuid - read and print uuid of a partition
    avb read_part - read data from partition
    avb read_part_hex - read data from partition and output to stdout
    avb write_part - write data to partition
    avb verify - run full verification chain

    Signed-off-by: Igor Opaniuk

    Igor Opaniuk
     

15 Jun, 2018

1 commit


14 Jun, 2018

2 commits


13 Jun, 2018

1 commit


08 Jun, 2018

2 commits


06 Jun, 2018

1 commit

  • 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

3 commits


02 Jun, 2018

1 commit

  • Xilinx changes for v2018.07 second pull

    zynqmp:
    - Show reset reason
    - Remove emulation platform
    - Update pmufw version
    - Simplify mmc bootmode
    - Remove dc2 useless configuration file
    - Cleanup mini config
    - Defconfig syncup
    - zcu100, zcu104 and zcu111 dts fixes

    xilinx:
    - Use live-tree functions in some drivers
    - Add support for Avnet Minized and Antminer S9

    fpga:
    - Add secure bitstream loading support

    mmc:
    - Add hs200 mode support

    usb xhci:
    - Header fix

    Tom Rini
     

01 Jun, 2018

3 commits


30 May, 2018

4 commits

  • Merge UDP fastboot support from AOSP:

    https://android.googlesource.com/platform/external/u-boot/+/android-o-mr1-iot-preview-8

    Signed-off-by: Alex Kiernan
    Signed-off-by: Alex Deymo
    Signed-off-by: Jocelyn Bohr
    Reviewed-by: Simon Glass

    Alex Kiernan
     
  • 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
     
  • Separate CMD_FASTBOOT from FASTBOOT and move code and configuration to
    drivers/fastboot.

    Switch dependencies on FASTBOOT to USB_FUNCTION_FASTBOOT as anyone who wants
    FASTBOOT before this series wants USB_FUNCTION_FASTBOOT. Split
    USB_FUNCTION_FASTBOOT from FASTBOOT so they retain their existing
    behaviour.

    Signed-off-by: Alex Kiernan
    Reviewed-by: Simon Glass
    Acked-by: Joe Hershberger

    Alex Kiernan
     

29 May, 2018

1 commit

  • We have almost all pieces needed to support RISC-V UEFI binaries in place already.
    The only missing piece are ELF relocations for runtime code and
    data.

    This patch adds respective support in the linker script and the runtime
    relocation code. It also allows users to enable the EFI_LOADER configuration
    switch on RISC-V platforms.

    Signed-off-by: Alexander Graf

    Rick Chen
     

26 May, 2018

12 commits

  • Add support for the TPM2_PCR_SetAuthPolicy and
    TPM2_PCR_SetAuthValue commands.

    Change the command file and the help accordingly.

    Note: These commands could not be tested because the TPMs available
    do not support them, however they could be useful for someone else.
    The user is warned by the command help.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Miquel Raynal
     
  • Add support for the TPM2_HierarchyChangeAuth command.

    Change the command file and the help accordingly.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Miquel Raynal
     
  • Add support for the TPM2_DictionaryAttackParameters and
    TPM2_DictionaryAttackLockReset commands.

    Change the command file and the help accordingly.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Miquel Raynal
     
  • Add support for the TPM2_GetCapability command.

    Change the command file and the help accordingly.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Miquel Raynal
     
  • Add support for the TPM2_PCR_Read command.

    Change the command file and the help accordingly.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Miquel Raynal
     
  • Add support for the TPM2_PCR_Extend command.

    Change the command file and the help accordingly.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Miquel Raynal
     
  • Add support for the TPM2_Clear command.

    Change the command file and the help accordingly.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Miquel Raynal
     
  • Add support for the TPM2_Selftest command.

    Change the command file and the help accordingly.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Miquel Raynal
     
  • Add support for the TPM2_Startup command.

    Change the command file and the help accordingly.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Miquel Raynal
     
  • Choice between v1 and v2 compliant functions is done with the
    configuration.

    Create the various files that will receive TPMv2-only code on the same
    scheme as for the TPMv1 code.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini

    Miquel Raynal
     
  • There are no changes in this commit but a new organization of the code
    as follow.

    * cmd/ directory:
    > move existing code from cmd/tpm.c in cmd/tpm-common.c
    > move specific code in cmd/tpm-v1.c
    > create a specific header file with generic definitions for
    commands only called cmd/tpm-user-utils.h

    * lib/ directory:
    > move existing code from lib/tpm.c in lib/tpm-common.c
    > move specific code in lib/tpm-v1.c
    > create a specific header file with generic definitions for
    the library itself called lib/tpm-utils.h

    * include/ directory:
    > move existing code from include/tpm.h in include/tpm-common.h
    > move specific code in include/tpm-v1.h

    Code designated as 'common' is compiled if TPM are used. Code designated
    as 'specific' is compiled only if the right specification has been
    selected.

    All files include tpm-common.h.
    Files in cmd/ include tpm-user-utils.h.
    Files in lib/ include tpm-utils.h.
    Depending on the specification, files may include either (not both)
    tpm-v1.h or tpm-v2.h.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Tom Rini
    [trini: Fix a few more cases of tpm.h -> tpm-v1.h, some Kconfig logic]
    Signed-off-by: Tom Rini

    Miquel Raynal
     
  • Because both major revisions are not compatible at all, let's make them
    mutually exclusive in Kconfig. This way we will be sure, when using a
    command or a library function that it is supported by the right
    revision.

    Current drivers are currently prefixed by "tpm_", we will prefix TPMv2.x
    files by "tpm2_" to make the distinction without moving everything.

    The Kconfig menu about TPM drivers is now divided into two sections, one
    for each specification. Compliant drivers with one specification will
    only show up if this specification _only_ has been selected, otherwise a
    comment is displayed.

    Once a driver is selected by the user, it selects automatically a
    boolean value, that is needed in order to activate the TPM commands.
    Selecting the TPM commands will automatically select the right
    command/library files.

    Signed-off-by: Miquel Raynal
    Reviewed-by: Simon Glass
    Reviewed-by: Tom Rini
    [trini: Rework deps as TPM_V1 and TPM_V2 depend on TPM,
    drop TPM_DRIVER_SELECTED]
    Signed-off-by: Tom Rini

    Miquel Raynal
     

25 May, 2018

2 commits


24 May, 2018

1 commit

  • Add a command to manipulate the bootcounter. This is useful if you can
    run device recovery from inside U-Boot and need to reset the bootcounter
    after executing that process as part of altbootcmd.

    Signed-off-by: Alex Kiernan
    Reviewed-by: Lukasz Majewski

    Alex Kiernan