1. 03 9月, 2015 3 次提交
    • S
      rockchip: Add support for the SPI image · 10b84fe1
      Simon Glass 提交于
      The Rockchip boot ROM requires a particular file format for booting from SPI.
      It consists of a 512-byte header encoded with RC4, some padding and then up
      to 32KB of executable code in 2KB blocks, separated by 2KB empty blocks.
      
      Add support to mkimage so that an SPL image (u-boot-spl-dtb.bin) can be
      converted to this format. This allows booting from SPI flash on supported
      machines.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      10b84fe1
    • S
      rockchip: Add support for the SD image · f9a3c278
      Simon Glass 提交于
      The Rockchip boot ROM requires a particular file format. It consists of
      64KB of zeroes, a 512-byte header encoded with RC4, and then some executable
      code.
      
      Add support to mkimage so that an SPL image (u-boot-spl-dtb.bin) can be
      converted to this format.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      f9a3c278
    • S
      rockchip: Add the rkimage format to mkimage · a131c1f4
      Simon Glass 提交于
      Rockchip SoCs require certain formats for code that they execute, The
      simplest format is a 4-byte header at the start of a binary file. Add
      support for this so that we can create images that the boot ROM understands.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      a131c1f4
  2. 22 7月, 2015 1 次提交
  3. 28 5月, 2015 2 次提交
  4. 09 5月, 2015 1 次提交
    • J
      Fix musl build · 26e355d1
      Jörg Krause 提交于
      This patch fixes cross-compiling U-Boot tools with the musl C library:
        * including <sys/types.h> is needed for ulong
        * defining _GNU_SOURCE is needed for loff_t
      
      Tested for target at91sam9261ek_dataflash_cs3.
      Signed-off-by: NJörg Krause <joerg.krause@embedded.rocks>
      Cc: Tom Rini <trini@konsulko.com>
      26e355d1
  5. 10 4月, 2015 1 次提交
  6. 30 1月, 2015 2 次提交
    • R
      rsa: Use checksum algorithms from struct hash_algo · b37b46f0
      Ruchika Gupta 提交于
      Currently the hash functions used in RSA are called directly from the sha1
      and sha256 libraries. Change the RSA checksum library to use the progressive
      hash API's registered with struct hash_algo. This will allow the checksum
      library to use the hardware accelerated progressive hash API's once available.
      Signed-off-by: NRuchika Gupta <ruchika.gupta@freescale.com>
      CC: Simon Glass <sjg@chromium.org>
      Acked-by: NSimon Glass <sjg@chromium.org>
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      (Fixed build error in am335x_boneblack_vboot due to duplicate CONFIG_DM)
      
      Change-Id: Ic44279432f88d4e8594c6e94feb1cfcae2443a54
      b37b46f0
    • G
      dumpimage: fit: extract FIT images · 39931f96
      Guilherme Maciel Ferreira 提交于
      The dumpimage is able to extract components contained in a FIT image:
      
        $ ./dumpimage -T flat_dt -i CONTAINER.ITB -p INDEX FILE
      
      The CONTAINER.ITB is a regular FIT container file. The INDEX is the poisition
      of the sub-image to be retrieved, and FILE is the file (path+name) to save the
      extracted sub-image.
      
      For example, given the following kernel.its to build a kernel.itb:
      
        /dts-v1/;
        / {
            ...
            images {
              kernel@1 {
                description = "Kernel 2.6.32-34";
                data = /incbin/("/boot/vmlinuz-2.6.32-34-generic");
                type = "kernel";
                arch = "ppc";
                os = "linux";
                compression = "gzip";
                load = <00000000>;
                entry = <00000000>;
                hash@1 {
                  algo = "md5";
                };
              };
              ...
            };
            ...
          };
      
      The dumpimage can extract the 'kernel@1' node through the following command:
      
        $ ./dumpimage -T flat_dt -i kernel.itb -p 0 kernel
        Extracted:
         Image 0 (kernel@1)
          Description:  Kernel 2.6.32-34
          Created:      Wed Oct 22 15:50:26 2014
          Type:         Kernel Image
          Compression:  gzip compressed
          Data Size:    4040128 Bytes = 3945.44 kB = 3.85 MB
          Architecture: PowerPC
          OS:           Linux
          Load Address: 0x00000000
          Entry Point:  0x00000000
          Hash algo:    md5
          Hash value:   22352ad39bdc03e2e50f9cc28c1c3652
      
      Which results in the file 'kernel' being exactly the same as '/boot/vmlinuz-2.6.32-34-generic'.
      Signed-off-by: NGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
      39931f96
  7. 15 1月, 2015 1 次提交
  8. 21 11月, 2014 1 次提交
  9. 29 10月, 2014 1 次提交
  10. 22 10月, 2014 1 次提交
  11. 06 10月, 2014 1 次提交
    • C
      tools: socfpga: Add socfpga preloader signing to mkimage · 832472a9
      Charles Manning 提交于
      Like many platforms, the Altera socfpga platform requires that the
      preloader be "signed" in a certain way or the built-in boot ROM will
      not boot the code.
      
      This change automatically creates an appropriately signed preloader
      from an SPL image.
      
      The signed image includes a CRC which must, of course, be generated
      with a CRC generator that the SoCFPGA boot ROM agrees with otherwise
      the boot ROM will reject the image.
      
      Unfortunately the CRC used in this boot ROM is not the same as the
      Adler CRC in lib/crc32.c. Indeed the Adler code is not technically a
      CRC but is more correctly described as a checksum.
      
      Thus, the appropriate CRC generator is added to lib/ as crc32_alt.c.
      Signed-off-by: NCharles Manning <cdhmanning@gmail.com>
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Chin Liang See <clsee@altera.com>
      Cc: Dinh Nguyen <dinguyen@altera.com>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Cc: Tom Rini <trini@ti.com>
      Cc: Wolfgang Denk <wd@denx.de>
      Cc: Pavel Machek <pavel@denx.de>
      Acked-by: NPavel Machek <pavel@denx.de>
      
      V2: - Zap unused constant
          - Explicitly print an error message in case of error
          - Rework the hdr_checksum() function to take the *header directly
            instead of a plan buffer pointer
      832472a9
  12. 29 8月, 2014 1 次提交
    • S
      Fix test failure caused by bad handling of ramdisk · fe20a81a
      Simon Glass 提交于
      Commit e3a5bbce broke the FIT image tests by not loading a ramdisk even if
      a load address is provided in the FIT. The rationale was that a load address
      of 0 should be considered to mean 'do not load'.
      
      Add a new load operation which supports this feature, so that the ramdisk
      will be loaded if a non-zero load address is provided.
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      fe20a81a
  13. 22 8月, 2014 1 次提交
    • B
      image: fix bootm failure for FIT image · 6c454fed
      Bryan Wu 提交于
      Commit b3dd64f5 "bootm: use genimg_get_kernel_addr()" introduced
      a bug for booting FIT image. It's because calling fit_parse_config()
      twice will give us wrong value in img_addr.
      
      Add a new function genimg_get_kernel_addr_fit() whichl will always
      return fit_uname_config and fit_uname_kernel for CONFIG_FIT.
      genimg_get_kernel_addr() will ignore those to parameters.
      Reported-by: NYork Sun <yorksun@freescale.com>
      Signed-off-by: NBryan Wu <pengw@nvidia.com>
      6c454fed
  14. 09 8月, 2014 1 次提交
  15. 08 7月, 2014 1 次提交
  16. 19 6月, 2014 3 次提交
  17. 06 6月, 2014 2 次提交
  18. 27 5月, 2014 1 次提交
    • A
      mkimage: add atmelimage · 7b1a4117
      Andreas Bießmann 提交于
      The new atmelimage converts a machine code BLOB to bootable ROM image. Atmel
      ROM has no sophisticated image format, it only checks the first 7 ARM vectors.
      The vectors can contain valid B or LDR opcodes, the 6'th vector contains the
      image size to load.
      
      Additionally the PMECC header can be written by the atmelimage target. The
      parameters must be given via the -n switch as a coma separated list. For
      example:
      
      mkimage -T atmelimage \
       -n usePmecc=1,sectorPerPage=4,sectorSize=512,spareSize=64,eccBits=4,eccOffset=36 \
       -d spl/u-boot-spl.bin boot.bin
      
      A provided image can be checked for correct header setup. It prints out the
      PMECC header parameters if it has one and the 6'th interrupt vector content.
      
      ---8<---
      Image Type:	ATMEL ROM-Boot Image with PMECC Header
      		PMECC header
      		====================
      		eccOffset:        36
      		sectorSize:      512
      		eccBitReq:         4
      		spareSize:        64
      		nbSectorPerPage:   4
      		usePmecc:          1
      		====================
      		6'th vector has 17044 set
      --->8---
      
      A SPL binary modified with the atmelimage mkimage target was succesfully
      booted on a sama5d34ek via MMC and NAND.
      Signed-off-by: NAndreas Bießmann <andreas.devel@googlemail.com>
      Cc: Bo Shen <voice.shen@atmel.com>
      Cc: Heiko Schocher <hs@denx.de>
      Tested-by: NBo Shen <voice.shen@atmel.com>
      7b1a4117
  19. 08 5月, 2014 1 次提交
    • S
      image: add support for Android's boot image format · 9ace3fc8
      Sebastian Siewior 提交于
      This patch adds support for the Android boot-image format. The header
      file is from the Android project and got slightly alterted so the struct +
      its defines are not generic but have something like a namespace. The
      header file is from bootloader/legacy/include/boot/bootimg.h. The header
      parsing has been written from scratch and I looked at
      bootloader/legacy/usbloader/usbloader.c for some details.
      The image contains the physical address (load address) of the kernel and
      ramdisk. This address is considered only for the kernel image.
      The "second image" defined in the image header is currently not
      supported. I haven't found anything that is creating this.
      
      v3 (Rob Herring):
      This is based on http://patchwork.ozlabs.org/patch/126797/ with the
      following changes:
      - Rebased to current mainline
      - Moved android image handling to separate functions in
        common/image-android.c
      - s/u8/char/ in header to fix string function warnings
      - Use SPDX identifiers for licenses
      - Cleaned-up file source information:
        android_image.h is from file include/boot/bootimg.h in repository:
        https://android.googlesource.com/platform/bootable/bootloader/legacy
        The git commit hash is 4205b865141ff2e255fe1d3bd16de18e217ef06a
        usbloader.c would be from the same commit, but it does not appear
        to have been used for any actual code.
      v4:
      - s/andriod/android/
      - Use a separate flag ep_found to track if the entry point has been set
      rather than using a magic value.
      
      Cc: Wolfgang Denk <wd@denx.de>
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NRob Herring <robh@kernel.org>
      Reviewed-by: NTom Rini <trini@ti.com>
      Reviewed-by: NLukasz Majewski <l.majewski@samsung.com>
      9ace3fc8
  20. 18 4月, 2014 1 次提交
  21. 22 3月, 2014 4 次提交
  22. 19 2月, 2014 1 次提交
  23. 07 2月, 2014 1 次提交
  24. 09 1月, 2014 1 次提交
  25. 31 8月, 2013 1 次提交
    • M
      ARM: mxs: tools: Add mkimage support for MXS bootstream · bce88370
      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/SbFileFormatSigned-off-by: NMarek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@ti.com>
      Cc: Fabio Estevam <fabio.estevam@freescale.com>
      Cc: Stefano Babic <sbabic@denx.de>
      Cc: Otavio Salvador <otavio@ossystems.com.br>
      bce88370
  26. 24 7月, 2013 1 次提交
  27. 12 7月, 2013 1 次提交
    • S
      bootm: Use selected configuration for ramdisk and fdt · f320a4d8
      Simon Glass 提交于
      If a specific configuraion is selected by the bootm command, e.g. with
      'bootm 84000000#recoveryconf' we must honour this for not just the kernel,
      but also the ramdisk and FDT.
      
      In the conversion to using a common fit_image_load() function for loading
      images from FITs (commits a51ec63b and 53f375fa) this feature was lost.
      Reinstate it by passing the selected configuration back from
      fit_image_load() to boot_get_kernel(), then use this configuration
      (which is stored in images->fit_uname_cfg) in both boot_get_ramdisk()
      and boot_get_fdt().
      Signed-off-by: NSimon Glass <sjg@chromium.org>
      f320a4d8
  28. 10 7月, 2013 1 次提交
  29. 29 6月, 2013 1 次提交
    • S
      mkimage: Build signing only if board has CONFIG_FIT_SIGNATURE · 29ce737d
      Simon Glass 提交于
      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: NSimon Glass <sjg@chromium.org>
      29ce737d
  30. 26 6月, 2013 1 次提交
    • S
      image: Add support for signing of FIT configurations · 4d098529
      Simon Glass 提交于
      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: NSimon Glass <sjg@chromium.org>
      4d098529