11 Sep, 2018

5 commits


25 Aug, 2018

2 commits


21 Aug, 2018

1 commit

  • In some cases it can be useful to be able to bind a device to a driver from
    the command line.
    The obvious example is for versatile devices such as USB gadget.
    Another use case is when the devices are not yet ready at startup and
    require some setup before the drivers are bound (ex: FPGA which bitsream is
    fetched from a mass storage or ethernet)

    usage example:

    bind usb_dev_generic 0 usb_ether
    unbind usb_dev_generic 0 usb_ether
    or
    unbind eth 1

    bind /ocp/omap_dwc3@48380000/usb@48390000 usb_ether
    unbind /ocp/omap_dwc3@48380000/usb@48390000

    Signed-off-by: Jean-Jacques Hiblot

    Jean-Jacques Hiblot
     

12 Aug, 2018

2 commits


11 Aug, 2018

2 commits


10 Aug, 2018

1 commit


08 Aug, 2018

7 commits


06 Aug, 2018

1 commit


04 Aug, 2018

1 commit

  • Add clk_valid() to check for optional clocks are valid.
    Call clk_valid() in test/dm/clk.c and add relevant test routine to
    sandbox clk tests.

    Signed-off-by: Fabrice Gasnier
    Reviewed-by: Simon Glass

    Fabrice Gasnier
     

31 Jul, 2018

1 commit

  • Given 0dc1bfb7302d ("fs: fat: cannot write to subdirectories") we have
    changed how the FAT code works from creating the illegal file "./file"
    and instead rejecting the path. The correct behavior would be to write
    "file" to "." but not writing an illegal file is a step in the right
    direction. For now, update the expected output to account for the
    failure.

    Signed-off-by: Tom Rini

    Tom Rini
     

28 Jul, 2018

1 commit

  • While using the 'tpm' command should work on most cases, this test suite
    only works with TPMv2 and since the work to make both versions build at
    the same time, we might end up having both 'tpm' (TPMv1) and 'tpm2'
    (TPMv2) commands available at the same time. Ensure this test suite
    always use the right one.

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

    Miquel Raynal
     

21 Jul, 2018

3 commits

  • This tests that the importing of an environment with a specified
    whitelist works as intended.

    If there are variables passed as parameter to the env import command,
    those only should be imported in the current environment.

    For each variable passed as parameter, if
    - foo is bar in current env and bar2 in exported env, after importing
    exported env, foo shall be bar2,
    - foo does not exist in current env and foo is bar2 in exported env,
    after importing exported env, foo shall be bar2,
    - foo is bar in current env and does not exist in exported env (but is
    passed as parameter), after importing exported env, foo shall be empty
    ONLY if the -d option is passed to env import, otherwise foo shall be
    bar,

    Any variable not passed as parameter should be left untouched.

    Two other tests are made to test that size cannot be '-' if the checksum
    protection is enabled.

    Signed-off-by: Quentin Schulz
    Reviewed-by: Simon Glass
    Reviewed-by: Stephen Warren
    Tested-by: Stephen Warren

    Quentin Schulz
     
  • Some functions have different behaviour when the given address is 0
    (assumed to be NULL by the function).

    find_ram_base() does not return 0 anymore so it's safe to remove those
    offsets.

    Suggested-by: Stephen Warren
    Signed-off-by: Quentin Schulz
    Reviewed-by: Stephen Warren
    Tested-by: Stephen Warren

    Quentin Schulz
     
  • Some functions test that the given address is not NULL (0) and fail or
    have a different behaviour if that's the case (e.g. hexport_r).

    Let's make the RAM base address to be not zero by setting it to 2MiB if
    that's the case.

    2MiB is chosen because it represents the size of an ARM LPAE/v8 section.

    Suggested-by: Stephen Warren
    Signed-off-by: Quentin Schulz
    Reviewed-by: Simon Glass
    Reviewed-by: Stephen Warren
    Tested-by: Stephen Warren

    Quentin Schulz
     

20 Jul, 2018

1 commit


11 Jul, 2018

8 commits

  • Tom Rini
     
  • 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
     
  • The openssl command specified in test_with_algo() ultimately ends up
    being run by RunAndLog::run(), which uses it to construct a Popen object
    with the default shell=False. The stderr redirect in the command is
    therefore simply passed to openssl as an argument. With at least openssl
    1.1.0f this causes openssl, and therefore test_vboot, to fail with:

    genpkey: Use -help for summary.
    Exit code: 1

    Any stderr output ought to be captured & stored in the RunAndLog
    object's output field and returned from run() via run_and_log() to
    test_with_algo() which then ignores it anyway, so we can drop the
    shell-like redirection with no ill effects. With this fix test_vboot now
    passes for me.

    Signed-off-by: Paul Burton
    Reviewed-by: Stephen Warren

    Paul Burton
     
  • In python 3.x the file() function has been removed. Use open() instead,
    which works on both python 2.x & 3.x, and is described as the preferred
    method of opening a file by python 2.x documentation anyway.

    Signed-off-by: Paul Burton
    Reviewed-by: Stephen Warren

    Paul Burton
     
  • The read_file() function in test_fit is used with files that are not
    text files, as well as some that are. It is never used in a way that
    requires it to decode text files to characters, so open all files in
    binary mode such that read() doesn't attempt to decode characters for
    files which are not text files.

    Without this test_fit fails on python 3.x when reading an FDT in
    run_fit_test() with:

    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position
    0: invalid continuation byte

    Signed-off-by: Paul Burton
    Reviewed-by: Stephen Warren

    Paul Burton
     
  • In python 3.x the configparser module is named with all lower case.
    Import it as such in order to avoid errors when running on python 3.x,
    and fall back to the CamelCase version in order to keep working with
    python 2.x.

    Signed-off-by: Paul Burton
    Reviewed-by: Stephen Warren

    Paul Burton
     
  • In python 3.x the xrange() function has been removed, and range()
    returns an iterator much like Python 2.x's xrange(). Simply use range()
    in place of xrange() in order to work on both python 2.x & 3.x. This
    will mean a small cost on python 2.x since range() will return a list
    there rather than an iterator, but the cost should be negligible.

    Signed-off-by: Paul Burton
    Reviewed-by: Stephen Warren

    Paul Burton
     
  • In python 3.x print must be called as a function rather than used as a
    statement. Update uses of print to the function call syntax in order to
    be python 3.x safe.

    Signed-off-by: Paul Burton
    Reviewed-by: Stephen Warren

    Paul Burton
     

09 Jul, 2018

3 commits


19 Jun, 2018

1 commit