diff --git a/.github/workflows/verify_kconfig.yml b/.github/workflows/verify_kconfig.yml new file mode 100644 index 000000000..e1530cb18 --- /dev/null +++ b/.github/workflows/verify_kconfig.yml @@ -0,0 +1,22 @@ +name: Verify Kconfig +on: + push: + pull_request: + +jobs: + verify-kconfig: + if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 0 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: 3.7 + - name: Run kconfig_verify.py + run: python3 -m pip install kconfiglib && python kconfig_verify.py ../Kconfig + working-directory: scripts diff --git a/Kconfig b/Kconfig index cb066064e..7df38b7a5 100644 --- a/Kconfig +++ b/Kconfig @@ -445,12 +445,12 @@ menu "LVGL configuration" Accelerate blends, fills, image decoding, etc. with STM32 DMA2D. config LV_DRAW_DMA2D_HAL_INCLUDE - int "the header file for LVGL to include for DMA2D" + string "the header file for LVGL to include for DMA2D" default "stm32h7xx_hal.h" depends on LV_USE_DRAW_DMA2D config LV_USE_DRAW_DMA2D_INTERRUPT - int "use the DMA2D transfer complete interrupt" + bool "use the DMA2D transfer complete interrupt" default n depends on LV_USE_DRAW_DMA2D help @@ -1384,7 +1384,7 @@ menu "LVGL configuration" config LV_USE_MEM_MONITOR bool "Show the used memory and the memory fragmentation" default n - depends on LV_STDLIB_BUILTIN && LV_USE_SYSMON + depends on LV_USE_BUILTIN_MALLOC && LV_USE_SYSMON choice prompt "Memory monitor position" diff --git a/scripts/install-prerequisites.bat b/scripts/install-prerequisites.bat index f37b11273..3bca1e9f1 100644 --- a/scripts/install-prerequisites.bat +++ b/scripts/install-prerequisites.bat @@ -1,4 +1,4 @@ vcpkg install vcpkg-tool-ninja libpng freetype opengl glfw3 glew if %errorlevel% neq 0 exit /b %errorlevel% -pip install pypng lz4 +pip install pypng lz4 kconfiglib if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/scripts/install-prerequisites.sh b/scripts/install-prerequisites.sh index f3ed71ee5..e48542138 100755 --- a/scripts/install-prerequisites.sh +++ b/scripts/install-prerequisites.sh @@ -14,4 +14,4 @@ sudo apt install gcc gcc-multilib g++-multilib ninja-build \ ruby-full gcovr cmake python3 pngquant libinput-dev libxkbcommon-dev \ libdrm-dev pkg-config wayland-protocols libwayland-dev libwayland-bin \ libwayland-dev:i386 libxkbcommon-dev:i386 -pip3 install pypng lz4 +pip3 install pypng lz4 kconfiglib diff --git a/scripts/kconfig_verify.py b/scripts/kconfig_verify.py new file mode 100644 index 000000000..f4c9c1249 --- /dev/null +++ b/scripts/kconfig_verify.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python3 + +import sys + +try: + import kconfiglib +except ImportError: + print("Need kconfiglib package, do `pip3 install kconfiglib`") + sys.exit(1) + + +def verify_kconfig(kconfig_file): + kconf = kconfiglib.Kconfig(kconfig_file) + + if kconf.warnings: + print("Warnings found:") + for warning in kconf.warnings: + print(warning) + sys.exit(1) + else: + print("No warnings found.") + + +if __name__ == "__main__": + if len(sys.argv) != 2: + print("Usage: python check_kconfig.py ") + sys.exit(1) + + verify_kconfig(sys.argv[1])