From 54f11e5f7a51aae282ddaeadbf895f8dd54b5fa8 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sat, 22 Nov 2025 10:17:54 +0100 Subject: [PATCH] Remove main.py from manifests This is now part of lib/ --- manifests/manifest.py | 1 - manifests/manifest_unix.py | 1 - scripts/build_mpos.sh | 47 +++++++++++--------------------------- 3 files changed, 13 insertions(+), 36 deletions(-) diff --git a/manifests/manifest.py b/manifests/manifest.py index 39f577ee..3840b9a5 100644 --- a/manifests/manifest.py +++ b/manifests/manifest.py @@ -1,4 +1,3 @@ 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_unix.py b/manifests/manifest_unix.py index 5012e02a..b6fbf992 100644 --- a/manifests/manifest_unix.py +++ b/manifests/manifest_unix.py @@ -1,4 +1,3 @@ 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 65663560..26ed58ae 100755 --- a/scripts/build_mpos.sh +++ b/scripts/build_mpos.sh @@ -8,18 +8,13 @@ target="$1" buildtype="$2" subtarget="$3" -if [ -z "$target" -o -z "$buildtype" ]; then - echo "Usage: $0 target buildtype [optional subtarget]" - echo "Usage: $0 []" - echo "Example: $0 unix dev" - echo "Example: $0 macOS dev" - echo "Example: $0 esp32 dev fri3d-2024" - echo "Example: $0 esp32 prod fri3d-2024" - echo "Example: $0 esp32 dev waveshare-esp32-s3-touch-lcd-2" - echo "Example: $0 esp32 prod waveshare-esp32-s3-touch-lcd-2" +if [ -z "$target" ]; then + echo "Usage: $0 target" + echo "Usage: $0 " + echo "Example: $0 unix" + echo "Example: $0 macOS" + echo "Example: $0 esp32" echo - echo "A 'dev' build is without any preinstalled files or builtin/ filsystem, so it will just start with a black screen and you'll have to do: ./scripts/install.sh to install the User Interface." - echo "A 'prod' build has the files from manifest*.py frozen in. Don't forget to run: ./scripts/freezefs_mount_builtin.sh !" exit 1 fi @@ -76,28 +71,14 @@ 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" - $freezefs -fi - - +echo "Refreshing freezefs..." +"$codebasedir"/scripts/freezefs_mount_builtin.sh manifest="" if [ "$target" == "esp32" ]; then - if [ "$buildtype" == "prod" ]; then - if [ "$subtarget" == "fri3d-2024" ]; then - cp internal_filesystem/boot_fri3d-2024.py /tmp/boot.py # dirty hack to have it included as boot.py by the manifest - manifest="manifest_fri3d-2024.py" - 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 + manifest=$(readlink -f "$codebasedir"/manifests/manifest.py) + frozenmanifest="FROZEN_MANIFEST=$manifest" + echo "Note that you can also prevent the builtin filesystem from being mounted by umounting it and creating a builtin/ folder." # Build for https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-2. # See https://github.com/lvgl-micropython/lvgl_micropython # --ota: support Over-The-Air updates @@ -115,10 +96,8 @@ if [ "$target" == "esp32" ]; then 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=$(readlink -f "$codebasedir"/manifests/manifest_unix.py) - frozenmanifest="FROZEN_MANIFEST=$manifest" - fi + manifest=$(readlink -f "$codebasedir"/manifests/manifest.py) + frozenmanifest="FROZEN_MANIFEST=$manifest" # 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