Get rid of absolute paths

This closes, or should close #2
This commit is contained in:
Thomas Farstrike
2025-10-09 19:49:53 +02:00
parent c7e867727e
commit d0ccac8033
6 changed files with 20 additions and 10 deletions
+14 -5
View File
@@ -1,3 +1,7 @@
#!/bin/bash
mydir=$(readlink -f "$0")
mydir=$(dirname "$mydir")
target="$1"
buildtype="$2"
@@ -20,15 +24,16 @@ if [ "$buildtype" == "prod" ]; then
./scripts/freezefs_mount_builtin.sh
fi
manifest=""
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="FROZEN_MANIFEST=/home/user/projects/MicroPythonOS/MicroPythonOS/manifest_fri3d-2024.py"
manifest="manifest_fri3d-2024.py"
else
manifest="FROZEN_MANIFEST=/home/user/projects/MicroPythonOS/MicroPythonOS/manifest.py"
manifest="manifest.py"
fi
else
echo "Note that you can also prevent the builtin filesystem from being mounted by umounting it and creating a builtin/ folder."
@@ -46,17 +51,21 @@ 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")
twoup=$(readlink -f "$mydir"/../..) # build process needs absolute paths
oneup=$(readlink -f "$mydir"/..) # build process needs absolute paths
pushd ~/projects/MicroPythonOS/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=/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"
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"
popd
elif [ "$target" == "unix" -o "$target" == "macos" ]; then
if [ "$buildtype" == "prod" ]; then
manifest="FROZEN_MANIFEST=/home/user/projects/MicroPythonOS/MicroPythonOS/manifest_unix.py"
manifest="manifest_unix.py"
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 ~/projects/MicroPythonOS/lvgl_micropython
python3 make.py "$target" LV_CFLAGS="-g -O0 -ggdb -ljpeg" STRIP= DISPLAY=sdl_display INDEV=sdl_pointer INDEV=sdl_keyboard "$manifest"
popd
+1 -1
View File
@@ -1,4 +1,4 @@
output=/home/user/projects/MicroPythonOS/apps/
output=../apps/
outputjson="$output"/app_index.json
output=$(readlink -f "$output")
outputjson=$(readlink -f "$outputjson")
+2 -1
View File
@@ -1,6 +1,7 @@
fwfile="/home/user/projects/MicroPythonOS/lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin"
fwfile="../lvgl_micropython/build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin"
ls -al $fwfile
echo "Add --erase-all if needed"
sleep 5
# This needs python and the esptool
~/.espressif/python_env/idf5.2_py3.9_env/bin/python -m esptool --chip esp32s3 --before default_reset --after hard_reset write_flash --flash_mode dio --flash_size 16MB --flash_freq 80m $1 0x0 $fwfile