From 74de80d0c66348ddc9483f63477309771261794e Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Tue, 6 Oct 2026 01:42:49 -0500 Subject: [PATCH] Overlay patch 0018: esp32 drops user-module include dirs that don't exist (a fresh ESP-IDF v5.5.4 clone broke every S3 build with cameraif or displayif); modules.lock: displayif and pydevices at the KeDei merges --- README.md | 2 +- modules.lock | 4 +- ...32-drop-missing-usermod-include-dirs.patch | 51 +++++++++++++++++++ provenance.json | 3 ++ 4 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 patches/micropython/0018-micropython-esp32-drop-missing-usermod-include-dirs.patch diff --git a/README.md b/README.md index 388af32..9df52c0 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ New here? The [newcomer's guide](docs/newcomers.md) explains the model; the - `modules/` — `manifest.py` (the manifest every build freezes), `all/` (every module), `castif/` (the ESP32-P4 cast, which lives only here), and the modules themselves, linked or cloned. -- `patches/micropython/` — our patch series (`0001-…` to `0017-…`), each +- `patches/micropython/` — our patch series (`0001-…` to `0018-…`), each justified in its own header; `patches/apply_patches.py` applies it, plus each module's own MicroPython patches, once, as one local commit. - `variants/` — our variants: `unix/` and `windows/` (`pydevices`, diff --git a/modules.lock b/modules.lock index 1d99b00..02bc4d2 100644 --- a/modules.lock +++ b/modules.lock @@ -7,11 +7,11 @@ audiocomponents https://github.com/PyDevices/audiocomponents.git 883d591784 audiodsp https://github.com/PyDevices/audiodsp.git 7da36f7bf016236c8df02505a653ea35dc62d600 audioif https://github.com/PyDevices/audioif.git b6b35a48a0cd23ddc549f8c0643d77ffe778da28 cameraif https://github.com/PyDevices/cameraif.git 77b20b128800d5e1e23aab4c131e58f46b12cad2 -displayif https://github.com/PyDevices/displayif.git cd6f82c38ece2266b241c240542902d9465b6559 +displayif https://github.com/PyDevices/displayif.git b8366781c580da3a1683713e774d4d4e7aaf939f lvgl-micropython https://github.com/PyDevices/lvgl-micropython.git 8f7d89d0f8170ef526d5bd798c4bc0d05651309e palettes https://github.com/PyDevices/palettes.git 6f0870f0c8a0b48c56d2150b3f800bbbee7761e1 pdwidgets https://github.com/PyDevices/pdwidgets.git 306c1e20e0c3c63066dab6d10155fcf165a6ba13 -pydevices https://github.com/PyDevices/pydevices.git c55aa1e7da1c7db8e50536bf939dd38f27f588f5 +pydevices https://github.com/PyDevices/pydevices.git 36cba5f9da32a9d9005e7fe725ce8bd70aa21921 pygraphics https://github.com/PyDevices/pygraphics.git b4d4c49cc2a22cdd2632f2eea2593b4cc4df4db1 ulab https://github.com/v923z/micropython-ulab.git 1d3ddd8f5228e2c7335dac71f4846e6abb0ec9f9 usbif https://github.com/PyDevices/usbif.git 2b9397a27ffee21ef0962f291ccdebfcad5b583e diff --git a/patches/micropython/0018-micropython-esp32-drop-missing-usermod-include-dirs.patch b/patches/micropython/0018-micropython-esp32-drop-missing-usermod-include-dirs.patch new file mode 100644 index 0000000..fae0ed5 --- /dev/null +++ b/patches/micropython/0018-micropython-esp32-drop-missing-usermod-include-dirs.patch @@ -0,0 +1,51 @@ +From 73627d589c66fec1fd6063f634f4b0793d0f41a5 Mon Sep 17 00:00:00 2001 +From: Brad Barnett +Date: Tue, 6 Oct 2026 01:33:21 -0500 +Subject: [PATCH] esp32: drop user-module include directories that don't exist. + +A user C module that links an ESP-IDF component (idf::esp_driver_cam, +idf::esp_lcd, ...) brings that component's include directories into +MICROPY_INC_USERMOD, through usermod.cmake's transitive gather, and +idf_component_register() refuses any that don't exist. ESP-IDF itself +tolerates them: v5.5.4's esp_hw_support declares +mspi_timing_tuning/port/esp32s3/include, which holds no tracked files, so a +fresh clone never creates it, and every ESP32-S3 build with such a module +failed at configure with "Include directory ... is not a directory". A +checkout that had once been at an older tag kept the empty directory and +hid it. + +Seen building ESP32_GENERIC_S3 with cameraif and displayif against a fresh +ESP-IDF v5.5.4 clone (micropython-pydevices' cloud exercise, 2026-10-06). +Unchanged on upstream master as of 2026-10-06. +--- + ports/esp32/esp32_common.cmake | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake +index fee776f..5076feb 100644 +--- a/ports/esp32/esp32_common.cmake ++++ b/ports/esp32/esp32_common.cmake +@@ -220,6 +220,20 @@ if (UPDATE_SUBMODULES) + unset(MICROPY_INC_CORE) + endif() + ++# A user C module that links an ESP-IDF component (for example ++# idf::esp_driver_cam) brings that component's include directories into ++# MICROPY_INC_USERMOD, and idf_component_register() below refuses any that ++# don't exist. ESP-IDF itself tolerates such directories: v5.5.4 declares ++# esp_hw_support/mspi_timing_tuning/port/esp32s3/include, which holds no files, ++# so a fresh clone never creates it. Drop the ones that aren't there. ++set(_micropy_inc_usermod) ++foreach(_dir IN LISTS MICROPY_INC_USERMOD) ++ if(_dir MATCHES "^\\$<" OR EXISTS "${_dir}") ++ list(APPEND _micropy_inc_usermod "${_dir}") ++ endif() ++endforeach() ++set(MICROPY_INC_USERMOD ${_micropy_inc_usermod}) ++ + # Register the main IDF component. + idf_component_register( + SRCS +-- +2.43.0 + diff --git a/provenance.json b/provenance.json index 4e2013d..9d98f23 100644 --- a/provenance.json +++ b/provenance.json @@ -52,6 +52,9 @@ }, "0017-micropython-py-makeqstrdefs-incremental-build-header-qstr.patch": { "sha256": "8ef3dee1fde56ca4dffd230e09df323e0eea050cc3d96a542eb56bf4e99c2de5" + }, + "0018-micropython-esp32-drop-missing-usermod-include-dirs.patch": { + "sha256": "ed968c8c24147056cad48642612fe9eed9a8fff051b64705ee587c548a8144b9" } } }