13 Jun, 2018

1 commit


05 Mar, 2018

1 commit

  • Thomas reported U-Boot failed to build host tools if libfdt-devel
    package is installed because tools include libfdt headers from
    /usr/include/ instead of using internal ones.

    This commit moves the header code:
    include/libfdt.h -> include/linux/libfdt.h
    include/libfdt_env.h -> include/linux/libfdt_env.h

    and replaces include directives:
    #include -> #include
    #include -> #include

    Reported-by: Thomas Petazzoni
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

19 Feb, 2018

1 commit

  • Only ARM and in some configs MIPS really implement arch_fixup_fdt().
    Others just use the same boilerplate which is not good by itself,
    but what's worse if we try to build with disabled CONFIG_CMD_BOOTM
    and enabled CONFIG_OF_LIBFDT we'll hit an unknown symbol which was
    apparently implemented in arch/xxx/lib/bootm.c.

    Now with weak arch_fixup_fdt() right in image-fdt.c where it is
    used we get both items highlighted above fixed.

    Signed-off-by: Alexey Brodkin
    Cc: Daniel Schwierzeck
    Cc: Simon Glass
    Cc: York Sun
    Cc: Stefan Roese
    Reviewed-by: Tom Rini
    Reviewed-by: Daniel Schwierzeck

    Alexey Brodkin
     

16 Oct, 2017

1 commit


15 Sep, 2017

1 commit


16 Aug, 2017

2 commits

  • We are now using an env_ prefix for environment functions. Rename these
    other functions as well, for consistency:

    getenv_vlan()
    getenv_bootm_size()
    getenv_bootm_low()
    getenv_bootm_mapsize()
    env_get_default()

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     
  • We are now using an env_ prefix for environment functions. Rename these
    two functions for consistency. Also add function comments in common.h.

    Quite a few places use getenv() in a condition context, provoking a
    warning from checkpatch. These are fixed up in this patch also.

    Suggested-by: Wolfgang Denk
    Signed-off-by: Simon Glass

    Simon Glass
     

01 May, 2017

1 commit

  • With 3f66149d9fb4 we no longer have a common call fdt_fixup_ethernet.
    This was fine to do on PowerPC as they largely had calls already in
    ft_cpu_fixup. On ARM however we largely relied on this call. Rather
    than introduce a large number of changes to ft_cpu_fixup /
    ft_board_fixup we recognize that this is a common enough call that we
    should be doing it in a central location. Do it early enough that we
    can do any further updates in ft_cpu_fixup / ft_board_fixup.

    Cc: Gerd Hoffmann
    Cc: Chen-Yu Tsai
    Cc: Maxime Ripard
    Cc: Thomas Chou (maintainer:NIOS)
    Cc: York Sun (maintainer:POWERPC MPC85XX)
    Cc: Stefan Roese (maintainer:POWERPC PPC4XX)
    Cc: Simon Glass
    Cc: Joakim Tjernlund
    Fixes: 3f66149d9fb4 ("Remove extra fdt_fixup_ethernet() call")
    Signed-off-by: Tom Rini
    Acked-by: Stefan Roese
    Acked-by: York Sun
    Reviewed-by: Simon Glass

    Tom Rini
     

08 Apr, 2017

1 commit

  • ft_cpu_setup() already calls fdt_fixup_ethernet(), calling it
    in image_setup_libfdt() is both redundant and breaks any modifications
    done by ft_board_setup(). Restore the old behavior by removing
    the call in image_setup_libfdt()

    Fixes: 13d06981a982 ("image: Add device tree setup to image library")
    Signed-off-by: Joakim Tjernlund

    Joakim Tjernlund
     

03 Dec, 2016

1 commit

  • Commit e2f88dfd2d96 ("libfdt: Introduce new ARCH_FIXUP_FDT option")
    allows us to skip memory setup of DTB, but a problem for ARM is that
    spin_table_update_dt() and psci_update_dt() are skipped as well if
    CONFIG_ARCH_FIXUP_FDT is disabled.

    This commit allows us to skip only fdt_fixup_memory_banks() instead
    of the whole of arch_fixup_fdt(). It will be useful when we want to
    use a memory node from a kernel DTB as is, but need some fixups for
    Spin-Table/PSCI.

    Signed-off-by: Masahiro Yamada
    Acked-by: Alexey Brodkin
    Acked-by: Simon Glass
    Fixed build error for x86:
    Signed-off-by: Simon Glass

    Masahiro Yamada
     

14 Oct, 2016

1 commit

  • Sometimes devicetree nodes and or properties are added out of the u-boot
    console, maybe through some script or manual interaction.

    The devicetree as loaded or embedded is quite small, so the devicetree
    has to be resized to take up those new nodes/properties.

    In original the devicetree was only extended by effective
    4 * add_mem_rsv.

    With this commit we can add an argument to the "fdt resize" command,
    which takes the extrasize to be added.

    Signed-off-by: Hannes Schmelzer

    Signed-off-by: Hannes Schmelzer
    Acked-by: Simon Glass

    Hannes Schmelzer
     

22 Sep, 2016

1 commit

  • Commit bac17b78dace ("image-fit: switch ENOLINK to ENOENT") changed
    fit_get_node_from_config to return -ENOENT when a property doesn't
    exist, but didn't change any of its callers which check return values.
    Notably it didn't change boot_get_ramdisk, which leads to U-Boot failing
    to boot FIT images which don't include ramdisks with the following
    message:

    Ramdisk image is corrupt or invalid

    It also didn't take into account that by returning -ENOENT to denote the
    lack of a property we lost the ability to determine from the return
    value of fit_get_node_from_config whether it was the property or the
    configuration node that was missing, which may potentially lead callers
    to accept invalid FIT images.

    Fix this by having fit_get_node_from_config return -EINVAL when the
    configuration node isn't found and -ENOENT when the property isn't
    found, which seems to make semantic sense. Callers that previously
    checked for -ENOLINK are adjusted to check for -ENOENT, which fixes the
    breakage introduced by commit bac17b78dace ("image-fit: switch ENOLINK
    to ENOENT").

    The only other user of the return fit_get_node_from_config return value,
    indirectly, is bootm_find_os which already checked for -ENOENT. From a
    read-through of the code I suspect it ought to have been checking for
    -ENOLINK prior to bac17b78dace ("image-fit: switch ENOLINK to ENOENT")
    anyway, which would make it right after this patch, but this would be
    good to get verified by someone who knows this x86 code or is able to
    test it.

    Signed-off-by: Paul Burton
    Cc: Jonathan Gray
    Cc: Marek Vasut
    Acked-by: Marek Vasut
    Acked-by: Stefan Roese
    Acked-by: George McCollister
    Tested-by: George McCollister

    Paul Burton
     

01 Aug, 2016

1 commit

  • Add new Kconfig option to disable arch_fixup_fdt() calls for cases where
    U-Boot shouldn't update memory setup in DTB file.
    One example of usage of this option is to boot OS with different memory
    setup than U-Boot use.

    Signed-off-by: Michal Simek
    Acked-by: Simon Glass

    Michal Simek
     

16 Mar, 2016

1 commit

  • We have a nice framework around image fils to prepare a device tree
    for OS execution. That one patches in missing device tree nodes and
    fixes up the memory range bits.

    We need to call that one from the EFI boot path too to get all those
    nice fixups. This patch adds the call.

    Signed-off-by: Alexander Graf

    Alexander Graf
     

15 Mar, 2016

1 commit

  • 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
     

06 Feb, 2016

1 commit

  • Correct spelling of "U-Boot" shall be used in all written text
    (documentation, comments in source files etc.).

    Signed-off-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Reviewed-by: Simon Glass
    Reviewed-by: Minkyu Kang

    Bin Meng
     

06 Dec, 2015

1 commit

  • If condition of "(load == image_start || load == image_data)" is true,
    should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;",
    or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);"
    at the end of the switch case.

    Signed-off-by: Peng Fan
    Cc: Simon Glass
    Cc: Joe Hershberger
    Cc: Max Krummenacher
    Cc: Marek Vasut
    Cc: Suriyan Ramasami
    Cc: Paul Kocialkowski
    Cc: Tom Rini
    Reviewed-by: Simon Glass

    Peng Fan
     

13 Aug, 2015

1 commit

  • This fixes the following warning (and the runtime error reporting):
    ../common/image-fdt.c:491:4: warning: 'fdt_ret' may be used
    uninitialized in this function [-Wmaybe-uninitialized]

    Signed-off-by: Max Krummenacher
    Signed-off-by: Marcel Ziswiler
    Acked-by: Marek Vasut
    Acked-by: Simon Glass

    Max Krummenacher
     

05 Jun, 2015

1 commit

  • Before device-tree, the device serial number used to be passed to the kernel
    using ATAGs (on ARM). This is now deprecated and all the handover to the kernel
    should now be done using device-tree. Thus, this passes the serial-number
    property to the kernel using the serial-number property of the root node, as
    expected by the kernel.

    The serial number is a string that somewhat represents the device's serial
    number. It might come from some form of storage (e.g. an eeprom) and be
    programmed at factory-time by the manufacturer or come from identification
    bits available in e.g. the SoC.

    Signed-off-by: Paul Kocialkowski
    Reviewed-by: Simon Glass

    Paul Kocialkowski
     

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
     

08 Dec, 2014

1 commit

  • The boot commands - bootz/bootm mandate a third argument which is the
    address to the FDT blob. In cases where this argument is not specified,
    boot fails with a message indicating a missing FDT.

    This causes non-FDT kernels to fail to boot. This patch allows both FDT
    and non-FDT kernels to boot by making the third parameter to the bootm/bootz
    optional.

    Signed-off-by: Suriyan Ramasami
    Acked-by: Simon Glass
    [trini: Update again for covering appended DTB case after last revert in
    this area]
    Signed-off-by: Tom Rini

    Suriyan Ramasami
     

04 Dec, 2014

1 commit


21 Nov, 2014

2 commits


08 Nov, 2014

1 commit


09 Aug, 2014

1 commit


28 Jul, 2014

1 commit


26 Jul, 2014

1 commit


19 Jun, 2014

3 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
     

18 Apr, 2014

1 commit


19 Feb, 2014

1 commit


20 Sep, 2013

1 commit


24 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