From a16df1c026f09b9990011d378f8626dc5df3acbe Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 23 Nov 2025 12:03:02 +0100 Subject: [PATCH] build_mpos.sh: apply I2C patch for lvgl_micropython / esp-idf --- patches/i2c_ng.patch | 4 ++-- scripts/build_mpos.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/i2c_ng.patch b/patches/i2c_ng.patch index 69118397..bb5a819a 100644 --- a/patches/i2c_ng.patch +++ b/patches/i2c_ng.patch @@ -1,5 +1,5 @@ ---- lib/esp-idf/components/driver/i2c/i2c.c.orig 2025-11-23 11:54:37.321320078 +0100 -+++ lib/esp-idf/components/driver/i2c/i2c.c 2025-11-23 11:54:54.681590547 +0100 +--- lvgl_micropython/lib/esp-idf/components/driver/i2c/i2c.c.orig 2025-11-23 11:54:37.321320078 +0100 ++++ lvgl_micropython/lib/esp-idf/components/driver/i2c/i2c.c 2025-11-23 11:54:54.681590547 +0100 @@ -1715,8 +1715,8 @@ // So if the new I2C driver is not linked in, then `i2c_acquire_bus_handle()` should be NULL at runtime. extern __attribute__((weak)) esp_err_t i2c_acquire_bus_handle(int port_num, void *i2c_new_bus, int mode); diff --git a/scripts/build_mpos.sh b/scripts/build_mpos.sh index d1095d97..bc19c5f9 100755 --- a/scripts/build_mpos.sh +++ b/scripts/build_mpos.sh @@ -70,6 +70,8 @@ echo "Symlinking secp256k1-embedded-ecdh for unix and macOS builds..." ln -sf ../../secp256k1-embedded-ecdh "$codebasedir"/lvgl_micropython/ext_mod/secp256k1-embedded-ecdh echo "Symlinking c_mpos for unix and macOS builds..." ln -sf ../../c_mpos "$codebasedir"/lvgl_micropython/ext_mod/c_mpos +echo "Applying lvgl_micropython i2c patch..." +patch -p0 --forward < "$codebasedir"/patches/i2c_ng.patch echo "Refreshing freezefs..." "$codebasedir"/scripts/freezefs_mount_builtin.sh