Skip to content
Snippets Groups Projects
  1. Oct 31, 2021
  2. Oct 14, 2021
    • Simon Glass's avatar
      pytest: Show a message when sandbox crashes · 35839eda
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      When a test hands on a real board there is no way on the console to obtain
      any information about why it hung.
      
      With sandbox we can actually find out that it died and get a signal or
      exit code. Add this to make it easier to figure out what happened.
      
      So instead of:
      
      test/py/u_boot_spawn.py:171: in expect
          c = os.read(self.fd, 1024).decode(errors='replace')
      E   OSError: [Errno 5] Input/output error
      
      We get:
      
      test/py/u_boot_spawn.py:171: in expect
          c = os.read(self.fd, 1024).decode(errors='replace')
      E   ValueError: U-Boot exited with signal 11 (Signals.SIGSEGV)
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      35839eda
    • Simon Glass's avatar
      pytest: Shorten traceback length by default · b04f64aa
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This produces a lot of code output which is not very helpful and is quite
      annoying to wade through. Use the short format by default.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      b04f64aa
  3. Oct 13, 2021
  4. Oct 12, 2021
    • Patrice Chotard's avatar
      test/py: Add usb gadget binding test · 39bd2c8e
      Patrice Chotard authored
      
      Add a specific usb gadget binding test which check that
      binding a driver without compatible string is working as expected.
      
      the command "bind /usb@1 usb_ether" should give the following "dm tree"
      command output:
      
      [...]
       usb           0  [   ]   usb_sandbox           |-- usb@1
       usb_hub       0  [   ]   usb_hub               |   |-- hub
       usb_emul      0  [   ]   usb_sandbox_hub       |   |   `-- hub-emul
       usb_emul      1  [   ]   usb_sandbox_flash     |   |       |-- flash-stick@0
       usb_emul      2  [   ]   usb_sandbox_flash     |   |       |-- flash-stick@1
       usb_emul      3  [   ]   usb_sandbox_flash     |   |       |-- flash-stick@2
       usb_emul      4  [   ]   usb_sandbox_keyb      |   |       `-- keyb@3
       eth           4  [   ]   usb_ether             |   `-- usb@1
      [...]
      
      Signed-off-by: Patrice Chotard's avatarPatrice Chotard <patrice.chotard@foss.st.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Herbert Poetzl <herbert@13thfloor.at>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      39bd2c8e
    • Patrice Chotard's avatar
      cmd: bind: Fix driver binding on a device · 38f7d3b6
      Patrice Chotard authored
      
      Fix a regression brings by commit 84f8e36f ("cmd: bind: allow to
      bind driver with driver data")
      
      As example, the following bind command doesn't work:
      
         bind /soc/usb-otg@49000000 usb_ether
      
      As usb_ether driver has no compatible string, it can't be find by
      lists_bind_fdt(). In bind_by_node_path(), which called lists_bind_fdt(),
      the driver entry is known, pass it to lists_bind_fdt() to force the driver
      entry selection.
      
      For this, add a new parameter struct *driver to lists_bind_fdt().
      Fix also all lists_bind_fdt() callers.
      
      Fixes: 84f8e36f ("cmd: bind: allow to bind driver with driver data")
      Signed-off-by: Patrice Chotard's avatarPatrice Chotard <patrice.chotard@foss.st.com>
      Reported-by: default avatarHerbert Poetzl <herbert@13thfloor.at>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Herbert Poetzl <herbert@13thfloor.at>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      38f7d3b6
  5. Oct 09, 2021
    • Simon Glass's avatar
      lz4: Use a private header for U-Boot · 2a2d8e94
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present U-Boot has a header file called lz4.h for its own use. If the
      host has its own lz4 header file installed (e.g. from the 'liblz4-dev'
      package) then host builds will use that instead.
      
      Move the U-Boot file into its own directory, as is done with various
      other headers with the same problem.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      2a2d8e94
  6. Oct 08, 2021
    • Simon Glass's avatar
      Add support for an owned buffer · 67bc59df
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      When passing a data buffer back from a function, it is not always clear
      who owns the buffer, i.e. who is responsible for freeing the memory used.
      An example of this is where multiple files are decompressed from the
      firmware image, using a temporary buffer for reading (since the
      compressed data has to live somewhere) and producing a temporary or
      permanent buffer with the resuilts.
      
      Where the firmware image can be memory-mapped, as on x86, the compressed
      data does not need to be buffered, but the complexity of having a buffer
      which is either allocated or not, makes the code hard to understand.
      
      Introduce a new 'abuf' which supports simple buffer operations:
      
      - encapsulating a buffer and its size
      - either allocated with malloc() or not
      - able to be reliably freed if necessary
      - able to be converted to an allocated buffer if needed
      
      This simple API makes it easier to deal with allocated and memory-mapped
      buffers.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      67bc59df
    • Simon Glass's avatar
      lib: Add memdup() · 930c887e
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add a function to duplicate a memory region, a little like strdup().
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      930c887e
  7. Oct 07, 2021
  8. Oct 06, 2021
  9. Oct 05, 2021
  10. Sep 30, 2021
  11. Sep 28, 2021
  12. Sep 25, 2021
  13. Sep 24, 2021
  14. Sep 17, 2021
  15. Sep 16, 2021
  16. Sep 13, 2021
  17. Sep 04, 2021
  18. Aug 31, 2021
  19. Aug 22, 2021
  20. Aug 16, 2021
  21. Aug 08, 2021
    • Simon Glass's avatar
      dm: core: Don't allow uclass use before ready · 1e9ced28
      Simon Glass authored
      
      At present it is possible to call uclass_get() before driver model is
      inited. In fact this happens on x86 boards which use Intel FSPv1, since
      mrccache_get_region() tries to get the SPI flash device very early
      during init.
      
      This has always been undefined behaviour. Previously it generally worked,
      i.e. returned an error code without crashing, because gd->uclass_root_s
      is zeroed and the uclass can be added despite driver model not being
      ready, due to the way lists are implemented. With the change to use a
      gd->uclass_root pointer, this no-longer works. For example, it causes a
      hang on minnowmax.
      
      Fix this by adding a check that driver model is ready when uclass_get() is
      called. This function is called in the process of locating any device, so
      it is a good place to add the check.
      
      This fixes booting on minnowmax.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Fixes: 8a715530 ("dm: core: Allow the uclass list to move")
      1e9ced28
  22. Aug 02, 2021
    • Simon Glass's avatar
      lib: Allow using 0x when a decimal value is requested · e6951139
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      U-Boot mostly uses hex for value input, largely because addresses are much
      easier to understand in hex.
      
      But in some cases a decimal value is requested, such as where the value is
      small or hex does not make sense in the context. In these cases it is
      sometimes useful to be able to provide a hex value in any case, if only to
      resolve any ambiguity.
      
      Add this functionality, for increased flexibility.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      e6951139
Loading