27 Sep, 2013

1 commit


13 Sep, 2013

1 commit


12 Sep, 2013

2 commits


11 Sep, 2013

2 commits


07 Sep, 2013

3 commits


05 Sep, 2013

1 commit


04 Sep, 2013

1 commit


31 Aug, 2013

9 commits

  • Make remaining non-static functions static and the same for vars.

    Signed-off-by: Marek Vasut
    Cc: Fabio Estevam
    Cc: Stefano Babic

    Marek Vasut
     
  • Fix the lists of files so they are in order again.

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

    Marek Vasut
     
  • Add mkimage support for generating and verifying MXS bootstream.
    The implementation here is mostly a glue code between MXSSB v0.4
    and mkimage, but the long-term goal is to rectify this and merge
    MXSSB with mkimage more tightly. Once this code is properly in
    U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage
    support.

    Note that the mxsimage generator needs libcrypto from OpenSSL, I
    therefore enabled the libcrypto/libssl unconditionally.

    MXSSB: http://git.denx.de/?p=mxssb.git;a=summary

    The code is based on research presented at:
    http://www.rockbox.org/wiki/SbFileFormat

    Signed-off-by: Marek Vasut
    Cc: Tom Rini
    Cc: Fabio Estevam
    Cc: Stefano Babic
    Cc: Otavio Salvador

    Marek Vasut
     
  • Add support for setting the CSF (Command Sequence File) pointer
    which is used for HAB (High Assurance Boot) in the imximage by
    adding e.g.

    CSF 0x2000

    in the imximage.cfg file.

    This will set the CSF pointer accordingly just after the padded
    data image area. The boot_data.length is adjusted with the
    value from the imximage.cfg config file.

    The resulting u-boot.imx can be signed with the FSL HAB tooling.
    The generated CSF block needs to be appended to the u-boot.imx.

    Signed-off-by: Stefano Babic

    Stefano Babic
     
  • Implement function vrec_header to be able to pad the final
    data image file according the what has been calculated for
    boot_data.length.

    Signed-off-by: Stefano Babic

    Stefano Babic
     
  • Use previously unused return value of function vrec_header
    to return a padding size to generic mkimage. This padding
    size is used in copy_files to pad with zeros after copying
    the data image.

    Signed-off-by: Stefano Babic

    Stefano Babic
     
  • Change to dynamically allocate the imx_header to correctly
    allocate the IVT, Boot Data and DCD at correct locations
    depending on the boot media.

    Also check that the Image Vector Table Offset + IVT +
    Boot Data + DCD

    Stefano Babic
     
  • This better reflects the naming from the Reference Manual
    as well as fits better since "flash" is not really applicabe
    for SATA.

    Signed-off-by: Stefano Babic

    Stefano Babic
     
  • Doing a make distclean; make mx6qsabresd_config; make
    and hexdump -C u-boot.imx | less

    ...
    00000360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    *
    000003f0 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 |................|
    ^^^^^^^^^^^
    00000400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    *
    00001000 13 00 00 ea 14 f0 9f e5 14 f0 9f e5 14 f0 9f e5 |...ê.ð.å.ð.å.ð.å|
    ...

    shows the flash_offset value being written into the final
    generated image, wich is not correct.

    Instead create flash_offset as static variable such that the
    generated image is "clean".

    00000360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
    *
    00001000 13 00 00 ea 14 f0 9f e5 14 f0 9f e5 14 f0 9f e5 |...ê.ð.å.ð.å.ð.å|

    Signed-off-by: Stefano Babic

    Stefano Babic
     

28 Aug, 2013

1 commit

  • add support for the am335x based boards from siemens:

    dxr2:
    - DDR3 128MiB
    - NAND 256MiB
    - Ethernet with external Switch SMSC LAN9303
    - no PMIC
    - internal Watchdog
    - DFU support

    pxm2:
    - DDR2 512 MiB
    - NAND 1024 MiB
    - PMIC
    - PHY atheros ar803x
    - USB Host
    - internal Watchdog
    - DFU support

    rut:
    - DDR3 256 MiB
    - NAND 256 MiB
    - PMIC
    - PHY natsemi dp83630
    - external Watchdog
    - DFU support

    Signed-off-by: Heiko Schocher
    Signed-off-by: Roger Meier
    Signed-off-by: Samuel Egli
    Cc: Pascal Bach
    Cc: Tom Rini

    Heiko Schocher
     

27 Aug, 2013

1 commit


17 Aug, 2013

1 commit

  • Commit 669dfc2e adds libfdt_env.h to HOSTCPPFLAGS. It causes stdio.h
    to be included before _GNU_SOURCE is defined in C files. On some old hosts
    some prototypes are protected by #ifdef __USE_GNU, which is set when
    _GNU_SOURCE is defined.

    Signed-off-by: York Sun
    Acked-by: Simon Glass

    York Sun
     

10 Aug, 2013

1 commit


03 Aug, 2013

1 commit

  • Subsequent patches assume that dtc supports various recent features.
    These are available in dtc 1.4.0. Validate that dtc is at least that
    version.

    Signed-off-by: Stephen Warren
    Acked-by: Simon Glass

    Stephen Warren
     

24 Jul, 2013

2 commits


16 Jul, 2013

1 commit

  • adjust instructions for the invocation of Patman's self test: the -t
    flag appears to have a different meaning now, refer to the --test option
    for the builtin unit test; adjust a directory location and make sure to
    run the file which resides in the source directory

    Signed-off-by: Gerhard Sittig
    Acked-by: Simon Glass

    Gerhard Sittig
     

12 Jul, 2013

1 commit


03 Jul, 2013

1 commit


29 Jun, 2013

1 commit

  • At present mkimage is set up to always build with image signing support.
    This means that the SSL libraries (e.g. libssl-dev) are always required.

    Adjust things so that mkimage can be built with and without image signing,
    controlled by the presence of CONFIG_FIT_SIGNATURE in the board config file.

    If CONFIG_FIT_SIGNATURE is not enabled, then mkimage will report a warning
    that signing is not supported. If the option is enabled, but libraries are
    not available, then a build error similar to this will be shown:

    lib/rsa/rsa-sign.c:26:25: fatal error: openssl/rsa.h: No such file or directory

    Signed-off-by: Simon Glass

    Simon Glass
     

26 Jun, 2013

9 commits

  • While signing images is useful, it does not provide complete protection
    against several types of attack. For example, it it possible to create a
    FIT with the same signed images, but with the configuration changed such
    that a different one is selected (mix and match attack). It is also possible
    to substitute a signed image from an older FIT version into a newer FIT
    (roll-back attack).

    Add support for signing of FIT configurations using the libfdt's region
    support.

    Please see doc/uImage.FIT/signature.txt for more information.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Normally, multiple public keys can be provided and U-Boot is not
    required to use all of them for verification. This is because some
    images may not be signed, or may be optionally signed.

    But we still need a mechanism to determine when a key must be used.
    This feature cannot be implemented in the FIT itself, since anyone
    could change it to mark a key as optional. The requirement for
    key verification must go in with the public keys, in a place that
    is protected from modification.

    Add a -r option which tells mkimage to mark all keys that it uses
    for signing as 'required'.

    If some keys are optional and some are required, run mkimage several
    times (perhaps with different key directories if some keys are very
    secret) using the -F flag to update an existing FIT.

    Signed-off-by: Simon Glass
    Reviewed-by: Marek Vasut

    Simon Glass
     
  • When signing an image, it is useful to add some details about which tool
    or person is authorising the signing. Add a comment field which can take
    care of miscellaneous requirements.

    Signed-off-by: Simon Glass
    Reviewed-by: Marek Vasut

    Simon Glass
     
  • When signing images it is sometimes necessary to sign with different keys
    at different times, or make the signer entirely separate from the FIT
    creation to avoid needing the private keys to be publicly available in
    the system.

    Add a -F option so that key signing can be a separate step, and possibly
    done multiple times as different keys are avaiable.

    Signed-off-by: Simon Glass
    Reviewed-by: Marek Vasut

    Simon Glass
     
  • FIT image verification requires public keys. Add a convenient option to
    mkimage to write the public keys to an FDT blob when it uses then for
    signing an image. This allows us to use:

    mkimage -f test.its -K dest.dtb -k keys test.fit

    and have the signatures written to test.fit and the corresponding public
    keys written to dest.dtb. Then dest.dtb can be used as the control FDT
    for U-Boot (CONFIG_OF_CONTROL), thus providing U-Boot with access to the
    public keys it needs.

    Signed-off-by: Simon Glass
    Reviewed-by: Marek Vasut

    Simon Glass
     
  • Keys required for signing images will be in a specific directory. Add a
    -k option to specify that directory.

    Also update the mkimage man page with this information and a clearer list
    of available commands.

    Signed-off-by: Simon Glass
    Reviewed-by: Marek Vasut (v1)

    Simon Glass
     
  • RSA provides a public key encryption facility which is ideal for image
    signing and verification.

    Images are signed using a private key by mkimage. Then at run-time, the
    images are verified using a private key.

    This implementation uses openssl for the host part (mkimage). To avoid
    bringing large libraries into the U-Boot binary, the RSA public key
    is encoded using a simple numeric representation in the device tree.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add support for signing images using a new signature node. The process
    is handled by fdt_add_verification_data() which now takes parameters to
    provide the keys and related information.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a structure to describe an algorithm which can sign and (later) verify
    images.

    Signed-off-by: Simon Glass

    Simon Glass