From: Nathaniel Wesley Filardo Date: Sun, 11 Nov 2018 10:57:08 +0000 (+0000) Subject: Initial commit of mkspiffs.sh script X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=41bc4cff14ed293f515a9cbaaabdd4efc01221e8;p=acmetensortoys-esp-lua_ctfws Initial commit of mkspiffs.sh script --- diff --git a/mkspiffs.sh b/mkspiffs.sh new file mode 100755 index 0000000..dc3f781 --- /dev/null +++ b/mkspiffs.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +FWDIR=${FWDIR:-/home/nwf/ee/esp/nodemcu-firmware} +FWIMG=${FWIMG:-${FWDIR}/bin/nodemcu_integer_test.bin} +CONFNAME=${CONFNAME:-home} + +FWSZ=$(stat --printf="%s" ${FWIMG}) + +LUACROSS=${FWDIR}/luac.cross ./mklfs.sh + +( + # Init is the only core Lua that does not live in LFS + echo import core/init.lua init.lua + + # Grab our configuration + for i in conf/${CONFNAME}/*; do echo import $i `basename $i`; done + + # And all our Lua files + for i in *.lua; do echo import $i $i; done + + # And the LFS image with the rest of everything + echo import _lfs_build/luac.out luac.out +) | ${FWDIR}/tools/spiffsimg/spiffsimg \ + -f spiffs-${CONFNAME}.img \ + -S 32m -U ${FWSZ} \ + -o /dev/fd/1 -r /dev/fd/0 + +echo