From 899319c27eea040241f8fdb92a43de2a6994f1fd Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 17:02:20 +0200 Subject: [PATCH 01/44] unix build works --- .gitmodules | 13 +++++++++++++ freezeFS | 1 + lvgl_micropython | 1 + micropython-camera-API | 1 + scripts/build_lvgl_micropython.sh | 6 +++--- scripts/run_desktop.sh | 9 ++++++--- secp256k1-embedded-ecdh | 1 + 7 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 .gitmodules create mode 160000 freezeFS create mode 160000 lvgl_micropython create mode 160000 micropython-camera-API create mode 160000 secp256k1-embedded-ecdh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..4156f9ff --- /dev/null +++ b/.gitmodules @@ -0,0 +1,13 @@ +[submodule "freezeFS"] + path = freezeFS + url = https://github.com/MicroPythonOS/freezeFS +[submodule "secp256k1-embedded-ecdh"] + path = secp256k1-embedded-ecdh + url = https://github.com/MicroPythonOS/secp256k1-embedded-ecdh + branch = micropython_1.25.0 +[submodule "lvgl_micropython"] + path = lvgl_micropython + url = https://github.com/MicroPythonOS/lvgl_micropython +[submodule "micropython-camera-API"] + path = micropython-camera-API + url = https://github.com/cnadler86/micropython-camera-API diff --git a/freezeFS b/freezeFS new file mode 160000 index 00000000..92f12eb1 --- /dev/null +++ b/freezeFS @@ -0,0 +1 @@ +Subproject commit 92f12eb1aec68cc9730ef479e655804ce7dbb9ac diff --git a/lvgl_micropython b/lvgl_micropython new file mode 160000 index 00000000..bcfd8a96 --- /dev/null +++ b/lvgl_micropython @@ -0,0 +1 @@ +Subproject commit bcfd8a96c744b2b1e595aa1ab8d9c1995c158c64 diff --git a/micropython-camera-API b/micropython-camera-API new file mode 160000 index 00000000..2dd97117 --- /dev/null +++ b/micropython-camera-API @@ -0,0 +1 @@ +Subproject commit 2dd97117359d00729d50448df19404d18f67ac30 diff --git a/scripts/build_lvgl_micropython.sh b/scripts/build_lvgl_micropython.sh index c98584db..aee1b7df 100755 --- a/scripts/build_lvgl_micropython.sh +++ b/scripts/build_lvgl_micropython.sh @@ -55,8 +55,8 @@ if [ "$target" == "esp32" ]; then # CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y [ ! -z "$manifest" ] && frozenmanifest="FROZEN_MANIFEST="$(readlink -f "$manifest") - pushd "$twoup"/lvgl_micropython - python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7789 INDEV=cst816s USER_C_MODULE="$twoup"/micropython-camera-API/src/micropython.cmake USER_C_MODULE="$twoup"/secp256k1-embedded-ecdh/micropython.cmake USER_C_MODULE="$oneup"/c_mpos/micropython.cmake CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$frozenmanifest" + pushd lvgl_micropython + python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7789 INDEV=cst816s USER_C_MODULE="$mydir"/micropython-camera-API/src/micropython.cmake USER_C_MODULE="$mydir"/secp256k1-embedded-ecdh/micropython.cmake USER_C_MODULE="$mydir"/c_mpos/micropython.cmake CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$frozenmanifest" popd elif [ "$target" == "unix" -o "$target" == "macOS" ]; then if [ "$buildtype" == "prod" ]; then @@ -67,7 +67,7 @@ elif [ "$target" == "unix" -o "$target" == "macOS" ]; then # LV_CFLAGS are passed to USER_C_MODULES # STRIP= makes it so that debug symbols are kept [ ! -z "$manifest" ] && frozenmanifest="FROZEN_MANIFEST="$(readlink -f "$manifest") - pushd "$twoup"/lvgl_micropython + pushd lvgl_micropython/ # USER_C_MODULE doesn't seem to work properly so there are symlinks in lvgl_micropython/extmod/ python3 make.py "$target" LV_CFLAGS="-g -O0 -ggdb -ljpeg" STRIP= DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$manifest" popd diff --git a/scripts/run_desktop.sh b/scripts/run_desktop.sh index ae21d53d..1cfa236d 100755 --- a/scripts/run_desktop.sh +++ b/scripts/run_desktop.sh @@ -1,3 +1,6 @@ +#!/bin/bash +scriptdir=$(readlink -f "$0") +scriptdir=$(dirname "$mydir") script="$1" if [ -f "$script" ]; then script=$(readlink -f "$script") @@ -40,13 +43,13 @@ export HEAPSIZE=128M # for 1280x720 images in the image viewer # print os and set binary os_name=$(uname -s) -if [ "$os_name" == "Darwin" ]; then +if [ "$os_name" = "Darwin" ]; then echo "Running on macOS" - binary=../lvgl_micropython/build/lvgl_micropy_macOS + binary="$scriptdir"/../lvgl_micropython/build/lvgl_micropy_macOS else # other cases can be added here echo "Running on $os_name" - binary=../lvgl_micropython/build/lvgl_micropy_unix + binary="$scriptdir"/../lvgl_micropython/build/lvgl_micropy_unix fi binary=$(readlink -f "$binary") diff --git a/secp256k1-embedded-ecdh b/secp256k1-embedded-ecdh new file mode 160000 index 00000000..34a3ea18 --- /dev/null +++ b/secp256k1-embedded-ecdh @@ -0,0 +1 @@ +Subproject commit 34a3ea189c5c89ff79c81db7fa9f60c43a9cf85b From 6a94f199c3293e6cc6a80339ac67da0817011e0a Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 17:08:48 +0200 Subject: [PATCH 02/44] run_desktop.sh: fix path bug --- scripts/run_desktop.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/run_desktop.sh b/scripts/run_desktop.sh index 1cfa236d..8ddf9998 100755 --- a/scripts/run_desktop.sh +++ b/scripts/run_desktop.sh @@ -1,6 +1,6 @@ -#!/bin/bash +#!/bin/bash -x scriptdir=$(readlink -f "$0") -scriptdir=$(dirname "$mydir") +scriptdir=$(dirname "$scriptdir") script="$1" if [ -f "$script" ]; then script=$(readlink -f "$script") From abd9491eb99eb9bb8367967632968ff518b59cd2 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 17:57:04 +0200 Subject: [PATCH 03/44] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b9e5dc3d..b898f4b3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ Main repository for MicroPythonOS. -See https://MicroPythonOS.com/ and https://docs.MicroPythonOS.com/ +See https://MicroPythonOS.com/ and https://docs.MicroPythonOS.com/ for more info. From 19e9d514275d214a9cca8fee40cf2f0bdd2757e9 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike <111072251+ThomasFarstrike@users.noreply.github.com> Date: Fri, 24 Oct 2025 17:56:20 +0200 Subject: [PATCH 04/44] Create main.yml --- .github/workflows/main.yml | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..7fe7184a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,64 @@ +name: Build LVGL MicroPython on Push to add-submodules + +on: + push: + branches: + - add-submodules + +jobs: + build: + runs-on: ubuntu-latest # Ubuntu is Debian-based and commonly used in GitHub Actions + + steps: + - name: Checkout repository with submodules + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + libffi-dev \ + pkg-config \ + cmake \ + ninja-build \ + gnome-desktop-testing \ + libasound2-dev \ + libpulse-dev \ + libaudio-dev \ + libjack-dev \ + libsndio-dev \ + libx11-dev \ + libxext-dev \ + libxrandr-dev \ + libxcursor-dev \ + libxfixes-dev \ + libxi-dev \ + libxss-dev \ + libxkbcommon-dev \ + libdrm-dev \ + libgbm-dev \ + libgl1-mesa-dev \ + libgles2-mesa-dev \ + libegl1-mesa-dev \ + libdbus-1-dev \ + libibus-1.0-dev \ + libudev-dev \ + fcitx-libs-dev \ + libpipewire-0.3-dev \ + libwayland-dev \ + libdecor-0-dev \ + git + + - name: Build LVGL MicroPython + run: | + ./scripts/build_lvgl_micropython.sh unix dev + + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: lvgl_micropy_unix + path: lvgl_micropython/build/lvgl_micropy_unix + retention-days: 7 # Adjust as needed; artifacts can be downloaded from the workflow run summary From 2ead7eeba73e84f6fb7a81dbd1b8681674c46148 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 18:14:25 +0200 Subject: [PATCH 05/44] Fetch tags --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7fe7184a..cb1c1b42 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,10 @@ jobs: with: submodules: recursive + - name: Fetch tags, needed for lib/SDL + run: | + git submodule foreach --recursive 'git fetch origin "refs/*:refs/*"' + - name: Install dependencies run: | sudo apt-get update From 0c933c952c23761bf223ce0523a467f319d9e034 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 18:23:22 +0200 Subject: [PATCH 06/44] Only SDL --- .github/workflows/main.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb1c1b42..ce6254c0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,9 +15,14 @@ jobs: with: submodules: recursive - - name: Fetch tags, needed for lib/SDL + - name: Fetch tags for lib/SDL run: | - git submodule foreach --recursive 'git fetch origin "refs/*:refs/*"' + # Unshallow a specific submodule (fetches full history) + cd lib/SDL + git fetch --unshallow origin + # Or fetch all refs without unshallowing (keeps it shallow but adds refs) + git fetch origin 'refs/*:refs/*' + cd ../.. - name: Install dependencies run: | From f8387bcf6b4d30d62817d61201dcc523551e2dc2 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 18:27:38 +0200 Subject: [PATCH 07/44] Fix path --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce6254c0..e26e3b1e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,11 +18,11 @@ jobs: - name: Fetch tags for lib/SDL run: | # Unshallow a specific submodule (fetches full history) - cd lib/SDL + cd lvgl_micropython/lib/SDL git fetch --unshallow origin # Or fetch all refs without unshallowing (keeps it shallow but adds refs) git fetch origin 'refs/*:refs/*' - cd ../.. + cd ../../.. - name: Install dependencies run: | From 57ca426dfc6868bbcfd24c0e18e852a024bbaea9 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 18:58:52 +0200 Subject: [PATCH 08/44] Move all customizations to build_lvgl_micropython.sh --- scripts/build_lvgl_micropython.sh | 49 +++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/scripts/build_lvgl_micropython.sh b/scripts/build_lvgl_micropython.sh index aee1b7df..dcf902a1 100755 --- a/scripts/build_lvgl_micropython.sh +++ b/scripts/build_lvgl_micropython.sh @@ -2,8 +2,7 @@ mydir=$(readlink -f "$0") mydir=$(dirname "$mydir") -twoup=$(readlink -f "$mydir"/../..) # build process needs absolute paths -oneup=$(readlink -f "$mydir"/..) # build process needs absolute paths +codebasedir=$(readlink -f "$mydir"/..) # build process needs absolute paths target="$1" buildtype="$2" @@ -23,8 +22,46 @@ if [ -z "$target" -o -z "$buildtype" ]; then exit 1 fi + +# This assumes all the git submodules have been checked out recursively + +echo "Fetch tags for lib/SDL, otherwise lvgl_micropython's make.py script can't checkout a specific tag..." +pushd "$codebasedir"/lvgl_micropython/lib/SDL +git fetch --unshallow origin +# Or fetch all refs without unshallowing (keeps it shallow but adds refs) +git fetch origin 'refs/*:refs/*' +popd + +echo "Check need to add esp32-camera..." +idfile="$codebasedir"/lvgl_micropython/lib/micropython/ports/esp32/main/idf_component.yml +if grep -v esp32-camera "$idfile"; then + echo "Adding esp32-camera to $idfile" + echo " espressif/esp32-camera: + git: https://github.com/MicroPythonOS/esp32-camera" >> "$idfile" +else + echo "No need to add esp32-camera to $idfile" +fi + +echo "Check need to add asyncio..." +manifile="$codebasedir"/lib/micropython/ports/unix/variants/manifest.py +if grep -v asyncio "$manifile"; then + echo "Adding asyncio to $manifile" + echo 'include("$(MPY_DIR)/extmod/asyncio") # needed to have asyncio, which is used by aiohttp, which has used by websockets' >> "$manifile" +else + echo "No need to add asyncio to $manifile" +fi + +# unix and macOS builds need these symlinks because make.py doesn't handle USER_C_MODULE arguments for them: +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 + + if [ "$buildtype" == "prod" ]; then - ./scripts/freezefs_mount_builtin.sh + freezefs="$codebasedir"/scripts/freezefs_mount_builtin.sh + echo "It's a $buildtype build, running $freezefs" + $freezefs fi @@ -55,8 +92,8 @@ if [ "$target" == "esp32" ]; then # CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y [ ! -z "$manifest" ] && frozenmanifest="FROZEN_MANIFEST="$(readlink -f "$manifest") - pushd lvgl_micropython - python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7789 INDEV=cst816s USER_C_MODULE="$mydir"/micropython-camera-API/src/micropython.cmake USER_C_MODULE="$mydir"/secp256k1-embedded-ecdh/micropython.cmake USER_C_MODULE="$mydir"/c_mpos/micropython.cmake CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$frozenmanifest" + pushd "$codebasedir"/lvgl_micropython/ + python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7789 INDEV=cst816s USER_C_MODULE="$codebasedir"/micropython-camera-API/src/micropython.cmake USER_C_MODULE="$codebasedir"/secp256k1-embedded-ecdh/micropython.cmake USER_C_MODULE="$codebasedir"/c_mpos/micropython.cmake CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$frozenmanifest" popd elif [ "$target" == "unix" -o "$target" == "macOS" ]; then if [ "$buildtype" == "prod" ]; then @@ -67,7 +104,7 @@ elif [ "$target" == "unix" -o "$target" == "macOS" ]; then # LV_CFLAGS are passed to USER_C_MODULES # STRIP= makes it so that debug symbols are kept [ ! -z "$manifest" ] && frozenmanifest="FROZEN_MANIFEST="$(readlink -f "$manifest") - pushd lvgl_micropython/ + pushd "$codebasedir"/lvgl_micropython/ # USER_C_MODULE doesn't seem to work properly so there are symlinks in lvgl_micropython/extmod/ python3 make.py "$target" LV_CFLAGS="-g -O0 -ggdb -ljpeg" STRIP= DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$manifest" popd From 19d449f01c2909201b1f65d7819dd8c8aad09c34 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 19:07:07 +0200 Subject: [PATCH 09/44] Build more artifacts --- .github/workflows/main.yml | 34 ++++++++++++++++++++++--------- scripts/build_lvgl_micropython.sh | 4 ++-- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e26e3b1e..3bcafce5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,15 +15,6 @@ jobs: with: submodules: recursive - - name: Fetch tags for lib/SDL - run: | - # Unshallow a specific submodule (fetches full history) - cd lvgl_micropython/lib/SDL - git fetch --unshallow origin - # Or fetch all refs without unshallowing (keeps it shallow but adds refs) - git fetch origin 'refs/*:refs/*' - cd ../../.. - - name: Install dependencies run: | sudo apt-get update @@ -61,7 +52,7 @@ jobs: libdecor-0-dev \ git - - name: Build LVGL MicroPython + - name: Build LVGL MicroPython for unix dev run: | ./scripts/build_lvgl_micropython.sh unix dev @@ -71,3 +62,26 @@ jobs: name: lvgl_micropy_unix path: lvgl_micropython/build/lvgl_micropy_unix retention-days: 7 # Adjust as needed; artifacts can be downloaded from the workflow run summary + + - name: Build LVGL MicroPython esp32 prod fri3d-2024 + run: | + ./scripts/build_lvgl_micropython.sh esp32 prod fri3d-2024 + + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_fri3d-2024_prod + path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + retention-days: 7 # Adjust as needed; artifacts can be downloaded from the workflow run summary + + + - name: Build LVGL MicroPython esp32 prod fri3d-2024 + run: | + ./scripts/build_lvgl_micropython.sh esp32 dev fri3d-2024 + + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_fri3d-2024_dev + path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + retention-days: 7 # Adjust as needed; artifacts can be downloaded from the workflow run summary diff --git a/scripts/build_lvgl_micropython.sh b/scripts/build_lvgl_micropython.sh index dcf902a1..9e2a5a9e 100755 --- a/scripts/build_lvgl_micropython.sh +++ b/scripts/build_lvgl_micropython.sh @@ -34,7 +34,7 @@ popd echo "Check need to add esp32-camera..." idfile="$codebasedir"/lvgl_micropython/lib/micropython/ports/esp32/main/idf_component.yml -if grep -v esp32-camera "$idfile"; then +if ! grep esp32-camera "$idfile"; then echo "Adding esp32-camera to $idfile" echo " espressif/esp32-camera: git: https://github.com/MicroPythonOS/esp32-camera" >> "$idfile" @@ -44,7 +44,7 @@ fi echo "Check need to add asyncio..." manifile="$codebasedir"/lib/micropython/ports/unix/variants/manifest.py -if grep -v asyncio "$manifile"; then +if ! grep asyncio "$manifile"; then echo "Adding asyncio to $manifile" echo 'include("$(MPY_DIR)/extmod/asyncio") # needed to have asyncio, which is used by aiohttp, which has used by websockets' >> "$manifile" else From 779f1c2a16d792e2490d906aee2b971d250dff45 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 19:29:51 +0200 Subject: [PATCH 10/44] Fix build --- scripts/build_lvgl_micropython.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build_lvgl_micropython.sh b/scripts/build_lvgl_micropython.sh index 9e2a5a9e..1ce633ff 100755 --- a/scripts/build_lvgl_micropython.sh +++ b/scripts/build_lvgl_micropython.sh @@ -27,9 +27,9 @@ fi echo "Fetch tags for lib/SDL, otherwise lvgl_micropython's make.py script can't checkout a specific tag..." pushd "$codebasedir"/lvgl_micropython/lib/SDL -git fetch --unshallow origin +git fetch --unshallow origin 2>/dev/null # will give error if already done # Or fetch all refs without unshallowing (keeps it shallow but adds refs) -git fetch origin 'refs/*:refs/*' +git fetch origin 'refs/*:refs/*' >/dev/null # huge list that pollutes the build output popd echo "Check need to add esp32-camera..." @@ -43,7 +43,7 @@ else fi echo "Check need to add asyncio..." -manifile="$codebasedir"/lib/micropython/ports/unix/variants/manifest.py +manifile="$codebasedir"/lvgl_micropython/lib/micropython/ports/unix/variants/manifest.py if ! grep asyncio "$manifile"; then echo "Adding asyncio to $manifile" echo 'include("$(MPY_DIR)/extmod/asyncio") # needed to have asyncio, which is used by aiohttp, which has used by websockets' >> "$manifile" From 3c6a31763959b25b13534601bb2d688d09e0d9fc Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 19:38:39 +0200 Subject: [PATCH 11/44] Only fetch SDL tags --- scripts/build_lvgl_micropython.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_lvgl_micropython.sh b/scripts/build_lvgl_micropython.sh index 1ce633ff..d4063a3a 100755 --- a/scripts/build_lvgl_micropython.sh +++ b/scripts/build_lvgl_micropython.sh @@ -29,7 +29,7 @@ echo "Fetch tags for lib/SDL, otherwise lvgl_micropython's make.py script can't pushd "$codebasedir"/lvgl_micropython/lib/SDL git fetch --unshallow origin 2>/dev/null # will give error if already done # Or fetch all refs without unshallowing (keeps it shallow but adds refs) -git fetch origin 'refs/*:refs/*' >/dev/null # huge list that pollutes the build output +git fetch origin 'refs/tags/*:refs/tags/*' popd echo "Check need to add esp32-camera..." From cbc59dad9f9e49c32b2c5ef672d765145d12c9b5 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 19:42:22 +0200 Subject: [PATCH 12/44] Install v4l as well --- .github/workflows/main.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3bcafce5..8d748866 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: with: submodules: recursive - - name: Install dependencies + - name: Install lvgl_micropython dependencies run: | sudo apt-get update sudo apt-get install -y \ @@ -50,7 +50,11 @@ jobs: libpipewire-0.3-dev \ libwayland-dev \ libdecor-0-dev \ - git + + - name: Install additional MicroPythonOS dependencies + run: | + sudo apt-get update + sudo apt-get install -y libv4l-dev - name: Build LVGL MicroPython for unix dev run: | From cf67068892cebadf105db08995fbd7ac83ae1a8d Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 22:30:12 +0200 Subject: [PATCH 13/44] Update secp256k1-embedded-ecdh --- secp256k1-embedded-ecdh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1-embedded-ecdh b/secp256k1-embedded-ecdh index 34a3ea18..e357950c 160000 --- a/secp256k1-embedded-ecdh +++ b/secp256k1-embedded-ecdh @@ -1 +1 @@ -Subproject commit 34a3ea189c5c89ff79c81db7fa9f60c43a9cf85b +Subproject commit e357950ca8facdf00f4f593811c4ecff6bba97bc From df629eafea6076c51f486a090b433206281f8598 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 22:40:12 +0200 Subject: [PATCH 14/44] .github: add macOS build --- .github/workflows/macos.yml | 42 +++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 00000000..0df94de4 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,42 @@ +name: Build LVGL MicroPython for MacOS + +on: + push: + branches: + - add-submodules + pull_request: + branches: [add-submodules] + workflow_dispatch: + +jobs: + build: + runs-on: macos-14 + + steps: + - name: Checkout repository with submodules + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Install dependencies via Homebrew + run: | + xcode-select --install + brew install pkg-config libffi ninja make SDL2 + + - name: Install additional MicroPythonOS dependencies + run: | + sudo apt-get update + sudo apt-get install -y libv4l-dev + + - name: Build LVGL MicroPython for unix dev + run: | + ./scripts/build_lvgl_micropython.sh macOS dev + + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: lvgl_micropy_macOS + path: lvgl_micropython/build/lvgl_micropy_macOS + retention-days: 7 # Adjust as needed; artifacts can be downloaded from the workflow run summary + + diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8d748866..c7a9ede9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: fcitx-libs-dev \ libpipewire-0.3-dev \ libwayland-dev \ - libdecor-0-dev \ + libdecor-0-dev - name: Install additional MicroPythonOS dependencies run: | From fb2b717ba62933797582ec539314b2f9aefb32d7 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 22:51:57 +0200 Subject: [PATCH 15/44] Fix yamllint errors --- .github/workflows/macos.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0df94de4..e70f1cf7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -37,6 +37,4 @@ jobs: with: name: lvgl_micropy_macOS path: lvgl_micropython/build/lvgl_micropy_macOS - retention-days: 7 # Adjust as needed; artifacts can be downloaded from the workflow run summary - - + retention-days: 7 From ec92b3d2e0f22781e7b655c722fc767203792fb3 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 22:53:11 +0200 Subject: [PATCH 16/44] No libv4l-dev on macOS --- .github/workflows/macos.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e70f1cf7..88105e6c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,11 +23,6 @@ jobs: xcode-select --install brew install pkg-config libffi ninja make SDL2 - - name: Install additional MicroPythonOS dependencies - run: | - sudo apt-get update - sudo apt-get install -y libv4l-dev - - name: Build LVGL MicroPython for unix dev run: | ./scripts/build_lvgl_micropython.sh macOS dev From d5d443a25ac255284e1e0ac6412f21f8e6013da2 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 23:07:03 +0200 Subject: [PATCH 17/44] Fix MacOS build --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 88105e6c..4efa2770 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -20,7 +20,7 @@ jobs: - name: Install dependencies via Homebrew run: | - xcode-select --install + xcode-select --install || true # already installed on github brew install pkg-config libffi ninja make SDL2 - name: Build LVGL MicroPython for unix dev From 5c81ae434014266e8baf0dfba21117adf4621abb Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 23:18:35 +0200 Subject: [PATCH 18/44] Disable webcam stuff on macOS --- c_mpos/micropython.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/c_mpos/micropython.mk b/c_mpos/micropython.mk index 656c623f..fc6cf84e 100644 --- a/c_mpos/micropython.mk +++ b/c_mpos/micropython.mk @@ -4,9 +4,16 @@ ifneq (,$(findstring -Wno-missing-field-initializers, $(CFLAGS_USERMOD))) CFLAGS_USERMOD += -Wno-missing-field-initializers endif -SRC_USERMOD_C += $(MOD_DIR)/src/hello_world.c +# Check which system this build is being performed on +UNAME_S := $(shell uname -s) +ifneq ($(UNAME_S),Darwin) + # Non-macOS settings (e.g., Linux) + LDFLAGS += -lv4l2 + SRC_USERMOD_C += $(MOD_DIR)/src/hello_world.c + SRC_USERMOD_C += $(MOD_DIR)/src/webcam.c +endif + SRC_USERMOD_C += $(MOD_DIR)/src/quirc_decode.c -SRC_USERMOD_C += $(MOD_DIR)/src/webcam.c SRC_USERMOD_C += $(MOD_DIR)/quirc/lib/identify.c SRC_USERMOD_C += $(MOD_DIR)/quirc/lib/version_db.c @@ -15,4 +22,3 @@ SRC_USERMOD_C += $(MOD_DIR)/quirc/lib/quirc.c CFLAGS+= -I/usr/include -LDFLAGS+= -lv4l2 From 58220110ed07a48b1d29668382c75fa69fca02e2 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Fri, 24 Oct 2025 23:19:15 +0200 Subject: [PATCH 19/44] Remove useless hello_world.c --- c_mpos/micropython.mk | 1 - c_mpos/src/hello_world.c | 32 -------------------------------- 2 files changed, 33 deletions(-) delete mode 100644 c_mpos/src/hello_world.c diff --git a/c_mpos/micropython.mk b/c_mpos/micropython.mk index fc6cf84e..66dfa1f0 100644 --- a/c_mpos/micropython.mk +++ b/c_mpos/micropython.mk @@ -9,7 +9,6 @@ UNAME_S := $(shell uname -s) ifneq ($(UNAME_S),Darwin) # Non-macOS settings (e.g., Linux) LDFLAGS += -lv4l2 - SRC_USERMOD_C += $(MOD_DIR)/src/hello_world.c SRC_USERMOD_C += $(MOD_DIR)/src/webcam.c endif diff --git a/c_mpos/src/hello_world.c b/c_mpos/src/hello_world.c deleted file mode 100644 index 58b9ab94..00000000 --- a/c_mpos/src/hello_world.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "py/obj.h" -#include "py/runtime.h" - - -//#error "building hello world from lcd_utils" - -// C function to print "Hello World" -static mp_obj_t hello_world(void) { - printf("Hello World from C compiled!\n"); - return mp_const_none; // MicroPython functions typically return None -} - -// Define the function entry in the module -static MP_DEFINE_CONST_FUN_OBJ_0(hello_world_obj, hello_world); - -// Module function table -static const mp_rom_map_elem_t hello_world_module_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_hello_world) }, - { MP_ROM_QSTR(MP_QSTR_hello), MP_ROM_PTR(&hello_world_obj) }, -}; - -// Module globals dictionary -static MP_DEFINE_CONST_DICT(hello_world_module_globals, hello_world_module_globals_table); - -// Module definition -const mp_obj_module_t hello_world_module = { - .base = { &mp_type_module }, - .globals = (mp_obj_dict_t *)&hello_world_module_globals, -}; - -// Register the module with MicroPython -MP_REGISTER_MODULE(MP_QSTR_hello_world, hello_world_module); From a0a9d22c637540ba201b0dfcb525f922cc301ce1 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 11:26:20 +0200 Subject: [PATCH 20/44] update secp256k1-embedded-ecdh --- secp256k1-embedded-ecdh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/secp256k1-embedded-ecdh b/secp256k1-embedded-ecdh index e357950c..3d5149dd 160000 --- a/secp256k1-embedded-ecdh +++ b/secp256k1-embedded-ecdh @@ -1 +1 @@ -Subproject commit e357950ca8facdf00f4f593811c4ecff6bba97bc +Subproject commit 3d5149ddc4814cd4c70d5190a52035e4d45ee52f From ccf210d8c147b8bf00cd4fb8d1d6c4e79838e48e Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 11:47:13 +0200 Subject: [PATCH 21/44] Rename main.yml to linux.yml --- .github/workflows/{main.yml => linux.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{main.yml => linux.yml} (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/linux.yml similarity index 100% rename from .github/workflows/main.yml rename to .github/workflows/linux.yml From e0d2c023353964ccc114e238cdaf1e6413cb3c6d Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 12:14:18 +0200 Subject: [PATCH 22/44] linux.yml: also build for waveshare 2 inch touch --- .github/workflows/linux.yml | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c7a9ede9..68a29ca2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -65,7 +65,7 @@ jobs: with: name: lvgl_micropy_unix path: lvgl_micropython/build/lvgl_micropy_unix - retention-days: 7 # Adjust as needed; artifacts can be downloaded from the workflow run summary + retention-days: 7 - name: Build LVGL MicroPython esp32 prod fri3d-2024 run: | @@ -76,10 +76,9 @@ jobs: with: name: MicroPythonOS_fri3d-2024_prod path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin - retention-days: 7 # Adjust as needed; artifacts can be downloaded from the workflow run summary + retention-days: 7 - - - name: Build LVGL MicroPython esp32 prod fri3d-2024 + - name: Build LVGL MicroPython esp32 dev fri3d-2024 run: | ./scripts/build_lvgl_micropython.sh esp32 dev fri3d-2024 @@ -88,4 +87,27 @@ jobs: with: name: MicroPythonOS_fri3d-2024_dev path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin - retention-days: 7 # Adjust as needed; artifacts can be downloaded from the workflow run summary + retention-days: 7 + + - name: Build LVGL MicroPython esp32 prod waveshare-esp32-s3-touch-lcd-2 + run: | + ./scripts/build_lvgl_micropython.sh esp32 prod waveshare-esp32-s3-touch-lcd-2 + + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod + path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + retention-days: 7 + + + - name: Build LVGL MicroPython esp32 dev waveshare-esp32-s3-touch-lcd-2 + run: | + ./scripts/build_lvgl_micropython.sh esp32 dev waveshare-esp32-s3-touch-lcd-2 + + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_dev + path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + retention-days: 7 From e79fd5fa0923285ba7469926c3952cb13d09dd6e Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 12:14:53 +0200 Subject: [PATCH 23/44] macos.yml: also build for ESP32 --- .github/workflows/macos.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 4efa2770..332faae3 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -33,3 +33,49 @@ jobs: name: lvgl_micropy_macOS path: lvgl_micropython/build/lvgl_micropy_macOS retention-days: 7 + + + - name: Build LVGL MicroPython esp32 prod fri3d-2024 + run: | + ./scripts/build_lvgl_micropython.sh esp32 prod fri3d-2024 + + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_fri3d-2024_prod + path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + retention-days: 7 + + - name: Build LVGL MicroPython esp32 dev fri3d-2024 + run: | + ./scripts/build_lvgl_micropython.sh esp32 dev fri3d-2024 + + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_fri3d-2024_dev + path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + retention-days: 7 + + + - name: Build LVGL MicroPython esp32 prod waveshare-esp32-s3-touch-lcd-2 + run: | + ./scripts/build_lvgl_micropython.sh esp32 prod waveshare-esp32-s3-touch-lcd-2 + + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod + path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + retention-days: 7 + + - name: Build LVGL MicroPython esp32 dev waveshare-esp32-s3-touch-lcd-2 + run: | + ./scripts/build_lvgl_micropython.sh esp32 dev waveshare-esp32-s3-touch-lcd-2 + + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_dev + path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + retention-days: 7 From e56f7f3d220f29d55028edbec230de989439bf9b Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 19:19:25 +0200 Subject: [PATCH 24/44] Remove unused hello_world.c --- c_mpos/micropython.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/c_mpos/micropython.cmake b/c_mpos/micropython.cmake index 1b3a181a..e2c80627 100644 --- a/c_mpos/micropython.cmake +++ b/c_mpos/micropython.cmake @@ -7,7 +7,6 @@ add_library(usermod_c_mpos INTERFACE) set(MPOS_C_INCLUDES) set(MPOS_C_SOURCES - ${CMAKE_CURRENT_LIST_DIR}/src/hello_world.c ${CMAKE_CURRENT_LIST_DIR}/src/quirc_decode.c ${CMAKE_CURRENT_LIST_DIR}/quirc/lib/identify.c ${CMAKE_CURRENT_LIST_DIR}/quirc/lib/version_db.c From 59d992436d67eb00f49eaec0ab5aeb8352368ee5 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 22:04:06 +0200 Subject: [PATCH 25/44] update lvgl_micropython --- lvgl_micropython | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lvgl_micropython b/lvgl_micropython index bcfd8a96..58e0cc08 160000 --- a/lvgl_micropython +++ b/lvgl_micropython @@ -1 +1 @@ -Subproject commit bcfd8a96c744b2b1e595aa1ab8d9c1995c158c64 +Subproject commit 58e0cc08f235f7ac47951101b135b76bedcbc40e From ea5e4d8b5bf4760649ac0e1bfb24d2820e4e1582 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 22:06:12 +0200 Subject: [PATCH 26/44] update lvgl_micropython --- lvgl_micropython | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lvgl_micropython b/lvgl_micropython index 58e0cc08..ab8b4656 160000 --- a/lvgl_micropython +++ b/lvgl_micropython @@ -1 +1 @@ -Subproject commit 58e0cc08f235f7ac47951101b135b76bedcbc40e +Subproject commit ab8b4656598a7982cc3ff03fd7c18cd4e5b03758 From 1a9f5b3f96aafedd1e8c5443234ed7e86a9094a0 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 22:08:15 +0200 Subject: [PATCH 27/44] change github workflow name --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 68a29ca2..c273c121 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -1,4 +1,4 @@ -name: Build LVGL MicroPython on Push to add-submodules +name: Build LVGL MicroPython on Linux on: push: From 9e4c2e26e5d7d7773d393dee94a8302f4d85b661 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 22:32:32 +0200 Subject: [PATCH 28/44] update lvgl_micropython --- lvgl_micropython | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lvgl_micropython b/lvgl_micropython index ab8b4656..bc5232d8 160000 --- a/lvgl_micropython +++ b/lvgl_micropython @@ -1 +1 @@ -Subproject commit ab8b4656598a7982cc3ff03fd7c18cd4e5b03758 +Subproject commit bc5232d86c66cf2f9d097d4cee3c153e88cfe43a From b451992d5edfab2c3e2d98b75625c30c17b8eabb Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 23:00:46 +0200 Subject: [PATCH 29/44] update lvgl_micropython --- lvgl_micropython | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lvgl_micropython b/lvgl_micropython index bc5232d8..66128c7e 160000 --- a/lvgl_micropython +++ b/lvgl_micropython @@ -1 +1 @@ -Subproject commit bc5232d86c66cf2f9d097d4cee3c153e88cfe43a +Subproject commit 66128c7ef53b8c4123b982827f2609850e75c8bb From 25147929c8b01dd4c5f7a7f6c7f108d9f9c9daf3 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 23:09:18 +0200 Subject: [PATCH 30/44] Fix freezeFS location --- manifest.py | 2 +- manifest_fri3d-2024.py | 2 +- manifest_unix.py | 2 +- scripts/freezefs_mount_builtin.sh | 7 +++++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/manifest.py b/manifest.py index 3c548e4b..fd5ad1ba 100644 --- a/manifest.py +++ b/manifest.py @@ -1,4 +1,4 @@ freeze('internal_filesystem/', 'boot.py') # Hardware initialization freeze('internal_filesystem/', 'main.py') # User Interface initialization freeze('internal_filesystem/lib', '') # Additional libraries -freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps +freeze('freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps diff --git a/manifest_fri3d-2024.py b/manifest_fri3d-2024.py index b8c72e45..60fc0fbc 100644 --- a/manifest_fri3d-2024.py +++ b/manifest_fri3d-2024.py @@ -1,4 +1,4 @@ freeze('/tmp/', 'boot.py') # Hardware initialization - this file is copied from boot_fri3d-2024.py to /tmp by the build script to have it named boot.py freeze('internal_filesystem/', 'main.py') # User Interface initialization freeze('internal_filesystem/lib', '') # Additional libraries -freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps +freeze('freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps diff --git a/manifest_unix.py b/manifest_unix.py index c2a9945e..3048ce24 100644 --- a/manifest_unix.py +++ b/manifest_unix.py @@ -1,4 +1,4 @@ freeze('internal_filesystem/', 'boot_unix.py') # Hardware initialization freeze('internal_filesystem/', 'main.py') # User Interface initialization freeze('internal_filesystem/lib', '') # Additional libraries -freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps +freeze('freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps diff --git a/scripts/freezefs_mount_builtin.sh b/scripts/freezefs_mount_builtin.sh index 10253d77..d4677a1d 100755 --- a/scripts/freezefs_mount_builtin.sh +++ b/scripts/freezefs_mount_builtin.sh @@ -1,5 +1,8 @@ -builtindir=$(readlink -f "internal_filesystem/builtin") +mydir=$(readlink -f "$0") +mydir=$(dirname "$mydir") # scripts dir -pushd ../freezeFS/ +builtindir=$(readlink -f "$mydir"/../internal_filesystem/builtin) + +pushd "$mydir"/../freezeFS/ python3 -m freezefs --target /builtin --on-import mount "$builtindir" freezefs_mount_builtin.py popd From f19387b67fea18113823ed9871ca8eb7bf957af5 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 25 Oct 2025 23:14:51 +0200 Subject: [PATCH 31/44] Fix symlinks to Quasi apps --- internal_filesystem/apps/com.quasikili.quasicalculator | 2 +- internal_filesystem/apps/com.quasikili.quasinametag | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 120000 internal_filesystem/apps/com.quasikili.quasinametag diff --git a/internal_filesystem/apps/com.quasikili.quasicalculator b/internal_filesystem/apps/com.quasikili.quasicalculator index 22e9cc13..f41f6e2f 120000 --- a/internal_filesystem/apps/com.quasikili.quasicalculator +++ b/internal_filesystem/apps/com.quasikili.quasicalculator @@ -1 +1 @@ -../../../MPOS-Kilculator/ \ No newline at end of file +../../../MPOS-QuasiCalculator/ \ No newline at end of file diff --git a/internal_filesystem/apps/com.quasikili.quasinametag b/internal_filesystem/apps/com.quasikili.quasinametag new file mode 120000 index 00000000..ffa883b2 --- /dev/null +++ b/internal_filesystem/apps/com.quasikili.quasinametag @@ -0,0 +1 @@ +../../../MPOS-QuasiNametag/ \ No newline at end of file From b23677a7287fb13c67f639b4d636684459594e6f Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 06:27:57 +0100 Subject: [PATCH 32/44] Move manifests to manifests/ folder, rename build script --- manifest.py => manifests/manifest.py | 0 manifest_fri3d-2024.py => manifests/manifest_fri3d-2024.py | 0 manifest_unix.py => manifests/manifest_unix.py | 0 scripts/{build_lvgl_micropython.sh => build_mpos.sh} | 7 ++++--- 4 files changed, 4 insertions(+), 3 deletions(-) rename manifest.py => manifests/manifest.py (100%) rename manifest_fri3d-2024.py => manifests/manifest_fri3d-2024.py (100%) rename manifest_unix.py => manifests/manifest_unix.py (100%) rename scripts/{build_lvgl_micropython.sh => build_mpos.sh} (95%) diff --git a/manifest.py b/manifests/manifest.py similarity index 100% rename from manifest.py rename to manifests/manifest.py diff --git a/manifest_fri3d-2024.py b/manifests/manifest_fri3d-2024.py similarity index 100% rename from manifest_fri3d-2024.py rename to manifests/manifest_fri3d-2024.py diff --git a/manifest_unix.py b/manifests/manifest_unix.py similarity index 100% rename from manifest_unix.py rename to manifests/manifest_unix.py diff --git a/scripts/build_lvgl_micropython.sh b/scripts/build_mpos.sh similarity index 95% rename from scripts/build_lvgl_micropython.sh rename to scripts/build_mpos.sh index d4063a3a..488fcefa 100755 --- a/scripts/build_lvgl_micropython.sh +++ b/scripts/build_mpos.sh @@ -75,6 +75,8 @@ if [ "$target" == "esp32" ]; then else manifest="manifest.py" fi + manifest=$(readlink -f "$codebasedir"/manifests/"$manifest") + frozenmanifest="FROZEN_MANIFEST=$manifest" else echo "Note that you can also prevent the builtin filesystem from being mounted by umounting it and creating a builtin/ folder." fi @@ -91,19 +93,18 @@ if [ "$target" == "esp32" ]; then # CONFIG_FREERTOS_USE_TRACE_FACILITY=y # CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y - [ ! -z "$manifest" ] && frozenmanifest="FROZEN_MANIFEST="$(readlink -f "$manifest") pushd "$codebasedir"/lvgl_micropython/ python3 make.py --ota --partition-size=4194304 --flash-size=16 esp32 BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT DISPLAY=st7789 INDEV=cst816s USER_C_MODULE="$codebasedir"/micropython-camera-API/src/micropython.cmake USER_C_MODULE="$codebasedir"/secp256k1-embedded-ecdh/micropython.cmake USER_C_MODULE="$codebasedir"/c_mpos/micropython.cmake CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$frozenmanifest" popd elif [ "$target" == "unix" -o "$target" == "macOS" ]; then if [ "$buildtype" == "prod" ]; then - manifest="manifest_unix.py" + manifest=$(readlink -f "$codebasedir"/manifests/manifest_unix.py) + frozenmanifest="FROZEN_MANIFEST=$manifest" fi # build for desktop #python3 make.py "$target" DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$manifest" # LV_CFLAGS are passed to USER_C_MODULES # STRIP= makes it so that debug symbols are kept - [ ! -z "$manifest" ] && frozenmanifest="FROZEN_MANIFEST="$(readlink -f "$manifest") pushd "$codebasedir"/lvgl_micropython/ # USER_C_MODULE doesn't seem to work properly so there are symlinks in lvgl_micropython/extmod/ python3 make.py "$target" LV_CFLAGS="-g -O0 -ggdb -ljpeg" STRIP= DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$manifest" From 586ef9989e513c5931e6aac38dbed79a69cf4ce5 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 06:32:41 +0100 Subject: [PATCH 33/44] update lvgl_micropython --- lvgl_micropython | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lvgl_micropython b/lvgl_micropython index 66128c7e..24a1c2de 160000 --- a/lvgl_micropython +++ b/lvgl_micropython @@ -1 +1 @@ -Subproject commit 66128c7ef53b8c4123b982827f2609850e75c8bb +Subproject commit 24a1c2de2e51387ce92b80dc2e890ef8368fda80 From dc269a6cdd0a6abead9e46a897ed69a1f177753e Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 06:43:11 +0100 Subject: [PATCH 34/44] fix script name --- .github/workflows/linux.yml | 10 +++++----- .github/workflows/macos.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c273c121..bfcd44de 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -58,7 +58,7 @@ jobs: - name: Build LVGL MicroPython for unix dev run: | - ./scripts/build_lvgl_micropython.sh unix dev + ./scripts/build_mpos.sh unix dev - name: Upload built binary as artifact uses: actions/upload-artifact@v4 @@ -69,7 +69,7 @@ jobs: - name: Build LVGL MicroPython esp32 prod fri3d-2024 run: | - ./scripts/build_lvgl_micropython.sh esp32 prod fri3d-2024 + ./scripts/build_mpos.sh esp32 prod fri3d-2024 - name: Upload built binary as artifact uses: actions/upload-artifact@v4 @@ -80,7 +80,7 @@ jobs: - name: Build LVGL MicroPython esp32 dev fri3d-2024 run: | - ./scripts/build_lvgl_micropython.sh esp32 dev fri3d-2024 + ./scripts/build_mpos.sh esp32 dev fri3d-2024 - name: Upload built binary as artifact uses: actions/upload-artifact@v4 @@ -91,7 +91,7 @@ jobs: - name: Build LVGL MicroPython esp32 prod waveshare-esp32-s3-touch-lcd-2 run: | - ./scripts/build_lvgl_micropython.sh esp32 prod waveshare-esp32-s3-touch-lcd-2 + ./scripts/build_mpos.sh esp32 prod waveshare-esp32-s3-touch-lcd-2 - name: Upload built binary as artifact uses: actions/upload-artifact@v4 @@ -103,7 +103,7 @@ jobs: - name: Build LVGL MicroPython esp32 dev waveshare-esp32-s3-touch-lcd-2 run: | - ./scripts/build_lvgl_micropython.sh esp32 dev waveshare-esp32-s3-touch-lcd-2 + ./scripts/build_mpos.sh esp32 dev waveshare-esp32-s3-touch-lcd-2 - name: Upload built binary as artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 332faae3..8c8e8bdd 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -25,7 +25,7 @@ jobs: - name: Build LVGL MicroPython for unix dev run: | - ./scripts/build_lvgl_micropython.sh macOS dev + ./scripts/build_mpos.sh macOS dev - name: Upload built binary as artifact uses: actions/upload-artifact@v4 @@ -37,7 +37,7 @@ jobs: - name: Build LVGL MicroPython esp32 prod fri3d-2024 run: | - ./scripts/build_lvgl_micropython.sh esp32 prod fri3d-2024 + ./scripts/build_mpos.sh esp32 prod fri3d-2024 - name: Upload built binary as artifact uses: actions/upload-artifact@v4 @@ -48,7 +48,7 @@ jobs: - name: Build LVGL MicroPython esp32 dev fri3d-2024 run: | - ./scripts/build_lvgl_micropython.sh esp32 dev fri3d-2024 + ./scripts/build_mpos.sh esp32 dev fri3d-2024 - name: Upload built binary as artifact uses: actions/upload-artifact@v4 @@ -60,7 +60,7 @@ jobs: - name: Build LVGL MicroPython esp32 prod waveshare-esp32-s3-touch-lcd-2 run: | - ./scripts/build_lvgl_micropython.sh esp32 prod waveshare-esp32-s3-touch-lcd-2 + ./scripts/build_mpos.sh esp32 prod waveshare-esp32-s3-touch-lcd-2 - name: Upload built binary as artifact uses: actions/upload-artifact@v4 @@ -71,7 +71,7 @@ jobs: - name: Build LVGL MicroPython esp32 dev waveshare-esp32-s3-touch-lcd-2 run: | - ./scripts/build_lvgl_micropython.sh esp32 dev waveshare-esp32-s3-touch-lcd-2 + ./scripts/build_mpos.sh esp32 dev waveshare-esp32-s3-touch-lcd-2 - name: Upload built binary as artifact uses: actions/upload-artifact@v4 From 4142fa573c2e4ff5bc47a92336f87dc7f80abffb Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 07:06:31 +0100 Subject: [PATCH 35/44] Also store OTA update files as artifacts --- .github/workflows/linux.yml | 13 +++++++++++++ .github/workflows/macos.yml | 14 ++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index bfcd44de..53b5ed7b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -78,6 +78,13 @@ jobs: path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin retention-days: 7 + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_fri3d-2024_prod.ota + path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + retention-days: 7 + - name: Build LVGL MicroPython esp32 dev fri3d-2024 run: | ./scripts/build_mpos.sh esp32 dev fri3d-2024 @@ -100,6 +107,12 @@ jobs: path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin retention-days: 7 + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod.ota + path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + retention-days: 7 - name: Build LVGL MicroPython esp32 dev waveshare-esp32-s3-touch-lcd-2 run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 8c8e8bdd..2d212cff 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -46,6 +46,13 @@ jobs: path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin retention-days: 7 + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_fri3d-2024_prod.ota + path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + retention-days: 7 + - name: Build LVGL MicroPython esp32 dev fri3d-2024 run: | ./scripts/build_mpos.sh esp32 dev fri3d-2024 @@ -69,6 +76,13 @@ jobs: path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin retention-days: 7 + - name: Upload built binary as artifact + uses: actions/upload-artifact@v4 + with: + name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod.ota + path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + retention-days: 7 + - name: Build LVGL MicroPython esp32 dev waveshare-esp32-s3-touch-lcd-2 run: | ./scripts/build_mpos.sh esp32 dev waveshare-esp32-s3-touch-lcd-2 From 3c5e7e99320e0161ebd6c8a554b9b05bf23038b3 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 08:02:50 +0100 Subject: [PATCH 36/44] Add workaround to enable lvgl_micropython's manifest --- scripts/build_mpos.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/build_mpos.sh b/scripts/build_mpos.sh index 488fcefa..dfd2e31f 100755 --- a/scripts/build_mpos.sh +++ b/scripts/build_mpos.sh @@ -42,6 +42,16 @@ else echo "No need to add esp32-camera to $idfile" fi +echo "Check need to add lvgl_micropython manifest to micropython-camera-API's manifest..." +camani="$codebasedir"/micropython-camera-API/src/manifest.py +lvglmani="$codebasedir"/lvgl_micropython/build/manifest.py +if ! grep "lvgl_micropython/build/manifest.py" "$idfile"; then + echo "Adding include(\"$lvglmani\") to $camani" + echo "include(\"$lvglmani\") # workaround to prevent micropython-camera-API from overriding the lvgl_micropython manifest..." >> "$camani" +else + echo "No need to add include(\"$lvglmani\") to $camani" +fi + echo "Check need to add asyncio..." manifile="$codebasedir"/lvgl_micropython/lib/micropython/ports/unix/variants/manifest.py if ! grep asyncio "$manifile"; then From 9bbbf6df7a8c31ac2cb41712c8c433a72f480a35 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 08:05:28 +0100 Subject: [PATCH 37/44] Improve workaround for lvgl_micropython manifest --- scripts/build_mpos.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/build_mpos.sh b/scripts/build_mpos.sh index dfd2e31f..26fdfb76 100755 --- a/scripts/build_mpos.sh +++ b/scripts/build_mpos.sh @@ -44,12 +44,13 @@ fi echo "Check need to add lvgl_micropython manifest to micropython-camera-API's manifest..." camani="$codebasedir"/micropython-camera-API/src/manifest.py -lvglmani="$codebasedir"/lvgl_micropython/build/manifest.py -if ! grep "lvgl_micropython/build/manifest.py" "$idfile"; then - echo "Adding include(\"$lvglmani\") to $camani" - echo "include(\"$lvglmani\") # workaround to prevent micropython-camera-API from overriding the lvgl_micropython manifest..." >> "$camani" +rellvglmani=lvgl_micropython/build/manifest.py +if ! grep "$rellvglmani" "$idfile"; then + abslvglmani="$codebasedir"/"$rellvglmani" + echo "Adding include(\"$abslvglmani\") to $camani" + echo "include(\"$abslvglmani\") # workaround to prevent micropython-camera-API from overriding the lvgl_micropython manifest..." >> "$camani" else - echo "No need to add include(\"$lvglmani\") to $camani" + echo "No need to add include(\"$abslvglmani\") to $camani" fi echo "Check need to add asyncio..." From a1ab4a130f3b59eae87c1efe0c119f484c251cb8 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 08:24:50 +0100 Subject: [PATCH 38/44] Add missing newline to camera manifest --- scripts/build_mpos.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/build_mpos.sh b/scripts/build_mpos.sh index 26fdfb76..f31183f5 100755 --- a/scripts/build_mpos.sh +++ b/scripts/build_mpos.sh @@ -38,6 +38,8 @@ if ! grep esp32-camera "$idfile"; then echo "Adding esp32-camera to $idfile" echo " espressif/esp32-camera: git: https://github.com/MicroPythonOS/esp32-camera" >> "$idfile" + echo "Resulting file:" + cat "$idfile" else echo "No need to add esp32-camera to $idfile" fi @@ -48,7 +50,10 @@ rellvglmani=lvgl_micropython/build/manifest.py if ! grep "$rellvglmani" "$idfile"; then abslvglmani="$codebasedir"/"$rellvglmani" echo "Adding include(\"$abslvglmani\") to $camani" + echo >> "$camani" # needs newline because file doesn't have newline at the end echo "include(\"$abslvglmani\") # workaround to prevent micropython-camera-API from overriding the lvgl_micropython manifest..." >> "$camani" + echo "Resulting file:" + cat "$camani" else echo "No need to add include(\"$abslvglmani\") to $camani" fi @@ -58,6 +63,8 @@ manifile="$codebasedir"/lvgl_micropython/lib/micropython/ports/unix/variants/man if ! grep asyncio "$manifile"; then echo "Adding asyncio to $manifile" echo 'include("$(MPY_DIR)/extmod/asyncio") # needed to have asyncio, which is used by aiohttp, which has used by websockets' >> "$manifile" + echo "Resulting file:" + cat "$manifile" else echo "No need to add asyncio to $manifile" fi @@ -68,7 +75,6 @@ ln -sf ../../secp256k1-embedded-ecdh "$codebasedir"/lvgl_micropython/ext_mod/sec echo "Symlinking c_mpos for unix and macOS builds..." ln -sf ../../c_mpos "$codebasedir"/lvgl_micropython/ext_mod/c_mpos - if [ "$buildtype" == "prod" ]; then freezefs="$codebasedir"/scripts/freezefs_mount_builtin.sh echo "It's a $buildtype build, running $freezefs" From 454ad87b2bf7f9284554f36ef16f82d0d222cbb9 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 08:44:28 +0100 Subject: [PATCH 39/44] Fix camera manifest workaround --- scripts/build_mpos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_mpos.sh b/scripts/build_mpos.sh index f31183f5..35f41349 100755 --- a/scripts/build_mpos.sh +++ b/scripts/build_mpos.sh @@ -47,7 +47,7 @@ fi echo "Check need to add lvgl_micropython manifest to micropython-camera-API's manifest..." camani="$codebasedir"/micropython-camera-API/src/manifest.py rellvglmani=lvgl_micropython/build/manifest.py -if ! grep "$rellvglmani" "$idfile"; then +if ! grep "$rellvglmani" "$camani"; then abslvglmani="$codebasedir"/"$rellvglmani" echo "Adding include(\"$abslvglmani\") to $camani" echo >> "$camani" # needs newline because file doesn't have newline at the end From 38a586ffa2f272f7f34d7d4228d779f9ebb032e5 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 09:13:05 +0100 Subject: [PATCH 40/44] Try to fix manifests --- manifests/manifest.py | 8 ++++---- manifests/manifest_fri3d-2024.py | 6 +++--- manifests/manifest_unix.py | 8 ++++---- scripts/build_mpos.sh | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/manifests/manifest.py b/manifests/manifest.py index fd5ad1ba..39f577ee 100644 --- a/manifests/manifest.py +++ b/manifests/manifest.py @@ -1,4 +1,4 @@ -freeze('internal_filesystem/', 'boot.py') # Hardware initialization -freeze('internal_filesystem/', 'main.py') # User Interface initialization -freeze('internal_filesystem/lib', '') # Additional libraries -freeze('freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps +freeze('../internal_filesystem/', 'boot.py') # Hardware initialization +freeze('../internal_filesystem/', 'main.py') # User Interface initialization +freeze('../internal_filesystem/lib', '') # Additional libraries +freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps diff --git a/manifests/manifest_fri3d-2024.py b/manifests/manifest_fri3d-2024.py index 60fc0fbc..6b5c3aa1 100644 --- a/manifests/manifest_fri3d-2024.py +++ b/manifests/manifest_fri3d-2024.py @@ -1,4 +1,4 @@ freeze('/tmp/', 'boot.py') # Hardware initialization - this file is copied from boot_fri3d-2024.py to /tmp by the build script to have it named boot.py -freeze('internal_filesystem/', 'main.py') # User Interface initialization -freeze('internal_filesystem/lib', '') # Additional libraries -freeze('freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps +freeze('../internal_filesystem/', 'main.py') # User Interface initialization +freeze('../internal_filesystem/lib', '') # Additional libraries +freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps diff --git a/manifests/manifest_unix.py b/manifests/manifest_unix.py index 3048ce24..5012e02a 100644 --- a/manifests/manifest_unix.py +++ b/manifests/manifest_unix.py @@ -1,4 +1,4 @@ -freeze('internal_filesystem/', 'boot_unix.py') # Hardware initialization -freeze('internal_filesystem/', 'main.py') # User Interface initialization -freeze('internal_filesystem/lib', '') # Additional libraries -freeze('freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps +freeze('../internal_filesystem/', 'boot_unix.py') # Hardware initialization +freeze('../internal_filesystem/', 'main.py') # User Interface initialization +freeze('../internal_filesystem/lib', '') # Additional libraries +freeze('../freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps diff --git a/scripts/build_mpos.sh b/scripts/build_mpos.sh index 35f41349..953a264b 100755 --- a/scripts/build_mpos.sh +++ b/scripts/build_mpos.sh @@ -47,8 +47,8 @@ fi echo "Check need to add lvgl_micropython manifest to micropython-camera-API's manifest..." camani="$codebasedir"/micropython-camera-API/src/manifest.py rellvglmani=lvgl_micropython/build/manifest.py +abslvglmani="$codebasedir"/"$rellvglmani" if ! grep "$rellvglmani" "$camani"; then - abslvglmani="$codebasedir"/"$rellvglmani" echo "Adding include(\"$abslvglmani\") to $camani" echo >> "$camani" # needs newline because file doesn't have newline at the end echo "include(\"$abslvglmani\") # workaround to prevent micropython-camera-API from overriding the lvgl_micropython manifest..." >> "$camani" From 5953c18bb86aa686b0548512afb0e9bdd432f9b7 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 09:16:42 +0100 Subject: [PATCH 41/44] Add cleanups --- .github/workflows/linux.yml | 17 +++++++++++++++++ .github/workflows/macos.yml | 15 +++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 53b5ed7b..49784d3c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -85,6 +85,11 @@ jobs: path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin retention-days: 7 + - name: Cleanup + run: | + rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + - name: Build LVGL MicroPython esp32 dev fri3d-2024 run: | ./scripts/build_mpos.sh esp32 dev fri3d-2024 @@ -96,6 +101,11 @@ jobs: path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin retention-days: 7 + - name: Cleanup + run: | + rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + - name: Build LVGL MicroPython esp32 prod waveshare-esp32-s3-touch-lcd-2 run: | ./scripts/build_mpos.sh esp32 prod waveshare-esp32-s3-touch-lcd-2 @@ -114,6 +124,11 @@ jobs: path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin retention-days: 7 + - name: Cleanup + run: | + rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + - name: Build LVGL MicroPython esp32 dev waveshare-esp32-s3-touch-lcd-2 run: | ./scripts/build_mpos.sh esp32 dev waveshare-esp32-s3-touch-lcd-2 @@ -124,3 +139,5 @@ jobs: name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_dev path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin retention-days: 7 + + diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 2d212cff..e3723f49 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -53,6 +53,11 @@ jobs: path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin retention-days: 7 + - name: Cleanup + run: | + rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + - name: Build LVGL MicroPython esp32 dev fri3d-2024 run: | ./scripts/build_mpos.sh esp32 dev fri3d-2024 @@ -64,6 +69,11 @@ jobs: path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin retention-days: 7 + - name: Cleanup + run: | + rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + - name: Build LVGL MicroPython esp32 prod waveshare-esp32-s3-touch-lcd-2 run: | @@ -83,6 +93,11 @@ jobs: path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin retention-days: 7 + - name: Cleanup + run: | + rm lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + rm lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + - name: Build LVGL MicroPython esp32 dev waveshare-esp32-s3-touch-lcd-2 run: | ./scripts/build_mpos.sh esp32 dev waveshare-esp32-s3-touch-lcd-2 From a87f6e865b22aa5b186d9c87b2a7a8b604d732f4 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 09:34:06 +0100 Subject: [PATCH 42/44] Don't zip the build files --- .github/workflows/linux.yml | 7 +++++++ .github/workflows/macos.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 49784d3c..d120798d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -65,6 +65,7 @@ jobs: with: name: lvgl_micropy_unix path: lvgl_micropython/build/lvgl_micropy_unix + compression-level: 0 # dont zip it retention-days: 7 - name: Build LVGL MicroPython esp32 prod fri3d-2024 @@ -76,6 +77,7 @@ jobs: with: name: MicroPythonOS_fri3d-2024_prod path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + compression-level: 0 # dont zip it retention-days: 7 - name: Upload built binary as artifact @@ -83,6 +85,7 @@ jobs: with: name: MicroPythonOS_fri3d-2024_prod.ota path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + compression-level: 0 # dont zip it retention-days: 7 - name: Cleanup @@ -99,6 +102,7 @@ jobs: with: name: MicroPythonOS_fri3d-2024_dev path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + compression-level: 0 # dont zip it retention-days: 7 - name: Cleanup @@ -115,6 +119,7 @@ jobs: with: name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + compression-level: 0 # dont zip it retention-days: 7 - name: Upload built binary as artifact @@ -122,6 +127,7 @@ jobs: with: name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod.ota path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + compression-level: 0 # dont zip it retention-days: 7 - name: Cleanup @@ -138,6 +144,7 @@ jobs: with: name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_dev path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + compression-level: 0 # dont zip it retention-days: 7 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index e3723f49..2484b3f7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -32,6 +32,7 @@ jobs: with: name: lvgl_micropy_macOS path: lvgl_micropython/build/lvgl_micropy_macOS + compression-level: 0 # don't zip it retention-days: 7 @@ -44,6 +45,7 @@ jobs: with: name: MicroPythonOS_fri3d-2024_prod path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + compression-level: 0 # don't zip it retention-days: 7 - name: Upload built binary as artifact @@ -51,6 +53,7 @@ jobs: with: name: MicroPythonOS_fri3d-2024_prod.ota path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + compression-level: 0 # don't zip it retention-days: 7 - name: Cleanup @@ -67,6 +70,7 @@ jobs: with: name: MicroPythonOS_fri3d-2024_dev path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + compression-level: 0 # don't zip it retention-days: 7 - name: Cleanup @@ -84,6 +88,7 @@ jobs: with: name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + compression-level: 0 # don't zip it retention-days: 7 - name: Upload built binary as artifact @@ -91,6 +96,7 @@ jobs: with: name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_prod.ota path: lvgl_micropython/lib/micropython/ports/esp32/build-ESP32_GENERIC_S3-SPIRAM_OCT/micropython.bin + compression-level: 0 # don't zip it retention-days: 7 - name: Cleanup @@ -107,4 +113,5 @@ jobs: with: name: MicroPythonOS_waveshare-esp32-s3-touch-lcd-2_dev path: lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin + compression-level: 0 # don't zip it retention-days: 7 From e821b94c0e15e77610cdcf3573df7e1254f0ed3e Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 09:36:46 +0100 Subject: [PATCH 43/44] Remove the old "long press on button" script This didn't work properly, and the user should be able to go to the settings app to enable bootloader mode. If that doesn't work, the hardware buttons are a foolproof method. --- internal_filesystem/builtin/system/button.py | 54 -------------------- internal_filesystem/main.py | 2 - 2 files changed, 56 deletions(-) delete mode 100644 internal_filesystem/builtin/system/button.py diff --git a/internal_filesystem/builtin/system/button.py b/internal_filesystem/builtin/system/button.py deleted file mode 100644 index 8e18f674..00000000 --- a/internal_filesystem/builtin/system/button.py +++ /dev/null @@ -1,54 +0,0 @@ -print("button.py running") - -import lvgl as lv - -from machine import Pin, Timer -import time -import _thread - -from mpos.apps import Activity, ActivityNavigator, Intent -from mpos.bootloader import ResetIntoBootloader - -# Configure IO0 as input with pull-up resistor -button = Pin(0, Pin.IN, Pin.PULL_UP) - -# Variables for long press detection -long_press_duration = 3000 -press_start_time = 0 -is_pressed = False - -# Timer for checking long press -timer = Timer(-1) - -def on_long_press(t): # Callback for when long press duration is reached. - print("button.py: long press detected") - global timer - timer.deinit() # Stop the timer - global is_pressed - if is_pressed and button.value() == 0: # Ensure button is still pressed - #_thread.stack_size(mpos.apps.good_stack_size()) - #_thread.start_new_thread(handle_long_press, ()) - #lv.async_call(lambda l: handle_long_press(), None) - intent = Intent(activity_class=ResetIntoBootloader) - ActivityNavigator.startActivity(intent) - else: - is_pressed = False - -def button_handler(pin): - """Interrupt handler for button press and release.""" - global press_start_time, is_pressed, timer - if button.value() == 0: # Button pressed (LOW due to pull-up) - print("Button IO0 pressed") - press_start_time = time.ticks_ms() - is_pressed = True - # Start timer to check for long press after long_press_duration - timer.init(mode=Timer.ONE_SHOT, period=long_press_duration, callback=on_long_press) - else: # Button released (HIGH) - print("Button IO0 released") - timer.deinit() # Cancel timer if button is released early - is_pressed = False - -# Set up interrupt for both falling (press) and rising (release) edges -button.irq(trigger=Pin.IRQ_FALLING | Pin.IRQ_RISING, handler=button_handler) - -print("button.py finished") diff --git a/internal_filesystem/main.py b/internal_filesystem/main.py index 0fd399cd..b15fb607 100644 --- a/internal_filesystem/main.py +++ b/internal_filesystem/main.py @@ -49,8 +49,6 @@ except Exception as e: # This will throw an exception if there is already a "/builtin" folder present print("main.py: WARNING: could not import/run freezefs_mount_builtin: ", e) -mpos.apps.execute_script("builtin/system/button.py", True) # Install button handler through IRQ - try: import mpos.wifi _thread.stack_size(mpos.apps.good_stack_size()) From 5fde44b6711251a2a481e066acbfbe89b9f16a6d Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 26 Oct 2025 09:40:59 +0100 Subject: [PATCH 44/44] Increment version number --- CHANGELOG.md | 5 +++++ internal_filesystem/lib/mpos/info.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5d7a6d1..5b024323 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +0.3.0 +===== +- Overhaul build system: much simplier (single clone and script run), add MacOS support, build with GitHub Workflow, etc. +- Remove "long press pin 0" for bootloader mode; either use the Settings app or keep it pressed while pressing and releasing the "RESET" button + 0.2.1 ===== - Settings app: fix stray /cat in Europe/Brussels timezone diff --git a/internal_filesystem/lib/mpos/info.py b/internal_filesystem/lib/mpos/info.py index e8716546..e24724ea 100644 --- a/internal_filesystem/lib/mpos/info.py +++ b/internal_filesystem/lib/mpos/info.py @@ -1,4 +1,4 @@ -CURRENT_OS_VERSION = "0.2.1" +CURRENT_OS_VERSION = "0.3.0" # Unique string that defines the hardware, used by OSUpdate and the About app _hardware_id = "missing-hardware-info"