Skip to content
Snippets Groups Projects
  1. Jul 24, 2023
  2. Jul 20, 2023
  3. Jul 17, 2023
  4. Jul 16, 2023
  5. Jul 14, 2023
    • Simon Glass's avatar
      video: Update stb_truetype · 04f3dcd5
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This was brought in in 2016 and a number of changes have been made since
      then. There does not seem to be much change in functionality, but it is
      a good idea to update from time to time.
      
      Bring in the latest version:
      
         5736b15 ("re-add perlin noise again")
      
      Add a few necessary functions, with dummies in some cases. Update the tests
      as there are subtle changes in rendering, perhaps not for the better.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      04f3dcd5
    • Simon Glass's avatar
      expo: Add tests for the configuration editor · 87c1a413
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Add some simple tests and a helpful script to make the configuration
      editor easier to set up.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      87c1a413
    • Simon Glass's avatar
      expo: Support building an expo from a description file · 82cafee1
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      The only way to create an expo at present is by calling the functions to
      create each object. It is useful to have more data-driven approach, where
      the objects can be specified in a suitable file format and created from
      that. This makes testing easier as well.
      
      Add support for describing an expo in a devicetree node. This allows more
      complex tests to be set up, as well as providing an easier format for
      users. It also provides a better basis for the upcoming configuration
      editor.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      82cafee1
    • Simon Glass's avatar
      expo: Rename EXPOACT_POINT to EXPOACT_POINT_ITEM · 3f33b9c7
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present we only support a single menu, so all that can be pointed to
      is the current menu item. Rename this action so that we can also add
      an action for pointing to an object. This will allow cycling through
      the objects in a scene.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      3f33b9c7
    • Simon Glass's avatar
      expo: Move menu-item selection into a function · 8872bc7f
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      The current implementation supports a 'pointer' object which points to
      the currently highlighted menu item. We want to support highlighting the
      label of the menu item instead, e.g. with inverse video. In this case we
      will need to 'unhighlight' the old item and highlight the new one.
      
      As a first step, move the pointer logic into a function. This fixes a
      bug where the item is hidden when it should not be.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      8872bc7f
    • Simon Glass's avatar
      expo: Support simple themes · 2e593897
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      It is a pain to manually set the fonts of all objects to be consistent.
      Some spacing settings are also better set globally than by manually
      positioning each object.
      
      Add a 'theme' to the expo, to hold this information. For now it includes
      only the font size.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      2e593897
    • Simon Glass's avatar
      expo: Set up the width and height of objects · 699b0acb
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Provide a way to set the full dimensions of objects, i.e. including the
      width and height.
      
      For menus, calculate the bounding box of all objects in the menu. Set all
      labels to be the same size, so that highlighting works correct, once
      implemented.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      699b0acb
    • Simon Glass's avatar
      expo: Use flags for objects · ce72c9ec
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      We currently have just a 'hide' property for each object. In preparation
      for adding more properties, convert the struct to use a flags value,
      instead of individual booleans. This is more extensible.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      ce72c9ec
    • Simon Glass's avatar
      expo: Add width and height to objects · ae45d6cf
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present objects only have a position so it is not possible to determine
      the amount of space they take up on the display.
      
      Add width and height properties, using a struct to keep all the dimensions
      together.
      
      For now this is not used. Future work will set up these new properties.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      ae45d6cf
    • Simon Glass's avatar
      fdt: Allow more general use of livetree · a8f2ac2a
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      At present livetree can only be used for the control FDT. It is useful
      to be able to use the ofnode API for other FDTs, e.g. those used by
      the upcoming configuration editor.
      
      We already have most of the support present, and tests can be marked with
      the UT_TESTF_OTHER_FDT flag to use another FDT as a special case. But
      with this change, the functionality becomes more generally available.
      
      Plumb in the require support.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a8f2ac2a
    • Simon Glass's avatar
      fdt: Align the start of the livetree · 9cf39bbe
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Ensure that the block of memory used by live tree is aligned according to
      the default for structures. This ensures that the root node appears at
      the start of the block, so it can be used with free(), rather than being
      4 bytes later in some cases.
      
      This corrects a rather obscure bug in unflatten_device_tree().
      
      Fixes: 8b50d526 ("dm: Add a function to create a 'live' device tree")
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      9cf39bbe
    • Simon Glass's avatar
      expo: Rename exp_set_text_mode() · 5904d953
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      Rename this function to match its peers, using the full "expo' prefix.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      5904d953
    • Simon Glass's avatar
      console: Correct truetype spacing error · a8f80409
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      The putc_xy() method is supposed to return the amount of space used. The
      existing implementation erroneously adds the previous sub-pixel position
      to the returned value. This spaces out the characters very slightly more
      than it should. It is seldom noticeable but it does make accurate
      measurement of the text impossible.
      
      Fix this minor but long-standing bug.
      
      Fixes: a29b0120 ("video: Add a console driver that uses TrueType fonts")
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      a8f80409
    • Simon Glass's avatar
      expo: Avoid automatically arranging the scene · 14a86a51
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This should ideally be done once after all scene changes have been made.
      Require an explicit call when everything is ready.
      
      Always arrange after a key it sent, just for convenience.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      14a86a51
    • Simon Glass's avatar
      expo: Convert to using a string ID for the scene title · def898c4
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This is easier to deal with if it uses the existing string handling,
      since we will be able to use translations, etc. in the future.
      
      Update it to use an ID instead of a string.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      def898c4
    • Simon Glass's avatar
      bdinfo: Correct use of assertions · 2c522af7
      Simon Glass authored and Tom Rini's avatar Tom Rini committed
      
      This test was written for the incorrect use of assertions. Update it to
      build with the previous approach, where tests fail at the first
      assertion.
      
      All assertion functions return 0 on success and non-zero on failure.
      They can be nested into functions simply by declaring a function that
      returns an int and using ut_assertok() to call it.
      
      Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarMarek Vasut <marex@denx.de>
      2c522af7
  6. Jul 07, 2023
    • Tobias Deiminger's avatar
      test: Find leftovers after clean/mrproper · 42c0e5bb
      Tobias Deiminger authored and Tom Rini's avatar Tom Rini committed
      
      Docs describe 'make clean' to delete most generated files, 'make
      mrproper' to delete current configuration and all generated files. This
      test tries to assert it.
      
      Idea is to search remaining files by patterns in copies of the initial
      out-of-source build, which has two advantages:
      - looking in an out-of-source build dir allows to tell generated source
        code from committed source code
      - copying is fast (compared to rebuilding each time) which allows to do
        a "world clean"
      
      Signed-off-by: default avatarTobias Deiminger <tdmg@linutronix.de>
      42c0e5bb
  7. Jun 21, 2023
  8. Jun 20, 2023
  9. Jun 19, 2023
  10. Jun 16, 2023
  11. Jun 13, 2023
    • Ilias Apalodimas's avatar
      test/py: Account PCR updates properly during testing · 011f0155
      Ilias Apalodimas authored
      
      Currently we only read the pcr updates once on test_tpm2_pcr_read().
      It turns out that the tpm init sequence of force_init() which consists
      of:
      - tpm2 init
      - tpm2 startup TPM2_SU_CLEAR
      - tpm2 self_test full
      - tpm2 clear TPM2_RH_LOCKOUT
      
      also counts as an update.  Running this in the console verifies the
      update bump
      => tpm2 init
      => tpm2 startup TPM2_SU_CLEAR
      => tpm2 self_test full
      => tpm pcr_read 10 $loadaddr
      PCR #10 content (28 known updates):
       00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      => tpm2 clear TPM2_RH_LOCKOUT
      => tpm pcr_read 10 $loadaddr
      PCR #10 content (29 known updates):
       00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
       00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      =>
      
      With the recent changes of replacing 'tpm2 init' with 'tpm2 autostart'
      we end up always running the full init.  The reason is 'tpm init'
      returns -EBUSY if the tpm is already open, while 'tpm autostart' handles
      ths gracefully and continues with the initialization.  It's worth noting
      that this won't affect the device functionality at all since
      retriggering the startup sequence and selftests has no side effects.
      
      Instead of relying on the initial value, reread the 'known updates'
      just before updating the PCR to ensure we read the correct values
      before testing
      
      Reviewed-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      011f0155
Loading