You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Add patches and update build instructions
This commit is contained in:
@@ -42,3 +42,26 @@ Furthermore, these apps are also built-in for convenience:
|
||||
- /builtin/apps: apps that are builtin and necessary for minimal facilities (launcher, wificonf, appstore etc)
|
||||
- /builtin/res/mipmap-mdpi/default_icon_64x64.bin: default icon for apps that don't have one
|
||||
|
||||
# Building
|
||||
|
||||
mkdir ~/sources/
|
||||
cd ~/sources/
|
||||
|
||||
git clone https://github.com/LightningPiggy/PiggyOS.git
|
||||
|
||||
git clone https://github.com/bixb922/freezeFS
|
||||
~/sources/PiggyOS/scripts/build_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
|
||||
|
||||
git clone https://github.com/lvgl-micropython/lvgl_micropython
|
||||
# TODO: apply patches from ~/sources/PiggyOS/patches/
|
||||
|
||||
cp ~/sources/PiggyOS/patches/lv_conf.h lvgl_micropython/lib/
|
||||
|
||||
cd lvgl_micropython/
|
||||
~/sources/PiggyOS/scripts/build_lvgl_micropython.sh
|
||||
|
||||
# Now install it with:
|
||||
~/sources/PiggyOS/scripts/flash_over_usb.sh
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
diff --git a/freezefs/archive.py b/freezefs/archive.py
|
||||
index 843090d..26e2029 100644
|
||||
--- a/freezefs/archive.py
|
||||
+++ b/freezefs/archive.py
|
||||
@@ -87,8 +87,9 @@ def to_python( pc_infolder, pc_outfile,
|
||||
|
||||
# Get files
|
||||
files = []
|
||||
- for path in glob( "**", root_dir=pc_infolder, recursive=True ):
|
||||
- fo = FileObject( pc_infolder, Path( path ), request_compression, level, wbits )
|
||||
+ for path in glob(os.path.join(pc_infolder, "**"), recursive=True):
|
||||
+ rel_path = os.path.relpath(path, pc_infolder)
|
||||
+ fo = FileObject(pc_infolder, Path(rel_path), request_compression, level, wbits)
|
||||
files.append( fo )
|
||||
|
||||
# Generate output
|
||||
@@ -0,0 +1,10 @@
|
||||
diff --git a/ports/esp32/main_esp32s3/idf_component.yml b/ports/esp32/main_esp32s3/idf_component.yml
|
||||
index 05ab2f2..0ce3878 100644
|
||||
--- a/ports/esp32/main_esp32s3/idf_component.yml
|
||||
+++ b/ports/esp32/main_esp32s3/idf_component.yml
|
||||
@@ -4,3 +4,5 @@ dependencies:
|
||||
espressif/esp_tinyusb: "~1.0.0"
|
||||
idf:
|
||||
version: ">=5.0.4"
|
||||
+ espressif/esp32-camera:
|
||||
+ git: https://github.com/cnadler86/esp32-camera.git
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/tools/mpremote/mpremote/main.py b/tools/mpremote/mpremote/main.py
|
||||
index e6e3970..5501fa4 100644
|
||||
--- a/tools/mpremote/mpremote/main.py
|
||||
+++ b/tools/mpremote/mpremote/main.py
|
||||
@@ -477,7 +477,8 @@ class State:
|
||||
self.ensure_connected()
|
||||
soft_reset = self._auto_soft_reset if soft_reset is None else soft_reset
|
||||
if soft_reset or not self.transport.in_raw_repl:
|
||||
- self.transport.enter_raw_repl(soft_reset=soft_reset)
|
||||
+ #self.transport.enter_raw_repl(soft_reset=soft_reset)
|
||||
+ self.transport.enter_raw_repl(soft_reset=False)
|
||||
self._auto_soft_reset = False
|
||||
|
||||
def ensure_friendly_repl(self):
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/tools/mpremote/mpremote/main.py b/tools/mpremote/mpremote/main.py
|
||||
index e6e3970..5501fa4 100644
|
||||
--- a/tools/mpremote/mpremote/main.py
|
||||
+++ b/tools/mpremote/mpremote/main.py
|
||||
@@ -477,7 +477,8 @@ class State:
|
||||
self.ensure_connected()
|
||||
soft_reset = self._auto_soft_reset if soft_reset is None else soft_reset
|
||||
if soft_reset or not self.transport.in_raw_repl:
|
||||
- self.transport.enter_raw_repl(soft_reset=soft_reset)
|
||||
+ #self.transport.enter_raw_repl(soft_reset=soft_reset)
|
||||
+ self.transport.enter_raw_repl(soft_reset=False)
|
||||
self._auto_soft_reset = False
|
||||
|
||||
def ensure_friendly_repl(self):
|
||||
@@ -0,0 +1,6 @@
|
||||
# Build for https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-2:
|
||||
# --ota: support Over-The-Air updates
|
||||
# --partition size: both OTA partitions are 4MB
|
||||
# --flash-size: total flash size is 16MB
|
||||
#
|
||||
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" FROZEN_MANIFEST=manifest.py
|
||||
@@ -0,0 +1,4 @@
|
||||
fwfile="build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin"
|
||||
ls -al "$fwfile"
|
||||
~/.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 --erase-all 0x0 "$fwfile"
|
||||
|
||||
Reference in New Issue
Block a user