17 Mar, 2017

1 commit


09 Feb, 2017

2 commits

  • Add kconfig file to enable API support

    Signed-off-by: Emmanuel Vadot
    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass

    Emmanuel Vadot
     
  • This feature is inspired by /proc/config.gz of Linux. In Linux,
    if CONFIG_IKCONFIG is enabled, the ".config" file contents are
    embedded in the kernel image. If CONFIG_IKCONFIG_PROC is also
    enabled, the ".config" contents are exposed to /proc/config.gz.
    Users can do "zcat /proc/config.gz" to check which config options
    are enabled on the running kernel image.

    The idea is almost the same here; if CONFIG_CMD_CONFIG is enabled,
    the ".config" contents are compressed and saved in the U-Boot image,
    then printed by the new command "config".

    The usage is quite simple. Enable CONFIG_CMD_CONFIG, then run
    > config
    from the command line interface. The ".config" contents will be
    printed on the console.

    This feature increases the U-Boot image size by about 4KB (this is
    mostly due to the gzip-compressed .config file). By default, it is
    enabled only for Sandbox because we do not care about the memory
    footprint on it. Of course, this feature is architecture agnostic,
    so you can enable it on any board if the image size increase is
    acceptable for you.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

28 Jan, 2017

2 commits


21 Jan, 2017

1 commit

  • Use the generic "distro" boot framework to enable automatic DHCP boot.
    MMC and USB are not yet implemented, so this is the only boot option.

    The fdt and kernel addresses are adopted from downstream; ramdisk and
    scriptaddr addresses were chosen arbitrarily.

    Signed-off-by: Andreas Färber
    Reviewed-by: Alexander Graf

    Andreas Färber
     

15 Jan, 2017

1 commit

  • Some refactoring of the top-level Kconfig file which includes:

    * using "if" to remove numerous identical dependency tests
    * reordering config entries to group related ones
    * spelling and grammar fixes

    There should be no functional changes, only aesthetic ones.

    Signed-off-by: Robert P. J. Day

    Robert P. J. Day
     

12 Jan, 2017

1 commit


10 Jan, 2017

1 commit


04 Dec, 2016

3 commits

  • Tom Rini
     
  • Currently, CMD_PXE is forcibly enabled in config_distro_defaults.h, so
    that general purpose distributions can rely on it being defined. This
    header is included, under conditions or not, by various archs or
    famillies of archs / SoCs.

    However, it is very possible that boards based on those SoCs will not
    have a physical ethernet connector at all, even if the have a MAC; for
    example, the Nanopi Neo AIR (sunxi H3) does not. It is also possible
    that network booting is absolutely not necessary for a device.

    However, it is not possible to disable the PXE command, as it is
    forcibly enabled and is non-configurable.

    But it turns out we already have a config option to build a distro-ready
    image, in the name of DISTRO_DEFAULTS.

    Move CMD_PXE out of the hard-coded config_distro_defaults.h into a
    Kconfig option, that gets selected by DISTRO_DEFAULTS when it is set.

    Signed-off-by: "Yann E. MORIN"
    Cc: Joe Hershberger
    [trini: Make it select MENU, run moveconfig.py]
    Signed-off-by: Tom Rini

    Yann E. MORIN
     
  • A number of platforms had been using the distro default feature before
    it was moved to Kconfig but did not enable the new Kconfig option when
    it was enabled. This caused a regression in terms of features and this
    introduces breakage when more things move to Kconfig.

    Signed-off-by: Tom Rini

    Tom Rini
     

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
     

29 Nov, 2016

1 commit

  • The DFU Kconfig menu entries should be part of the SPL
    Kconfig file. Also avoid using the top level Makefile by
    moving the config dependent build artifacts to the driver/
    and driver/usb/gadget/ Makfiles.

    With that, DFU can be built again in SPL if
    CONFIG_SPL_DFU_SUPPORT is enabled.

    Fixes: 6ad6102246d8 ("usb:gadget: Disallow DFU in SPL for now")

    Signed-off-by: Stefan Agner
    Reviewed-by: Simon Glass
    Acked-by: Lukasz Majewski

    Stefan Agner
     

17 Nov, 2016

1 commit

  • Most new systems in U-Boot these days make use of the generic "distro"
    framework which allows a user to have U-Boot scan for a bootable OS
    on all available media types.

    This patch extends the LS2080ARDB board to use that framework if the
    hard coded NOR flash location does not contain a bootable image.

    Signed-off-by: Alexander Graf

    Alexander Graf
     

28 Sep, 2016

1 commit

  • Traditionally the DFU support is available only
    as part 2nd stage boot loader(u-boot) and DFU
    is not supported in SPL.

    The SPL-DFU feature is useful for boards which
    does not have MMC/SD, ethernet boot mechanism
    to boot the board and only has USB inteface.

    This patch add DFU support in SPL with RAM
    memory device support to load and execute u-boot.
    And then leverage full functionality DFU in
    u-boot to flash boot inital binary images to
    factory or bare-metal boards to memory devices
    like SPI, eMMC, MMC/SD card using USB interface.

    This SPL-DFU support can be enabled through
    Menuconfig->Boot Images->Enable SPL-DFU support

    Signed-off-by: Ravi Babu
    Reviewed-by: Tom Rini

    B, Ravi
     

20 Sep, 2016

1 commit

  • This reverts commit 90c08d9e08c7a108ab904f3bbdeb558081757892.

    I took a closer look at this after the commit was applied, and found
    CONFIG_SYS_MALLOC_F_LEN=0x2000 was too much. 8KB memory for SPL is
    actually too big for some boards. Perhaps 0x800 is enough, but the
    situation varies board by board.

    Let's postpone our decision until we come up with a better idea.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

17 Sep, 2016

1 commit


07 Sep, 2016

1 commit


20 Aug, 2016

2 commits


12 Aug, 2016

1 commit

  • This commit allows injecting a board/platform/device-specific post-
    processing function into the FIT image data loading process, which can
    include modifying the size and altering the starting source address of
    an image data artifact. This might be desired to do things like strip
    headers or footers attached to the images before they were packaged into
    the FIT, or to perform operations such as decryption or authentication.
    Introduce new configuration option CONFIG_FIT_IMAGE_POST_PROCESS to
    allow controlling this feature. If enabled, a platform-specific post-
    process function must be provided.

    Signed-off-by: Andreas Dannenberg
    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass

    Andreas Dannenberg
     

05 Aug, 2016

1 commit

  • We need to ensure that CONFIG_PHYS_64BIT is configured via Kconfig so
    that it is always available to the build system. Otherwise we can run
    into cases where we have inconsistent sizes of certain attributes.

    Ravi Babu reported offset mismatch of struct dwc3 across files since
    commit 95ebc253e6d4 ("types.h: move and redefine resource_size_t").
    Since the commit, resource_addr_t points to phys_addr_t, whose size
    is dependent on CONFIG_PHYS_64BIT for ARM architecture.

    I tried my best to use "select" where possible (for example, ARMv8
    architecture) because I think this kind of option is generally user-
    unconfigurable. However, I see some of PowerPC boards have 36BIT
    defconfigs as well as 32BIT ones. I moved CONFIG_PHYS_64BIT to the
    defconfigs for such boards.

    CONFIG_36BIT is no longer referenced, so all of the defines were
    removed from CONFIG_SYS_EXTRA_OPTIONS.

    Fixes: 95ebc253e6d4 ("types.h: move and redefine resource_size_t")
    Signed-off-by: Masahiro Yamada
    Reported-by: Ravi Babu
    Acked-by: Stefan Roese
    Reviewed-by: Tom Rini
    Reviewed-by: York Sun

    Masahiro Yamada
     

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
     

15 Jul, 2016

2 commits

  • Sometimes it is useful to build tools with debugging information included so
    that line-number information is available when run under gdb. Add a Kconfig
    option to support this.

    Signed-off-by: Simon Glass
    Reviewed-by: Tom Rini

    Simon Glass
     
  • The next stage boot loader image and the selected FDT can be post-
    processed by board/platform/device-specific code, which can include
    modifying the size and altering the starting source address before
    copying these binary blobs to their final destination. This might be
    desired to do things like strip headers or footers attached to the
    images before they were packaged into the FIT, or to perform operations
    such as decryption or authentication. Introduce new configuration
    option CONFIG_SPL_FIT_IMAGE_POST_PROCESS to allow controlling this
    feature. If enabled, a platform-specific post-process function must
    be provided.

    Signed-off-by: Daniel Allred
    Signed-off-by: Andreas Dannenberg
    Reviewed-by: Tom Rini
    Reviewed-by: Simon Glass

    Daniel Allred
     

21 Jun, 2016

1 commit

  • DISTRO_DEFAULTS is intended to mirror / replace
    include/config_distro_defaults.h.

    The intend is for boards which include this file to select this from
    their Kconfig files and when moving setting to Kconfig which are #define-ed
    in config_distro_defaults.h to select this from DISTRO_DEFAULTS so that
    boards which have selected DISTRO_DEFAULTS will keep the same configuration
    as before without needing any defconfig file changes.

    The initial list of selected things matches all settings recently removed
    from config_distro_defaults.h because they have been converted to Kconfig,
    with the exception of CMD_ELF and CMD_NET, which have a default of y, if
    the default of these ever changes they should be selected by DISTRO_DEFAULTS
    too.

    For testing and example purposes this commit also converts ARCH_SUNXI
    to use DISTRO_DEFAULT instead of selecting everything it needs itself.

    Signed-off-by: Hans de Goede

    Hans de Goede
     

13 Jun, 2016

1 commit

  • This allows a board to configure verified boot within the SPL using
    a FIT or FIT with external data. It also allows the SPL to perform
    signature verification without needing relocation.

    The board configuration will need to add the following feature defines:
    CONFIG_SPL_CRYPTO_SUPPORT
    CONFIG_SPL_HASH_SUPPORT
    CONFIG_SPL_SHA256

    In this example, SHA256 is the only selected hashing algorithm.

    And the following booleans:
    CONFIG_SPL=y
    CONFIG_SPL_DM=y
    CONFIG_SPL_LOAD_FIT=y
    CONFIG_SPL_FIT=y
    CONFIG_SPL_OF_CONTROL=y
    CONFIG_SPL_OF_LIBFDT=y
    CONFIG_SPL_FIT_SIGNATURE=y

    Signed-off-by: Teddy Reed
    Acked-by: Simon Glass
    Acked-by: Andreas Dannenberg
    Acked-by: Sumit Garg

    Teddy Reed
     

26 May, 2016

1 commit

  • Move CONFIG_SYS_TEXT_BASE to Kconfig, and add default values in board
    Kconfig files matching what was present in their config headers. This
    will make it cleaner to conditionalise the value for Malta based on 32
    vs 64 bit builds.

    Signed-off-by: Paul Burton

    Paul Burton
     

19 Apr, 2016

1 commit


15 Mar, 2016

2 commits

  • This provides a way to load a FIT containing U-Boot and a selection of device
    tree files. The board can select the correct device tree by probing the
    hardware. Then U-Boot is started with the selected device tree.

    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
     

25 Jan, 2016

1 commit

  • There are a lot of unrelated files in common, including all of the commands.
    Moving them into their own directory makes them easier to find and is more
    logical.

    Some commands include non-command code, such as cmd_scsi.c. This should be
    sorted out at some point so that the function can be enabled with or without
    the associated command.

    Unfortunately, with m68k I get this error:

    m68k: + M5329AFEE
    +arch/m68k/cpu/mcf532x/start.o: In function `_start':
    +arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o

    I hope someone can shed some light on what this means. I hope it isn't
    depending on the position of code in the image.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass
     

20 Jan, 2016

2 commits

  • This is how CONFIG options are defined by Kconfig.

    Signed-off-by: Masahiro Yamada
    Acked-by: Michal Simek

    Masahiro Yamada
     
  • For historical reason, CONFIG_SYS_TEXT_BASE has been specified
    in various ways:

    [1] by board/${VENDOR}/${BOARD}/config.mk

    [2] by CONFIG_SYS_EXTRA_OPTIONS
    (This was "options" field of boards.cfg before Kconfig conversion)

    [3] by include/configs/${BOARD}.h

    [4] by configs/${BOARD}_defconfig

    Most of M68K boards use either [1] or [2], both of which we want to
    deprecate. Switch them into [4], which is the newest way (Kconfig).

    We still allow [3] too, because it is still used by many boards and
    we expect much time for conversion.

    Signed-off-by: Masahiro Yamada
    Acked-by: Angelo Dureghello
    Reviewed-by: Simon Glass

    Masahiro Yamada
     

04 Nov, 2015

1 commit

  • At present in SPL we place the device tree immediately after BSS. This
    avoids needing to copy it out of the way before BSS can be used. However on
    some boards BSS is not placed with the image - e.g. it can be in RAM if
    available.

    Add an option to tell U-Boot that the device tree should be placed at the
    end of the image binary (_image_binary_end) instead of at the end of BSS.

    Note: A common reason to place BSS in RAM is to support the FAT filesystem.
    We should update the code so that it does not use so much BSS.

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

    Simon Glass
     

21 Oct, 2015

2 commits

  • malloc_simple uses a part of the stack as heap, initially it uses
    SYS_MALLOC_F_LEN bytes which typically is quite small as the initial
    stacks sits in SRAM and we do not have that much SRAM to work with.

    When DRAM becomes available we may switch the stack from SRAM to DRAM
    to give use more room. This commit adds support for also switching to
    a new bigger malloc_simple heap located in the new stack.

    Note that this requires spl_init to be called before spl_relocate_stack_gd
    which in practice means that spl_init must be called from board_init_f.

    Signed-off-by: Hans de Goede
    Reviewed-by: Tom Rini
    Acked-by: Simon Glass

    Hans de Goede
     
  • common/dlmalloc.c is quite big, both in .text and .data usage, therefor
    on some boards the SPL is build to use only malloc_simple.c and not the
    dlmalloc.c code. This is done in various include/configs/foo.h with the
    following construct:

    #ifdef CONFIG_SPL_BUILD
    #define CONFIG_SYS_MALLOC_SIMPLE
    #endif

    This commit introduces a SPL_MALLOC_SIMPLE Kconfig bool which allows
    selecting this functionality through Kconfig instead.

    Signed-off-by: Hans de Goede
    Acked-by: Simon Glass

    Hans de Goede
     

28 Sep, 2015

1 commit


05 Aug, 2015

1 commit

  • When U-Boot runs as an EFI application is does not have a definition of
    CONFIG_SYS_TEXT_BASE. U-Boot is a relocatable application and the relocation
    is done by EFI. U-Boot can be loaded at any address.

    Ensure that this CONFIG option is not set in this case.

    Signed-off-by: Ben Stoltz
    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Ben Stoltz