25 Jul, 2019

5 commits

  • Starting libvirt v5.3.0 with QEMU 4.0.0 use of PCI is automatic
    and thus storage is connected via PCI, which is not visible to
    U-Boot out-of-the-box.

    Refactor to do "pci enum" followed by "virtio scan" to see PCI
    connected storage, and allow bootloader to load kernel and
    initramfs images.

    Tested with Fedora/RISCV using releases: libvirt 5.4.0 & 5.5.0,
    QEMU 4.0.0 and U-Boot 2019.07 RC4.

    Signed-off-by: David Abdurachmanov

    David Abdurachmanov
     
  • The rproc uclass driver can either be built with SPL_REMOTEPROC
    or REMOTEPROC, but the function prototypes in remoteproc.h are
    defined only when CONFIG_REMOTEPROC is defined. This can cause
    build issues in SPL if CONFIG_REMOTEPROC is not selected.

    Fix this by replacing the existing precompiler macro usage with
    CONFIG_IS_ENABLED.

    Fixes: ddf56bc7e3ef ("drivers: Introduce a simplified remoteproc framework")
    Signed-off-by: Suman Anna
    Reviewed-by: Nishanth Menon
    Reviewed-by: Lokesh Vutla

    Suman Anna
     
  • Add support for A/B boot process on AM57xx based boards:

    1. Define 'slot_suffix' variable (using 'ab_select' command)
    2. Extend 'emmc_android_boot' boot command (add commands for A/B boot
    process)

    'ab_select' command is used to decide which slot should be used for
    booting up. A/B metadata resides in 'misc' partition.

    To activate the A/B boot process, the following config options must be
    set:

    CONFIG_ANDROID_AB=y
    CONFIG_CMD_AB_SELECT=y

    For successful A/B boot, the corresponding A/B infrastructure must be
    involved on Android side [1] (including mounting system as root), and
    disk must be partitioned accordingly.

    When A/B boot is enabled, there are some known limitations currently
    exist (not related to A/B patches, need to be implemented later):

    1. The 'Verified Boot' sequence is not supported
    2. dev path to system partition (system_a or system_b) is passed via
    'bootargs' as 'root=' argument like 'root=/dev/mmcblk1p12', but
    further we'll need to rework it with respect to dm-verity
    requirements [2]

    In case when A/B partitions are not present in system (and A/B boot is
    enabled), boot up process will be terminated and next message will be
    shown:

    "boot_a(b) partition not found"

    [1] https://source.android.com/devices/tech/ota/ab
    [2] https://source.android.com/devices/tech/ota/ab/ab_implement#kernel

    Signed-off-by: Ruslan Trofymenko
    Signed-off-by: Igor Opaniuk
    Signed-off-by: Sam Protsenko
    Reviewed-by: Alistair Strachan
    Reviewed-by: Sam Protsenko
    Reviewed-by: Simon Glass

    Ruslan Trofymenko
     
  • This patch determines the A/B-specific bootloader message structure
    that is the basis for implementation of recovery and A/B update
    functions. A/B metadata is stored in this structure and used to decide
    which slot should we use to boot the device. Also some basic functions
    for A/B metadata manipulation are implemented (like slot selection).

    The patch was extracted from commits [1], [2] with some coding style
    fixes.

    [1] https://android-review.googlesource.com/c/platform/external/u-boot/+/729878/2
    [2] https://android-review.googlesource.com/c/platform/external/u-boot/+/729880/2

    Signed-off-by: Ruslan Trofymenko
    Signed-off-by: Igor Opaniuk
    Reviewed-by: Sam Protsenko
    Reviewed-by: Simon Glass

    Ruslan Trofymenko
     
  • This patch adds part_get_info_by_dev_and_name_or_num() function which
    allows us to get partition info from its number or name. Partition of
    interest is specified by string like "device_num:partition_number" or
    "device_num#partition_name".

    The patch was extracted from [1].

    [1] https://android-review.googlesource.com/c/platform/external/u-boot/+/729880/2

    Signed-off-by: Ruslan Trofymenko
    Signed-off-by: Igor Opaniuk
    Reviewed-by: Alistair Strachan
    Reviewed-by: Sam Protsenko
    Reviewed-by: Simon Glass

    Ruslan Trofymenko
     

24 Jul, 2019

2 commits


22 Jul, 2019

5 commits

  • The current implementation supports only binary file load.
    Add helpers to support ELF32 format (sanity check, and load).
    Note that since an ELF32 image is built for the remote processor, the
    load function uses the device_to_virt ops to translate the addresses.
    Implement a basic translation for sandbox_testproc.

    Add related tests. Test result:
    => ut dm remoteproc_elf
    Test: dm_test_remoteproc_elf: remoteproc.c
    Test: dm_test_remoteproc_elf: remoteproc.c (flat tree)
    Failures: 0

    Signed-off-by: Loic Pallardy
    Signed-off-by: Fabien Dessenne
    Reviewed-by: Lokesh Vutla

    Fabien Dessenne
     
  • Introduce the device_to_virt function to allow translation between
    device address (remote processor view) and virtual address (main
    processor view).

    Signed-off-by: Loic Pallardy
    Signed-off-by: Fabien Dessenne
    Reviewed-by: Lokesh Vutla

    Fabien Dessenne
     
  • Add full function comment headers.
    Fix rproc_is_initialized() return value description.

    Signed-off-by: Fabien Dessenne
    Reviewed-by: Lokesh Vutla

    Fabien Dessenne
     
  • Add the following functions to translate DMA address to CPU address:
    - dev_translate_dma_address()
    - ofnode_translate_dma_address()
    - of_translate_dma_address()
    - fdt_translate_dma_address()
    These functions work the same way as xxx_translate_address(), with the
    difference that the translation relies on the "dma-ranges" property
    instead of the "ranges" property.

    Add related test. Test report:
    => ut dm fdt_translation
    Test: dm_test_fdt_translation: test-fdt.c
    Test: dm_test_fdt_translation: test-fdt.c (flat tree)
    Failures: 0

    Signed-off-by: Fabien Dessenne

    Fabien Dessenne
     
  • - rk3399 lpddr4 support
    - rk3399-rock960 board support improvement
    - Eliminate pyelftools dependency by make_fit_atf.py
    - clean up rockchip dts to use -u-boot.dtsi
    - use ARM arch/generic timer instead of rk_timer
    - clean up Kconfig options for board support

    Tom Rini
     

20 Jul, 2019

7 commits


19 Jul, 2019

9 commits


18 Jul, 2019

5 commits

  • - Various FS/disk related fixes with security implications.
    - Proper fix for the pci_ep test.
    - Assorted bugfixes
    - Some MediaTek updates.
    - 'env erase' support.

    Tom Rini
     
  • %s/ot/to/

    Signed-off-by: Anatolij Gustschin

    Anatolij Gustschin
     
  • If U-Boot is loaded and started from TF-A (you need to change
    SYS_TEXT_BASE to 0x60000000), it will hang up at flash initialization.

    If secure mode is off (default, or -machine virt,secure=off) at qemu,
    it will provide dtb with two flash memory banks:
    flash@0 {
    bank-width = ;
    reg = ;
    compatible = "cfi-flash";
    };
    If secure mode is on, on the other hand, qemu provides dtb with 1 bank:
    flash@0 {
    bank-width = ;
    reg = ;
    compatible = "cfi-flash";
    };

    As a result, flash_init()/flash_get_size() will eventually fail.
    With this patch applied, relevant CONFIG values are modified.

    Signed-off-by: AKASHI Takahiro
    Tested-by: Heinrich Schuchardt

    AKASHI Takahiro
     
  • this patch adds basic changes for adding a erase-subcommand to env

    with this command the environment stored on non-volatile storage written
    by saveenv can be cleared.

    Signed-off-by: Frank Wunderlich

    squashed fixes
    - start message with "Erasing"
    - mark erase-function as optional
    - env: separate eraseenv from saveenv

    Suggested-by: Simon Goldschmidt
    Reviewed-by: Simon Goldschmidt

    Frank Wunderlich
     
  • The block count entry in the EXT4 filesystem disk structures uses
    standard 512-bytes units for most of the typical files. The only
    exception are HUGE files, which use the filesystem block size, but those
    are not supported by uboot's EXT4 implementation anyway. This patch fixes
    the EXT4 code to use proper unit count for inode block count. This fixes
    errors reported by fsck.ext4 on disks with non-standard (i.e. 4KiB, in
    case of new flash drives) PHYSICAL block size after using 'ext4write'
    uboot's command.

    Signed-off-by: Marek Szyprowski
    Reviewed-by: Lukasz Majewski

    Marek Szyprowski
     

17 Jul, 2019

7 commits

  • This will allow for downloading and applying overlays from an MMC/SD
    boot media based on the overlay_files ENV variable containing a list
    of overlay files.

    Signed-off-by: Andreas Dannenberg
    Reviewed-by: Lokesh Vutla

    Andreas Dannenberg
     
  • The TI AM654x EVM base board and the associated daughtercards have on-
    board I2C-based EEPROMs containing board configuration data. Use the
    board detection infrastructure introduced earlier to do the following:

    1) Parse the AM654x EVM base board EEPROM and populate items like board
    name and MAC addresses into the TI common EEPROM data structure
    residing in SRAM scratch space
    2) Check for presence of daughter card(s) by probing the associated
    presence signals via an I2C-based GPIO expander. Then, if such a
    card is found, parse the data such as additional Ethernet MAC
    addresses from its on-board EEPROM and populate into U-Boot
    accordingly
    3) Dynamically create an U-Boot ENV variable called overlay_files
    containing a list of daugherboard-specific DTB overlays based on
    daughercards found.

    This patch adds support for the AM654x base board ("AM6-COMPROCEVM")
    as well as for the IDK ("AM6-IDKAPPEVM"), OLDI LCD ("OLDI-LCD1EVM")
    PCIe/USB3.0 ("SER-PCIEUSBEVM"), 2 Lane PCIe/USB2.0 ("SER-PCIE2LEVM"),
    and general purpuse ("AM6-GPAPPEVM") daughtercards.

    Signed-off-by: Andreas Dannenberg
    Reviewed-by: Lokesh Vutla

    Andreas Dannenberg
     
  • Add configs to support RAW boot mode in eMMC.

    Signed-off-by: Faiz Abbas
    Signed-off-by: Andreas Dannenberg

    Faiz Abbas
     
  • Switch to using the full malloc scheme in post-relocation SPL to allow
    better utilization of available memory for example by allowing memory
    to get freed. Initially allocate a 16MB-sized region in DDR starting
    at address 0x84000000 for this purpose.

    Signed-off-by: Andreas Dannenberg

    Andreas Dannenberg
     
  • In order to be able to use more advanced driver functionality which often
    relies on having BSS initialized during early boot prior to relocation
    several things need to be in place:

    1) Memory needs to be available for BSS to use. For this, we locate BSS
    at the top of the MCU SRAM area, with the stack starting right below
    it,
    2) We need to move the initialization of BSS prior to entering
    board_init_f(). We will do this with a separate commit by turning on
    the respective CONFIG option.

    In this commit we also clean up the assignment of the initial SP address
    as part of the refactoring, taking into account the pre-decrement post-
    increment nature in which the SP is used on ARM.

    Signed-off-by: Andreas Dannenberg

    Andreas Dannenberg
     
  • The current U-Boot SPL image loader infrastructure is very powerful,
    able to initialize and load from a variety of boot media however it
    is strongly geared towards loading specific types of images in a very
    specific way. To address the need being able to use this infrastructure
    to load arbitrary image files go ahead and refactor it as follows:

    - Refactor existing spl_mmc_load_image function into superset function,
    accepting additional arguments such as filenames and media load offset
    (same concept can also be applied toother spl_XXX_load_image functions)
    - Extend the loader function to "remember" their peripheral initialization
    status so that the init is only done once during the boot process,
    - Extend the FIT image loading function to allow skipping the parsing/
    processing of the FIT contents (so that this can be done separately
    in a more customized fashion)
    - Populate the SPL_LOAD_IMAGE_METHOD() list with a trampoline function,
    invoking the newly refactored superset functions in a way to maintain
    compatibility with the existing behavior

    This refactoring initially covers MMC/SD card loading (RAW and FS-based).

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

    Andreas Dannenberg
     
  • Add Support for creating a GPT partition for the filesystem in eMMC.
    The filesystem is created in the user partition (partition 0).

    Signed-off-by: Faiz Abbas

    Faiz Abbas