14 Dec, 2017

1 commit

  • This drops the limit that fpga is only loaded from FIT images for Xilinx.
    This is done by moving the 'partial' check from 'common/image.c' to
    'drivers/fpga/xilinx.c' (the only driver supporting partial images yet)
    and supplies a weak default implementation in 'drivers/fpga/fpga.c'.

    Signed-off-by: Simon Goldschmidt
    Tested-by: Michal Simek (On zcu102)
    Signed-off-by: Michal Simek

    Goldschmidt Simon
     

16 Oct, 2017

1 commit


16 Aug, 2017

5 commits


02 Oct, 2016

1 commit

  • This bug appears in b6396403 which makes u-boot unable to pass
    arguments via bootm to a standalone application without this patch.

    Steps to reproduce.

    Compile a u-boot. Use mkimage to package the standalone hello_world.bin
    file.

    e.g. For the MIPS Boston platform

    mkimage -n "hello" -A mips -O u-boot -C none -T standalone \
    -a 0xffffffff80200000 -d hello_world.bin \
    -ep 0xffffffff80200000 hello_out

    Then tftp hello_out and run it using

    boston # dhcp 192.168.154.45:hello_out
    ...
    boston # bootm $loadaddr 123 321

    Without the patch the following output is observed.

    boston # bootm $loadaddr 123 321
    Image Name: hello
    Image Type: MIPS U-Boot Standalone Program (uncompressed)
    Data Size: 1240 Bytes = 1.2 KiB
    Load Address: 80200000
    Entry Point: 80200000
    Verifying Checksum ... OK
    Loading Standalone Program ... OK
    Example expects ABI version 8
    Actual U-Boot ABI version 8
    Hello World
    argc = 0
    argv[0] = "0xffffffff88000000"

    With the patch, you see the following.

    boston # bootm $loadaddr 123 321
    Image Name: hello
    Image Type: MIPS U-Boot Standalone Program (uncompressed)
    Data Size: 1240 Bytes = 1.2 KiB
    Load Address: 80200000
    Entry Point: 80200000
    Verifying Checksum ... OK
    Loading Standalone Program ... OK
    Example expects ABI version 8
    Actual U-Boot ABI version 8
    Hello World
    argc = 3
    argv[0] = "0xffffffff88000000"
    argv[1] = "123"
    argv[2] = "321"
    argv[3] = ""

    Without the patch, the go command at the entry point seems to work.

    boston # go 0xffffffff80200000 123 321
    Example expects ABI version 8
    Actual U-Boot ABI version 8
    Hello World
    argc = 3
    argv[0] = "0xffffffff80200000"
    argv[1] = "123"
    argv[2] = "321"
    argv[3] = ""
    Hit any key to exit ...

    Signed-off-by: Zubair Lutfullah Kakakhel
    Reviewed-by: Simon Glass

    Zubair Lutfullah Kakakhel
     

20 Aug, 2016

1 commit

  • The bootz and booti commands rely on common functionality that is found
    in common/bootm.c and common/bootm_os.c. They do not however rely on
    the rest of cmd/bootm.c to be implemented so split them into their own
    files. Have various Makefiles include the required infrastructure for
    CONFIG_CMD_BOOT[IZ] as well as CONFIG_CMD_BOOTM. Move the declaration
    of 'images' over to common/bootm.c.

    Cc: Masahiro Yamada
    Signed-off-by: Tom Rini

    Tom Rini
     

15 Jul, 2016

1 commit

  • The function fixup_silent_linux() is called in status BOOTM_STATE_LOADOS
    to silence Linux if variable 'silent' is set.
    Currently only the 'bootm' command state machine contains
    BOOTM_STATE_LOADOS, but others like 'booti' or 'bootz' commands do not.
    This means silent Linux does not work with these commands.

    This patch moves the fixup_silent_linux() call out of the
    BOOTM_STATE_LOADOS state and into BOOTM_STATE_OS_PREP, to silence Linux
    independently of the used command (booti, bootm or bootz).

    Signed-off-by: Hector Palacios

    Hector Palacios
     

13 Jun, 2016

1 commit

  • Flushing part of the cache should be done on cache boundaries. Trying to
    flush part of a cache line is not supported and the request may be ignored
    or print warnings.

    Adjust the bootm code to align the end address to prevent this problem.

    Signed-off-by: Simon Glass
    Reviewed-by: Heiko Schocher
    Tested-on: smartweb, corvus, taurus, axm
    Tested-by: Heiko Schocher
    Reviewed-by: Joe Hershberger
    Reviewed-by: Andreas Bießmann

    Simon Glass
     

24 May, 2016

1 commit


15 Mar, 2016

2 commits

  • Add an option to enable libfdt in SPL. This can be useful when decoding
    FIT files in SPL.

    We need to make sure this option is not enabled in SPL by this change.
    Also this option needs to be enabled in host builds. Si add a new
    IMAGE_USE_LIBFDT #define which can be used in files that are built on the
    host but must also build for U-Boot and SPL.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • There are already two FIT options in Kconfig but the CONFIG options are
    still in the header files. We need to do a proper move to fix this.

    Move these options to Kconfig and tidy up board configuration:

    CONFIG_FIT
    CONFIG_OF_BOARD_SETUP
    CONFIG_OF_SYSTEM_SETUP
    CONFIG_FIT_SIGNATURE
    CONFIG_FIT_BEST_MATCH
    CONFIG_FIT_VERBOSE
    CONFIG_OF_STDOUT_VIA_ALIAS
    CONFIG_RSA

    Unfortunately the first one is a little complicated. We need to make sure
    this option is not enabled in SPL by this change. Also this option is
    enabled automatically in the host builds by defining CONFIG_FIT in the
    image.h file. To solve this, add a new IMAGE_USE_FIT #define which can
    be used in files that are built on the host but must also build for U-Boot
    and SPL.

    Note: Masahiro's moveconfig.py script is amazing.

    Signed-off-by: Simon Glass
    [trini: Add microblaze change, various configs/ re-applies]
    Signed-off-by: Tom Rini

    Simon Glass
     

26 Feb, 2016

1 commit

  • A recent change broke the 'bootm' command on sandbox. The root cause is
    using a pointer as an address. Conversion from pointer to address needs to
    use map_to_sysmem() so that sandbox can do the right thing. The problem was
    pre-existing but uncovered by a recent commit.

    Fix this. Also move fit_get_end() to the C file to avoid needing to include
    mapmem.h (and thus asm/io.h) everywhere.

    Fixes: 1fec3c5d (common/image.c: Make boot_get_ramdisk() perform a check for Android images)

    Signed-off-by: Simon Glass

    Simon Glass
     

25 Jan, 2016

1 commit

  • Variable _load_end_ points to end address of uncompressed buffer
    (*not* uncomress_buffer_end / sizeof(ulong)), so multipling uncompressed
    size with sizeof(ulong) is grossly incorrect in flush_cache().
    It might lead to access of address beyond valid memory range and hang the CPU.

    Tested on MIPS architecture by using compressed(gzip, lzma)
    and uncompressed uImage.

    Signed-off-by: Purna Chandra Mandal
    Reviewed-by: Simon Glass
    Reviewed-by: Daniel Schwierzeck

    Purna Chandra Mandal
     

12 Oct, 2015

1 commit

  • This patch adds support for LZ4-compressed FIT image contents. This
    algorithm has a slightly worse compression ration than LZO while being
    nearly twice as fast to decompress. When loading images from a fast
    storage medium this usually results in a boot time win.

    Sandbox-tested only since I don't have a U-Boot development system set
    up right now. The code was imported unchanged from coreboot where it's
    proven to work, though. I'm mostly interested in getting this recognized
    by mkImage for use in a downstream project.

    Signed-off-by: Julius Werner
    Acked-by: Simon Glass

    Julius Werner
     

30 Sep, 2015

1 commit

  • CONFIG_NETCONSOLE causes common/bootm.c to call eth_unregister()
    for network device shutdown. However, with CONFIG_DM_ETH this
    function is no longer defined.

    This is a workaround to avoid the call in that case, and solely
    rely on eth_halt(). In case this is insufficient, a proper way
    to unregister / remove network devices needs to be implemented.

    Signed-off-by: Bernhard Nortmann
    Reviewed-by: Simon Glass
    Acked-by: Joe Hershberger

    Bernhard Nortmann
     

28 May, 2015

2 commits

  • bootm_find_ramdisk_fdt() renamed to bootm_find_images() for readability.

    The function bootm_find_ramdisk_fdt() appears to be a simple wrapper for
    bootm_find_ramdisk(), bootm_find_fdt(), and now bootm_find_loadables().
    I didn't see any other callers entering a bootm_find, so removing
    the wrapper, and condensing these together hopefully makes the code a
    little simpler.

    Signed-off-by: Karl Apsite
    Reviewed-by: Simon Glass

    Karl Apsite
     
  • Added a trimmed down instance of boot_get_() to satisfy the
    minimum requierments of the added feature. The function follows the
    normal patterns set by other boot_get's, which should make it a
    bit easier to combine them all together into one boot_get_image()
    function in a later refactor.

    Documentation for the new function can be found in source:
    include/image.h

    Signed-off-by: Karl Apsite
    Reviewed-by: Simon Glass

    Karl Apsite
     

19 Apr, 2015

1 commit


18 Feb, 2015

1 commit

  • Commit 90bac29a76bc8d649b41a55f2786c0abef9bb2c1 claims to fix this bug
    that was introduced in commit a92fd6577ea17751ead9b50243e3c562125cf581
    but doesn't actually make the change that the commit message describes.

    Actually fix the bug this time.

    Signed-off-by: Joe Hershberger
    Acked-by: Simon Glass

    Joe Hershberger
     

15 Jan, 2015

4 commits


29 Oct, 2014

1 commit


28 Oct, 2014

1 commit

  • This patch makes the following changes:
    - Set kernel entry point correctly
    - Append bootargs from image to global bootargs instead
    of replacing them
    - Return end address instead of size from android_image_get_end()
    - Give correct parameter to genimg_get_format() in boot_get_ramdisk()
    - Move ramdisk message printing from android_image_get_kernel() to
    android_image_get_ramdisk()

    Signed-off-by: Ahmad Draidi
    Cc: Tom Rini
    Reviewed-by: Simon Glass

    Ahmad Draidi
     

22 Oct, 2014

1 commit


22 Aug, 2014

2 commits

  • arg[0] might not be NULL even if argc < 1, so fix this as before.

    Signed-off-by: Bryan Wu

    Bryan Wu
     
  • 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

  • Use the new API which is originally taken out from boot_get_kernel
    of bootm.c

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

    Bryan Wu
     

19 Jun, 2014

6 commits