generate squashfs during build

This commit is contained in:
Jeff Epler 2022-10-19 10:20:16 -05:00
parent 1cedbbab82
commit 01412c8ced
No known key found for this signature in database
GPG key ID: D5BF15AB975AB4DE
3 changed files with 18 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/fw/*/build
/fw/*/sdkconfig.old
/assets/doom.squashfs

View file

@ -1,4 +1,20 @@
SHELL=/bin/bash
.PHONY: default
default:
default: assets/doom.squashfs
. esp-idf/export.sh && cd fw/s3-boy-doom && idf.py set-target esp32s3 && idf.py build && cd build && esptool.py --chip esp32s3 merge_bin -t 0 --output s3-boy-doom-combined.bin `tail -n +2 flash_args` 0x110000 ../../../assets/doom.squashfs
.PHONY: squash
squash: assets/doom.squashfs
assets/doom.squashfs: assets/doom-root/doom/doom1.wad Makefile
mksquashfs assets/doom-root $@ -noappend \
-all-root -no-exports -no-sparse -no-xattrs -all-time 1 -noI \
-b 32k -comp gzip -Xwindow-size 14 \
.PHONY: flash-squash
ifneq ($(origin PORT),undefined)
P_PORT=-p $(PORT)
else
P_PORT=
endif
flash-squash: assets/doom.squashfs
esptool.py $(P_PORT) write_flash 0x110000 $<

Binary file not shown.