Skip to content

Commit 2e01df8

Browse files
Add patches and update build instructions
1 parent 4ade44b commit 2e01df8

8 files changed

+87
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,26 @@ Furthermore, these apps are also built-in for convenience:
4242
- /builtin/apps: apps that are builtin and necessary for minimal facilities (launcher, wificonf, appstore etc)
4343
- /builtin/res/mipmap-mdpi/default_icon_64x64.bin: default icon for apps that don't have one
4444

45+
# Building
46+
47+
mkdir ~/sources/
48+
cd ~/sources/
49+
50+
git clone https://github.com/LightningPiggy/PiggyOS.git
51+
52+
git clone https://github.com/bixb922/freezeFS
53+
~/sources/PiggyOS/scripts/build_freezefs_mount_builtin.sh
54+
55+
git clone https://github.com/cnadler86/micropython-camera-API
56+
echo 'include("~/sources/lvgl_micropython/build/manifest.py")' >> micropython-camera-API/src/manifest.py
57+
58+
git clone https://github.com/lvgl-micropython/lvgl_micropython
59+
# TODO: apply patches from ~/sources/PiggyOS/patches/
60+
61+
cp ~/sources/PiggyOS/patches/lv_conf.h lvgl_micropython/lib/
62+
63+
cd lvgl_micropython/
64+
~/sources/PiggyOS/scripts/build_lvgl_micropython.sh
65+
66+
# Now install it with:
67+
~/sources/PiggyOS/scripts/flash_over_usb.sh
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/freezefs/archive.py b/freezefs/archive.py
2+
index 843090d..26e2029 100644
3+
--- a/freezefs/archive.py
4+
+++ b/freezefs/archive.py
5+
@@ -87,8 +87,9 @@ def to_python( pc_infolder, pc_outfile,
6+
7+
# Get files
8+
files = []
9+
- for path in glob( "**", root_dir=pc_infolder, recursive=True ):
10+
- fo = FileObject( pc_infolder, Path( path ), request_compression, level, wbits )
11+
+ for path in glob(os.path.join(pc_infolder, "**"), recursive=True):
12+
+ rel_path = os.path.relpath(path, pc_infolder)
13+
+ fo = FileObject(pc_infolder, Path(rel_path), request_compression, level, wbits)
14+
files.append( fo )
15+
16+
# Generate output
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/ports/esp32/main_esp32s3/idf_component.yml b/ports/esp32/main_esp32s3/idf_component.yml
2+
index 05ab2f2..0ce3878 100644
3+
--- a/ports/esp32/main_esp32s3/idf_component.yml
4+
+++ b/ports/esp32/main_esp32s3/idf_component.yml
5+
@@ -4,3 +4,5 @@ dependencies:
6+
espressif/esp_tinyusb: "~1.0.0"
7+
idf:
8+
version: ">=5.0.4"
9+
+ espressif/esp32-camera:
10+
+ git: https://github.com/cnadler86/esp32-camera.git
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/tools/mpremote/mpremote/main.py b/tools/mpremote/mpremote/main.py
2+
index e6e3970..5501fa4 100644
3+
--- a/tools/mpremote/mpremote/main.py
4+
+++ b/tools/mpremote/mpremote/main.py
5+
@@ -477,7 +477,8 @@ class State:
6+
self.ensure_connected()
7+
soft_reset = self._auto_soft_reset if soft_reset is None else soft_reset
8+
if soft_reset or not self.transport.in_raw_repl:
9+
- self.transport.enter_raw_repl(soft_reset=soft_reset)
10+
+ #self.transport.enter_raw_repl(soft_reset=soft_reset)
11+
+ self.transport.enter_raw_repl(soft_reset=False)
12+
self._auto_soft_reset = False
13+
14+
def ensure_friendly_repl(self):
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/tools/mpremote/mpremote/main.py b/tools/mpremote/mpremote/main.py
2+
index e6e3970..5501fa4 100644
3+
--- a/tools/mpremote/mpremote/main.py
4+
+++ b/tools/mpremote/mpremote/main.py
5+
@@ -477,7 +477,8 @@ class State:
6+
self.ensure_connected()
7+
soft_reset = self._auto_soft_reset if soft_reset is None else soft_reset
8+
if soft_reset or not self.transport.in_raw_repl:
9+
- self.transport.enter_raw_repl(soft_reset=soft_reset)
10+
+ #self.transport.enter_raw_repl(soft_reset=soft_reset)
11+
+ self.transport.enter_raw_repl(soft_reset=False)
12+
self._auto_soft_reset = False
13+
14+
def ensure_friendly_repl(self):

scripts/build_lvgl_micropython.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Build for https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-2:
2+
# --ota: support Over-The-Air updates
3+
# --partition size: both OTA partitions are 4MB
4+
# --flash-size: total flash size is 16MB
5+
#
6+
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

scripts/flash_over_usb.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fwfile="build/lvgl_micropy_ESP32_GENERIC_S3-SPIRAM_OCT-16.bin"
2+
ls -al "$fwfile"
3+
~/.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"
4+
File renamed without changes.

0 commit comments

Comments
 (0)