Skip to content
Snippets Groups Projects
  1. Mar 08, 2023
  2. Mar 07, 2023
  3. Mar 02, 2023
  4. Feb 28, 2023
  5. Feb 24, 2023
  6. Feb 23, 2023
  7. Feb 14, 2023
  8. Feb 12, 2023
  9. Feb 11, 2023
    • Simon Glass's avatar
      trace: Add a test · 9cea4797
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a test which runs sandbox, collects a trace and makes sure it can
      be processed by trace-cmd. This should ensure that this feature continues
      to work as U-Boot and trace-cmd evolve.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      9cea4797
  10. Feb 10, 2023
  11. Feb 08, 2023
    • Tom Rini's avatar
      test: lmb: Rework lib_test_lmb_max_regions test to scale · 1975a3b1
      Tom Rini authored
      
      First, this test depends on CONFIG_LMB_USE_MAX_REGIONS, so add that as a
      test before building. Second, instead of using a hard-coded value of 8,
      which is the default of CONFIG_LMB_USE_MAX_REGIONS previously, use that
      directly and update the comments. The only trick here is that one part
      of the test itself also was written with the value of 8 itself in mind.
      Rework the size of the lmb region we allocate to scale with the value of
      CONFIG_LMB_USE_MAX_REGIONS.
      
      Cc: Simon Glass <sjg@chromium.org>
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      1975a3b1
  12. Feb 06, 2023
    • Linus Walleij's avatar
      cmd: Add a SEAMA image load command · 41a29f28
      Linus Walleij authored and Tom Rini's avatar Tom Rini committed
      
      Add a command to load SEAMA (Seattle Image), a NAND flash
      on-flash storage format.
      
      This type of flash image is found in some D-Link routers such
      as DIR-645, DIR-842, DIR-859, DIR-860L, DIR-885L, DIR890L and
      DCH-M225, as well as in WD and NEC routers on the ath79
      (MIPS), Broadcom BCM53xx, and RAMIPS platforms.
      
      This U-Boot command will read and decode a SEAMA image from
      raw NAND flash on any platform. As it is always using big endian
      format for the data decoding is always necessary on platforms
      such as ARM.
      
      The command is needed to read a SEAMA-encoded boot image on the
      D-Link DIR-890L router for boot from NAND flash in an upcoming
      port of U-Boot to the Broadcom Northstar (BCM4709, BCM53xx)
      architecture.
      
      A basic test and documentation is added as well. The test must
      be run on a target with NAND flash support and at least one
      resident SEAMA image in flash.
      
      Cc: Rafał Miłecki <rafal@milecki.pl>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      41a29f28
    • Simon Glass's avatar
      arm: qemu: Move GUIDs to the C file · 662cfa03
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      These are only used in one place, so move them there.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      662cfa03
    • Linus Walleij's avatar
      test: bootdev: Do not require USB to compile test · 0c1413f6
      Linus Walleij authored and Tom Rini's avatar Tom Rini committed
      
      This test will block compilation of the entire test suite
      on platforms without USB support. Make the extern
      "usb_started" conditional on USB host or gadget and
      define a dummy flag if neither is enabled.
      
      Cc: Simon Glass <sjg@chromium.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      0c1413f6
  13. Feb 04, 2023
  14. Jan 27, 2023
    • Mark Kettenis's avatar
      test: Add test for mapping IOMMUs for PCI devices · 08386da0
      Mark Kettenis authored and Tom Rini's avatar Tom Rini committed
      
      Test that we correctly probe an IOMMU that is mapped by an
      "iommu-map" device tree property of a PCIe controller node.
      
      Signed-off-by: default avatarMark Kettenis <kettenis@openbsd.org>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      08386da0
    • Mark Kettenis's avatar
      test: Add test for IOMMU uclass map/unmap ops · 49a1a4be
      Mark Kettenis authored and Tom Rini's avatar Tom Rini committed
      
      Test that the map and unmap operations work for devices that
      have DMA translated by an IOMMU and devices that don't have
      DMA translated by an IOMMU.
      
      Signed-off-by: default avatarMark Kettenis <kettenis@openbsd.org>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      49a1a4be
    • Massimo Pegorer's avatar
      mkimage: fit: Support signed configurations in 'auto' FITs · b93a6520
      Massimo Pegorer authored and Tom Rini's avatar Tom Rini committed
      
      Extend support for signing in auto-generated (-f auto) FIT. Previously,
      it was possible to get signed 'images' subnodes in the FIT using
      options -g and -o together with -f auto. This patch allows signing
      'configurations' subnodes instead of 'images' ones (which are hashed),
      using option -f auto-conf instead of -f auto. Adding also -K <dtb> and
      -r options, will add public key to <dtb> file with required = "conf"
      property.
      
      Summary:
          -f auto => FIT with crc32 images
          -f auto -g ... -o ... => FIT with signed images
          -f auto-conf -g ... -o ... => FIT with sha1 images and signed confs
      
      Example: FIT with kernel, two device tree files, and signed
      configurations; public key (needed to verify signatures) is
      added to u-boot.dtb with required = "conf" property.
      
      mkimage -f auto-conf -A arm -O linux -T kernel -C none -a 43e00000 \
              -e 0 -d vmlinuz -b /path/to/first.dtb -b /path/to/second.dtb \
              -k /folder/with/key-files -g keyname -o sha256,rsa4096 \
              -K u-boot.dtb -r kernel.itb
      
      Example: Add public key with required = "conf" property to u-boot.dtb
      without needing to sign anything. This will also create a useless FIT
      named unused.itb.
      
      mkimage -f auto-conf -d /dev/null -k /folder/with/key-files \
              -g keyname -o sha256,rsa4096 -K u-boot.dtb -r unused.itb
      
      Signed-off-by: default avatarMassimo Pegorer <massimo.pegorer@vimar.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      b93a6520
  15. Jan 23, 2023
    • Simon Glass's avatar
      bootstd: Record the bootdevs used during scanning · a950f285
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a way to record the bootdevs used when scanning for bootflows. This is
      useful for testing.
      
      Enable this only with BOOTSTD_FULL and do the same for the progress
      reporting.
      
      Re-enable and update the affected tests now that we have this feature.
      
      For bootdev_test_order_default() there is no-longer any support for using
      the bootdev aliases to specify an ordering, so drop that part of the test.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a950f285
    • Simon Glass's avatar
      bootstd: Drop the old bootflow_scan_first() · 4b7cb058
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This function is not used outside tests. Drop it and rename
      bootflow_scan_dev() since it is how we start a scan now.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      4b7cb058
    • Simon Glass's avatar
      bootstd: Allow scanning a single bootdev label · 91943ff7
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      We want to support scanning a single label, like 'mmc' or 'usb0'. Add
      this feature by plumbing the label through to the iterator, setting a
      flag to indicate that only siblings of the initial device should be used.
      
      This means that scanning a bootdev by its name is not supported anymore.
      That feature doesn't seem very useful in practice, so it is no great loss.
      
      Add a test for bootdev_find_by_any() while we are here.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      91943ff7
    • Simon Glass's avatar
      bootstd: Switch bootdev scanning to use labels · 47aedc29
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present we set up the bootdev order at the start, then scan the
      bootdevs one by one.
      
      However this approach cannot be used with hunters, since the bootdevs may
      not exist until the hunter is used. Nor can we just run all the hunters at
      the start, since that violate's U-Boot's 'lazy init' requirement. It also
      increases boot time.
      
      So we need to adjust the algorithm to scan by labels instead. As a first
      step, drop the dev_order[] array in favour of a list of labels. Update the
      name of bootdev_setup_iter_order() to better reflect what it does.
      
      Update some related comments and log messages. Also disable a few tests
      until a later commit where we can use them.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      47aedc29
    • Simon Glass's avatar
      bootstd: Add a hunter for the extension feature · 18552d2a
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This needs to run before any bootdev is used, so add a hunter for it.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      18552d2a
    • Simon Glass's avatar
      bootstd: Allow iterating to the next bootdev priortiy · 43e89a30
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a function which moves to the next priority to be processed.
      
      This works by storing the current priority in the bootflow iterator. The
      logic to set this up is included in a subsequent commit.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      43e89a30
    • Simon Glass's avatar
      bootstd: Allow iterating to the next label in a list · e4b69489
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a function which moves to the next label in a list of labels. This
      allows processing the boot_targets environment variable.
      
      This works using a new label list in the bootflow iterator. The logic to
      set this up is included in a subsequent commit.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      e4b69489
    • Simon Glass's avatar
      bootstd: Allow hunting for a bootdev by label · 66e3dce7
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a function to hunt for a bootdev label and find the bootdev produced
      by the hunter (or already present).
      
      Add a few extra flags so that we can distinguish between "mmc1", "mmc" and
      "1" which all need to be handled differently.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      66e3dce7
    • Simon Glass's avatar
      bootstd: Add a new pre-scan priority for bootdevs · eacc2611
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      We need extensions to be set up before we start trying to boot any of the
      bootdevs. Add a new priority before all the others for tht sort of thing.
      Also add a 'none' option, so that the first one is not 0.
      
      While we are here, comment enum bootdev_prio_t fully and expand the test
      for the 'bootdev hunt' command.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      eacc2611
    • Simon Glass's avatar
      bootstd: Allow hunting for bootdevs of a given priority · 79a7d4a6
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a way to run the hunter function for a particular priority, so that
      new bootdevs can be found.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      79a7d4a6
    • Simon Glass's avatar
      bootstd: Treat DHCP and PXE as bootdev labels · d9f48579
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      These are associated with the ethernet boot device but do not match its
      uclass name, so handle them as special cases.
      
      Provide a way to pass flags through with the bootdev so that we know
      how to process it. The flags are checked by the bootmeths, to ensure that
      only the selected bootmeth is used.
      
      While these both use the network device, they work quite differently. It
      is common to run only one of these, or to run PXE before DHCP. Provide
      bootflow flags to control which methods are used. Check these in the two
      bootmeths so that only the chosen one is used.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      d9f48579
    • Simon Glass's avatar
      bootstd: Add a SPI flash bootdev · 0c1f4a9f
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a bootdev for SPI flash so that these devices can be used with
      standard boot. It only supports loading a script.
      
      Add a special case for the label, since we want to use "spi", not
      "spi_flash".
      
      Enable the new bootdev on sandbox.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      0c1f4a9f
    • Simon Glass's avatar
      sandbox: Allow SPI flash bootdevs to be disabled for tests · 081bdc52
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Most tests don't want these and they can create a lot of noise. Add a way
      to disable them. Use that in tests, with a flag provided to enable them
      for tests that need this feature.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      081bdc52
    • Simon Glass's avatar
      bootstd: Include the device tree in the bootflow · 7638c851
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Some bootmeths provide a way to load a device tree as well as the base
      OS image. Add a way to store this in the bootflow. Update the
      'bootflow info' command to show this information.
      
      Note that the device tree is not allocated, but instead is stored at
      an address provided by an environment variable. This may need to be
      adjusted at some point, but for now it works well and fits in with the
      existing distro-boot scripts.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      7638c851
Loading