From c2b3490657092bf3364a9cab6e3d9d9a43903409 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike Date: Sun, 15 Jun 2025 10:25:38 +0200 Subject: [PATCH] Move from ~/sources to ~/projects --- .gitignore | 16 -------------- README.md | 3 +-- c_mpos/micropython.cmake | 2 +- manifest.py | 2 +- manifest_unix.py | 2 +- scripts/build_lvgl_micropython.sh | 11 ++++------ scripts/flash_over_usb.sh | 2 +- scripts/freezefs_mount_builtin.sh | 2 +- scripts/install.sh | 36 ++++++++++++++++--------------- 9 files changed, 29 insertions(+), 47 deletions(-) diff --git a/.gitignore b/.gitignore index ae8ad332..67a2e5b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,5 @@ -output/ - -notes.txt - trash/ -appstore_backend/bundled_apps/ - -icons/ - -meeting_minutes/ - -notes/ - -apps_disabled/ - *.sh conf.json* @@ -23,5 +9,3 @@ internal_filesystem/SDLPointer_2 # config files etc: internal_filesystem/data -# private info -draft_code/nostr_publish.py diff --git a/README.md b/README.md index 429f7147..e8476466 100644 --- a/README.md +++ b/README.md @@ -68,10 +68,9 @@ cd ~/MicroPythonOS git clone https://github.com/MicroPythonOS/MicroPythonOS.git git clone https://github.com/MicroPythonOS/freezeFS -~/sources/MicroPythonOS/scripts/freezefs_mount_builtin.sh git clone https://github.com/cnadler86/micropython-camera-API -echo 'include("~/sources/lvgl_micropython/build/manifest.py")' >> micropython-camera-API/src/manifest.py +echo 'include("~/MicroPythonOS/lvgl_micropython/build/manifest.py")' >> micropython-camera-API/src/manifest.py git clone https://github.com/MicroPythonOS/lvgl_micropython diff --git a/c_mpos/micropython.cmake b/c_mpos/micropython.cmake index b6e10a1f..d95eab72 100644 --- a/c_mpos/micropython.cmake +++ b/c_mpos/micropython.cmake @@ -1,5 +1,5 @@ # This must be passed as: -# USER_C_MODULE=/home/user/sources/MicroPythonOS/c_mpos/micropython.cmake +# USER_C_MODULE=/path/to/c_mpos/micropython.cmake # ...to make.py when building for esp32 to ensure it gets compiled. add_library(usermod_c_mpos INTERFACE) diff --git a/manifest.py b/manifest.py index 549bfcea..5e20ce6e 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('/home/user/sources/freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps +freeze('/home/user/projects/MicroPythonOS/freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps diff --git a/manifest_unix.py b/manifest_unix.py index 04bee4dc..74bf1a08 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('/home/user/sources/freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps +freeze('/home/user/projects/MicroPythonOS/freezeFS/', 'freezefs_mount_builtin.py') # Built-in apps diff --git a/scripts/build_lvgl_micropython.sh b/scripts/build_lvgl_micropython.sh index 962afad6..9fb1b58e 100755 --- a/scripts/build_lvgl_micropython.sh +++ b/scripts/build_lvgl_micropython.sh @@ -17,13 +17,13 @@ if [ "$buildtype" == "prod" ]; then ./scripts/freezefs_mount_builtin.sh fi -pushd ~/sources/lvgl_micropython +pushd ~/projects/MicroPythonOS/lvgl_micropython manifest="" if [ "$target" == "esp32" ]; then if [ "$buildtype" == "prod" ]; then - manifest="FROZEN_MANIFEST=/home/user/sources/MicroPythonOS/manifest.py" + manifest="FROZEN_MANIFEST=/home/user/projects/MicroPythonOS/MicroPythonOS/manifest.py" fi # Build for https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-2. # See https://github.com/lvgl-micropython/lvgl_micropython @@ -38,13 +38,10 @@ if [ "$target" == "esp32" ]; then # CONFIG_FREERTOS_USE_TRACE_FACILITY=y # CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y # CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y - #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=/home/user/sources/micropython-camera-API/src/micropython.cmake USER_C_MODULE=/home/user/projects/MicroPythonOS/secp256k1-embedded-ecdh/micropython.cmake USER_C_MODULE=/home/user/sources/MicroPythonOS/c_mpos/micropython.cmake CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$manifest" - 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=/home/user/sources/micropython-camera-API/src/micropython.cmake USER_C_MODULE=/home/user/projects/MicroPythonOS/secp256k1-embedded-ecdh/micropython.cmake USER_C_MODULE=/home/user/sources/MicroPythonOS/c_mpos/micropython.cmake CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$manifest" - # ffmpeg failed because time_t conflict time.h /home/user/sources/lvgl_micropython/lib/esp-idf/components/mbedtls/mbedtls/include/mbedtls/platform_time.h - #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=/home/user/sources/micropython-camera-API/src/micropython.cmake USER_C_MODULE=/home/user/projects/MicroPythonOS/secp256k1-embedded-ecdh/micropython.cmake USER_C_MODULE=/home/user/sources/MicroPythonOS/c_mpos/micropython.cmake USER_C_MODULE=/home/user/sources/MicroPythonOS/c_mpos/ffmpeg.cmake CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$manifest" + 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=/home/user/projects/MicroPythonOS/micropython-camera-API/src/micropython.cmake USER_C_MODULE=/home/user/projects/MicroPythonOS/secp256k1-embedded-ecdh/micropython.cmake USER_C_MODULE=/home/user/projects/MicroPythonOS/MicroPythonOS/c_mpos/micropython.cmake CONFIG_FREERTOS_USE_TRACE_FACILITY=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID=y CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y "$manifest" elif [ "$target" == "unix" -o "$target" == "macos" ]; then if [ "$buildtype" == "prod" ]; then - manifest="FROZEN_MANIFEST=/home/user/sources/MicroPythonOS/manifest_unix.py" + manifest="FROZEN_MANIFEST=/home/user/projects/MicroPythonOS/manifest_unix.py" fi # build for desktop #python3 make.py "$target" DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$manifest" diff --git a/scripts/flash_over_usb.sh b/scripts/flash_over_usb.sh index e4e96066..557fe18c 100755 --- a/scripts/flash_over_usb.sh +++ b/scripts/flash_over_usb.sh @@ -1,4 +1,4 @@ -fwfile="/home/user/sources/lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin" +fwfile="/home/user/projects/MicroPythonOS/lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin" ls -al $fwfile echo "Add --erase-all if needed" sleep 5 diff --git a/scripts/freezefs_mount_builtin.sh b/scripts/freezefs_mount_builtin.sh index 9fecd82a..79994f0e 100755 --- a/scripts/freezefs_mount_builtin.sh +++ b/scripts/freezefs_mount_builtin.sh @@ -1,3 +1,3 @@ pushd ~/projects/MicroPythonOS/freezeFS -python3 -m freezefs --target /builtin --on-import mount ~/sources/MicroPythonOS/internal_filesystem/builtin freezefs_mount_builtin.py +python3 -m freezefs --target /builtin --on-import mount ~/projects/MicroPythonOS/MicroPythonOS/internal_filesystem/builtin freezefs_mount_builtin.py popd diff --git a/scripts/install.sh b/scripts/install.sh index 681ee8ee..54692850 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -11,6 +11,8 @@ if [ -z "$appname" ]; then sleep 2 fi +mpremote=~/MicroPythonOS/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py + pushd internal_filesystem/ if [ ! -z "$appname" ]; then @@ -26,32 +28,32 @@ if [ ! -z "$appname" ]; then exit 1 fi fi - ~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py mkdir "/apps" - ~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py mkdir "/builtin" - ~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py mkdir "/builtin/apps" - ~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r "$appdir" :/"$target" + $mpremote mkdir "/apps" + $mpremote mkdir "/builtin" + $mpremote mkdir "/builtin/apps" + $mpremote fs cp -r "$appdir" :/"$target" echo "start_app(\"/$appdir\")" - ~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py + $mpremote popd exit fi -~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp boot.py :/boot.py -~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp main.py :/main.py +$mpremote fs cp boot.py :/boot.py +$mpremote fs cp main.py :/main.py -#~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp main.py :/system/button.py -#~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp autorun.py :/autorun.py -#~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r system :/ +#$mpremote fs cp main.py :/system/button.py +#$mpremote fs cp autorun.py :/autorun.py +#$mpremote fs cp -r system :/ -~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r apps :/ -~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r builtin :/ -~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r lib :/ -~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r resources :/ +$mpremote fs cp -r apps :/ +$mpremote fs cp -r builtin :/ +$mpremote fs cp -r lib :/ +$mpremote fs cp -r resources :/ -#~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r data :/ -#~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r data/images :/data/ +#$mpremote fs cp -r data :/ +#$mpremote fs cp -r data/images :/data/ popd -~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py reset +$mpremote reset