06 Oct, 2014

1 commit

  • 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: Charles Manning
    Signed-off-by: Marek Vasut
    Cc: Chin Liang See
    Cc: Dinh Nguyen
    Cc: Albert Aribaud
    Cc: Tom Rini
    Cc: Wolfgang Denk
    Cc: Pavel Machek
    Acked-by: Pavel Machek

    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

    Charles Manning
     

29 Aug, 2014

1 commit

  • 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: Simon Glass

    Simon Glass
     

22 Aug, 2014

1 commit

  • Commit b3dd64f5d537 "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: York Sun
    Signed-off-by: Bryan Wu

    Bryan Wu
     

09 Aug, 2014

1 commit

  • Kernel address is normally stored as a string argument of bootm or bootz.
    This function is taken out from boot_get_kernel() of bootm.c, which can be
    reused by others.

    Signed-off-by: Bryan Wu
    [trini: Fix warnings with CONFIG_FIT]
    Signed-off-by: Tom Rini

    Bryan Wu
     

19 Jun, 2014

2 commits


06 Jun, 2014

1 commit

  • make the use of legacy image format configurable through
    the config define CONFIG_IMAGE_FORMAT_LEGACY.

    When relying on signed FIT images with required signature check
    the legacy image format should be disabled. Therefore introduce
    this new define and enable legacy image format if CONFIG_FIT_SIGNATURE
    is not set. If CONFIG_FIT_SIGNATURE is set disable per default
    the legacy image format.

    Signed-off-by: Heiko Schocher
    Cc: Simon Glass
    Cc: Lars Steubesand
    Cc: Mike Pearce
    Cc: Wolfgang Denk
    Cc: Tom Rini
    Cc: Michal Simek
    Acked-by: Simon Glass

    Heiko Schocher
     

27 May, 2014

1 commit

  • 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.

    ---88---

    A SPL binary modified with the atmelimage mkimage target was succesfully
    booted on a sama5d34ek via MMC and NAND.

    Signed-off-by: Andreas Bießmann
    Cc: Bo Shen
    Cc: Heiko Schocher
    Tested-by: Bo Shen

    Andreas Bießmann
     

23 May, 2014

1 commit


08 May, 2014

1 commit

  • 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
    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: Rob Herring
    Reviewed-by: Tom Rini
    Reviewed-by: Lukasz Majewski

    Sebastian Siewior
     

18 Apr, 2014

1 commit


07 Feb, 2014

1 commit


14 Jan, 2014

1 commit


09 Jan, 2014

1 commit


20 Sep, 2013

2 commits


31 Aug, 2013

1 commit

  • 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
     

24 Jul, 2013

1 commit


13 Jul, 2013

1 commit


12 Jul, 2013

1 commit

  • 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 a51ec63 and 53f375f) 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: Simon Glass

    Simon Glass
     

26 Jun, 2013

1 commit

  • At present the arguments to bootm are processed in a somewhat confusing
    way. Sub-functions must know how many arguments their calling functions
    have processed, and the OS boot function must also have this information.
    Also it isn't obvious that 'bootm' and 'bootm start' provide arguments in
    the same way.

    Adjust the code so that arguments are removed from the list before calling
    a sub-function. This means that all functions can know that argv[0] is the
    first argument of which they need to take notice.

    Signed-off-by: Simon Glass

    Simon Glass
     

05 Jun, 2013

1 commit


15 May, 2013

8 commits


28 Mar, 2013

1 commit


01 Mar, 2013

1 commit


08 Feb, 2013

1 commit

  • and, if including libfdt.h which includes libfdt_env.h in
    the correct order, don't include fdt.h before libfdt.h.

    this is needed to get the fdt type definitions set from
    the project environment before fdt.h uses them.

    Signed-off-by: Kim Phillips
    Cc: Jerry Van Baren

    Kim Phillips
     

14 Dec, 2012

2 commits


13 Nov, 2012

1 commit

  • When booting a fit image with multiple configurations, the user either has to
    specify which configuration to use explicitly, or there has to be a default
    defined which is chosen automatically. This change adds an option to change
    that behavior so that a configuration can be selected explicitly, or the
    configuration which has the device tree that claims to be compatible with the
    earliest item in U-Boot's device tree.

    In other words, if U-Boot claimed to be compatible with A, B, and then C, and
    the configurations claimed to be compatible with A, D and B, D and D, E, the
    first configuration, A, D, would be chosen. Both the first and second
    configurations match, but the first one matches a more specific entry in
    U-Boot's device tree. The order in the kernel's device tree is ignored.

    Signed-off-by: Gabe Black

    Commit-Ready: Gabe Black
    Signed-off-by: Simon Glass

    Gabe Black
     

05 Nov, 2012

1 commit

  • command.c:44:38: error: bad constant expression
    dlmalloc.c:1468:2: warning: Using plain integer as NULL pointer
    dlmalloc.c:1468:5: warning: Using plain integer as NULL pointer
    dlmalloc.c:2176:12: warning: Using plain integer as NULL pointer
    dlmalloc.c:2179:31: warning: Using plain integer as NULL pointer
    dlmalloc.c:2382:14: warning: Using plain integer as NULL pointer
    dlmalloc.c:2436:14: warning: Using plain integer as NULL pointer
    dlmalloc.c:2582:31: warning: Using plain integer as NULL pointer
    dlmalloc.c:2585:17: warning: Using plain integer as NULL pointer
    dlmalloc.c:2646:14: warning: Using plain integer as NULL pointer
    dlmalloc.c:2659:19: warning: Using plain integer as NULL pointer
    dlmalloc.c:2692:19: warning: Using plain integer as NULL pointer
    dlmalloc.c:2707:19: warning: Using plain integer as NULL pointer
    dlmalloc.c:2708:14: warning: Using plain integer as NULL pointer
    dlmalloc.c:2786:31: warning: Using plain integer as NULL pointer
    dlmalloc.c:2801:12: warning: Using plain integer as NULL pointer
    dlmalloc.c:2801:22: warning: Using plain integer as NULL pointer
    dlmalloc.c:2926:27: warning: Using plain integer as NULL pointer
    dlmalloc.c:2928:14: warning: Using plain integer as NULL pointer
    dlmalloc.c:2929:12: warning: Using plain integer as NULL pointer
    dlmalloc.c:3075:14: warning: Using plain integer as NULL pointer
    hush.c:292:14: warning: symbol 'last_return_code' was not declared. Should it be static?
    hush.c:293:5: warning: symbol 'nesting_level' was not declared. Should it be static?
    hush.c:2175:20: warning: Using plain integer as NULL pointer
    hush.c:2175:34: warning: Using plain integer as NULL pointer
    hush.c:2210:41: warning: Using plain integer as NULL pointer
    hush.c:2216:45: warning: Using plain integer as NULL pointer
    hush.c:2249:25: warning: Using plain integer as NULL pointer
    hush.c:2332:13: warning: symbol 'new_pipe' was not declared. Should it be static?
    hush.c:2390:5: warning: symbol 'reserved_word' was not declared. Should it be static?
    hush.c:2927:5: warning: symbol 'parse_stream' was not declared. Should it be static?
    hush.c:3127:6: warning: symbol 'mapset' was not declared. Should it be static?
    hush.c:3133:6: warning: symbol 'update_ifs_map' was not declared. Should it be static?
    hush.c:3161:5: warning: symbol 'parse_stream_outer' was not declared. Should it be static?
    hush.c:3295:34: warning: Using plain integer as NULL pointer
    hush.c:3631:5: warning: symbol 'do_showvar' was not declared. Should it be static
    image.c:1282:29: warning: Using plain integer as NULL pointer
    image.c:1315:41: warning: Using plain integer as NULL pointer
    image.c:1330:25: warning: Using plain integer as NULL pointer
    image.c:1706:25: warning: Using plain integer as NULL pointer
    main.c:510:10: warning: symbol 'hist_num' was not declared. Should it be static?
    main.c:512:5: warning: symbol 'hist_list' was not declared. Should it be static?
    main.c:513:6: warning: symbol 'hist_lines' was not declared. Should it be static?
    usb_storage.c:195:6: warning: symbol 'usb_show_progress' was not declared. Should it be static?
    usb_storage.c:440:48: warning: Using plain integer as NULL pointer
    usb_storage.c:503:5: warning: symbol 'usb_stor_BBB_comdat' was not declared. Should it be static?
    usb_storage.c:551:5: warning: symbol 'usb_stor_CB_comdat' was not declared. Should it be static?
    usb_storage.c:629:55: warning: Using plain integer as NULL pointer
    usb_storage.c:620:5: warning: symbol 'usb_stor_CBI_get_status' was not declared. Should it be static?
    usb_storage.c:675:43: warning: Using plain integer as NULL pointer
    usb_storage.c:668:5: warning: symbol 'usb_stor_BBB_clear_endpt_stall' was not declared. Should it be static?
    usb_storage.c:679:5: warning: symbol 'usb_stor_BBB_transport' was not declared. Should it be static?
    usb_storage.c:801:5: warning: symbol 'usb_stor_CB_transport' was not declared. Sh
    xyzModem.c:104:1: warning: symbol 'CYGACC_COMM_IF_GETC_TIMEOUT' was not declared. Should it be static?
    xyzModem.c:122:1: warning: symbol 'CYGACC_COMM_IF_PUTC' was not declared. Should it be static?
    xyzModem.c:169:1: warning: symbol 'parse_num' was not declared. Should it be stat

    note: hush.c's nesting_level deleted because not used.

    Signed-off-by: Kim Phillips

    Kim Phillips
     

16 Oct, 2012

2 commits


26 Sep, 2012

1 commit