Skip to content
Snippets Groups Projects
  1. Jan 04, 2024
  2. Jul 06, 2023
    • Oliver Smith's avatar
      CI: run codespell instead of checkpatch spellcheck · 346a4662
      Oliver Smith authored
      In theory checkpatch.pl should use its spelling.txt to check for spell
      errors in the code, but it seems to be broken for some reason. It also
      has code to use codespell's dictionaries... but just use codespell
      directly.
      346a4662
    • Oliver Smith's avatar
      e011bb0c
    • Oliver Smith's avatar
      3f913812
    • Oliver Smith's avatar
      meson_build: set warning_level=2 · b88da692
      Oliver Smith authored
      b88da692
    • Oliver Smith's avatar
      pages, ui: make enum conversions explicit · e74f7a1c
      Oliver Smith authored
      ../src/pages.c:289:25: error: implicit conversion from ‘enum od2_storage_id’ to ‘enum od2_button’ [-Werror=enum-conversion]
      ../src/ui.c:331:21: error: implicit conversion from ‘enum od2_button’ to ‘enum od2_storage_id’ [-Werror=enum-conversion]
      e74f7a1c
    • Oliver Smith's avatar
      config, install: fix unused parameter warnings · 9b1b9e37
      Oliver Smith authored
      There's also LV_UNUSED, but let's not include lvgl headers just for
      that.
      
      ../src/config.c:27:29: error: unused parameter ‘ud’ [-Werror=unused-parameter]
      ../src/install.c:269:32: error: unused parameter ‘arg’ [-Werror=unused-parameter]
      9b1b9e37
    • Oliver Smith's avatar
      cmd: fix sign-compare warning · b325d85d
      Oliver Smith authored
      ../src/cmd.c:18:16: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Werror=sign-compare]
      b325d85d
    • Oliver Smith's avatar
      ui: add default to switch statement · d728484f
      Oliver Smith authored
      ../src/ui.c: In function ‘od2_ui_on_button’:
      ../src/ui.c:236:9: error: enumeration value ‘OD2_PAGE_WAIT’ not handled in switch [-Werror=switch]
        236 |         switch (page_id_current()) {
            |         ^~~~~~
      ../src/ui.c:236:9: error: enumeration value ‘_OD2_PAGE_MAX’ not handled in switch [-Werror=switch]
      d728484f
    • Oliver Smith's avatar
      ui_cli: remove unused variable · 3deb9a1e
      Oliver Smith authored
      ../src/ui_cli.c:147:16: error: unused variable ‘len’ [-Werror=unused-variable]
      3deb9a1e
    • Oliver Smith's avatar
      storages: add default to switch statements · 8720a2e3
      Oliver Smith authored
      ../src/storages.c: In function ‘od2_storage_init’:
      ../src/storages.c:204:9: error: enumeration value ‘_OD2_STORAGE_UNKNOWN’ not handled in switch [-Werror=switch]
        204 |         switch (g_boot_dev_id) {
            |         ^~~~~~
      ../src/storages.c:204:9: error: enumeration value ‘OD2_STORAGE_EMMC’ not handled in switch [-Werror=switch]
      ../src/storages.c:204:9: error: enumeration value ‘OD2_STORAGE_NVME’ not handled in switch [-Werror=switch]
      ../src/storages.c:204:9: error: enumeration value ‘_OD2_STORAGE_MAX’ not handled in switch [-Werror=switch]
      ../src/storages.c: In function ‘od2_storage_repartition’:
      ../src/storages.c:250:9: error: enumeration value ‘_OD2_STORAGE_UNKNOWN’ not handled in switch [-Werror=switch]
        250 |         switch (id) {
            |         ^~~~~~
      ../src/storages.c:250:9: error: enumeration value ‘OD2_STORAGE_SD’ not handled in switch [-Werror=switch]
      ../src/storages.c:250:9: error: enumeration value ‘_OD2_STORAGE_MAX’ not handled in switch [-Werror=switch]
      8720a2e3
    • Oliver Smith's avatar
      storages: remove unused variables · ecac457c
      Oliver Smith authored
      ../src/storages.c: In function ‘get_boot_dev’:
      ../src/storages.c:72:21: error: unused variable ‘ret’ [-Werror=unused-variable]
         72 |         const char *ret = NULL;
            |                     ^~~
      ../src/storages.c:71:15: error: unused variable ‘buf_last’ [-Werror=unused-variable]
         71 |         char *buf_last;
            |               ^~~~~~~~
      ecac457c
    • Oliver Smith's avatar
      storages: add parentheses around assignment · 9db9285c
      Oliver Smith authored
      ../src/storages.c:86:16: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
      9db9285c
    • Oliver Smith's avatar
      storages: add default to switch · fdf01906
      Oliver Smith authored
      ../src/storages.c: In function ‘od2_storage_get_path’:
      ../src/storages.c:41:9: error: enumeration value ‘_OD2_STORAGE_UNKNOWN’ not handled in switch [-Werror=switch]
         41 |         switch (id) {
            |         ^~~~~~
      ../src/storages.c:41:9: error: enumeration value ‘_OD2_STORAGE_MAX’ not handled in switch [-Werror=switch]
      fdf01906
    • Oliver Smith's avatar
      pages: fix warning about enums · ed0354a1
      Oliver Smith authored
      Doing the compare here is fine, as the enum values are kept in sync
      intentionally (see comments in storages.h and pages.h).
      
      ../src/pages.c: In function ‘od2_page_get_button_text’:
      ../src/pages.c:270:16: error: comparison between ‘enum od2_button’ and ‘enum od2_storage_id’ [-Werror=enum-compare]
        270 |         if (id > _OD2_STORAGE_UNKNOWN && id < _OD2_STORAGE_MAX)
            |                ^
      ../src/pages.c:270:45: error: comparison between ‘enum od2_button’ and ‘enum od2_storage_id’ [-Werror=enum-compare]
        270 |         if (id > _OD2_STORAGE_UNKNOWN && id < _OD2_STORAGE_MAX)
            |
      ed0354a1
    • Oliver Smith's avatar
      install: fix missing return · a18233c9
      Oliver Smith authored
      ../src/install.c:198:1: error: control reaches end of non-void function [-Werror=return-type]
      a18233c9
    • Oliver Smith's avatar
      install: remove unused variables · 7a665682
      Oliver Smith authored
      ../src/install.c:286:15: error: unused variable ‘pid’ [-Werror=unused-variable]
        286 |         pid_t pid;
            |               ^~~
      ../src/install.c:285:13: error: unused variable ‘rc’ [-Werror=unused-variable]
        285 |         int rc;
            |
      7a665682
    • Oliver Smith's avatar
      install_steps: fix warning · 6c4019da
      Oliver Smith authored
      ../src/install_steps.c:214:16: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
      6c4019da
  3. Jun 30, 2023
    • Casey's avatar
      gui: use transparency instead of hidden flag for back button · 276fd68a
      Casey authored and Oliver Smith's avatar Oliver Smith committed
      This way the layout engine will still account for it, so the header text
      will be in a consistent location regardless of if the back button is
      visible.
      276fd68a
    • Casey's avatar
      switch to meson + temp unl0kr fork · 988dd10d
      Casey authored and Oliver Smith's avatar Oliver Smith committed
      Notes by Oliver:
      * Caleb forked unl0kr to implement not-yet merged fbdev and libinput
        fixes, and to adjust the unl0kr source to make everything build with
        meson.
      * Squashed these commits from Caleb into one:
        * unl0kr: update for fbdev/libinput fixes
        * switch to meson + temp unl0kr fork
        * unl0kr: move to subprojects/ for meson
        * build system fixes for packaging
      * Use current head of ondev2-meson branch in Caleb's unl0kr.git fork
      * I've considered removing the git submodule and only using meson wrap,
        but that doesn't work since we also have git submodules in unl0kr.git
        and therefore need to use the recursive submodule init. Let's use
        both for now, we plan to merge unl0kr.git and ondev2.git in a near
        future, then we can look into making the submodules/wrap logic nicer.
      * Made test/run-test-host-losetup.sh work without existing build dir,
        removed -Dtest=true in the script as meson complained about it.
      * Configure --werror (with warning_level=0 for now, same level as with
        the Makefile, let's bump it in the future) and fix the
        ul_themes_themes pointer error it shows (caused random colors)
      * Removed the Makefile
      * Various cosmetic fixes
      * Adjust CI to use meson
      988dd10d
    • Casey's avatar
      install: switch to pthread (with barrier) · 6138f715
      Casey authored and Oliver Smith's avatar Oliver Smith committed
      Notes by Oliver:
      * Squashed two of Caleb's patches:
        * install: switch to pthread
        * install: pthread use barrier
      * Fixed linting error
      6138f715
    • Oliver Smith's avatar
      od2_install_step_copy_files_root: fix leaking fd · b5e1fa24
      Oliver Smith authored
      Add the missing closedir(), so we don't leak a file descriptor. This
      happened to work with existing fork code, but will not work anymore when
      switching to pthreads in the next commit.
      b5e1fa24
    • Oliver Smith's avatar
      checkpatch: ignore VOLATILE · 6abd2f46
      Oliver Smith authored
      Checkpatch warns about it as it doesn't make sense to use it in the
      kernel (see Documentation/process/volatile-considered-harmful.rst).
      However we'll use it properly for multithread code in a follow-up
      patch.
      6abd2f46
    • Oliver Smith's avatar
      checkpatch: ignore STRCPY, STRNCPY · 5cd46b50
      Oliver Smith authored
      Checkpatch recommends using strscpy instead, which is only defined in
      the kernel. Might be a good idea to copy it over into the source here
      too in the future and use that, but let's not use it for now.
      5cd46b50
  4. Jun 04, 2023
  5. Jun 03, 2023
  6. Feb 14, 2023
    • Oliver Smith's avatar
      ui_gui: make back button slightly wider · 09980e1d
      Oliver Smith authored
      09980e1d
    • Oliver Smith's avatar
      ui_gui: refactor keyboard code · 7ba32a72
      Oliver Smith authored
      * Only show the keyboard button if the page has a text input.
      * Only show the keyboard layout dropdown if the on-screen keyboard is
        active.
      * Remember if the user toggled the button, and use the same state on the
        next page with a text input (as opposed to always showing/hiding,
        depending on if there's a physical keyboard).
      * Use the LVGL hidden flag to hide the object, not the vertical
        position.
      7ba32a72
    • Oliver Smith's avatar
      ui_gui: keyboard: remove animation code · e85e4f0e
      Oliver Smith authored
      The keyboard animation code was currently unused in ondev2. I think it
      looks pretty cool in unl0kr when booting it up. But not sure how useful
      it is during the installation, with the multiple pages we have here etc.
      Remove it for now.
      e85e4f0e
    • Oliver Smith's avatar
      ui_gui: swap keyboard button + dropdown · 826facb0
      Oliver Smith authored
      A follow-up patch will only show the keyboard layout dropdown if the
      on-screen keyboard is visible. Swap it with the keyboard button, so the
      button doesn't change its position when the dropdown appears.
      826facb0
    • Oliver Smith's avatar
      ui_gui: move contrast button next to shutdown · f75af40d
      Oliver Smith authored
      Prepare to hide the keyboard button + dropdown for all pages that don't
      have text input. Move the contrast button to the right of it, so it
      doesn't change position when the keyboard button/dropdown show up.
      f75af40d
    • Oliver Smith's avatar
      po/de.po: fix whitespace error · ba487c03
      Oliver Smith authored
      ba487c03
    • Oliver Smith's avatar
      install_steps: use -F with mkfs.ext4 · 91c4b813
      Oliver Smith authored
      Fix that it aborts here if a filesystem already exists:
        /dev/mmcblk2p1 contains a ext2 file system labelled 'pmOS_boot'
                last mounted on /mnt/install-boot on Thu Jan  1 00:00:50 1970
        Proceed anyway? (y,N)
      91c4b813
Loading