Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1743527497, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ {"schema":"libjg2-1", "cid":"a1c9ae23758c0ffd48c91f779e2adbe8", "oid":{ "oid": "98f63c6c8de4a2bf287a37cf12ff34c721b9f359", "alias": []},"blobname": "scripts/esp32.mk", "blob": "#\n# LWS-style images are composed like this\n#\n# [ OTA or Factory standard xpressif image ]\n# [ 32-b LE len ] [ ROMFS ]\n# [ 32-b LE len ] [ Image information JSON ]\n#\n\nSHELL\u003d/bin/bash\n\n# check genromfs is available\nGENROMFS :\u003d $(shell command -v genromfs 2\u003e /dev/null)\n# check xxd is available\nXXD :\u003d $(shell command -v xxd 2\u003e /dev/null)\n\nESPPORT ?\u003d $(CONFIG_ESPTOOLPY_PORT)\n\nLWS_BUILD_PATH\u003d$(PROJECT_PATH)/build\n\njbi\u003d$(LWS_BUILD_PATH)/json-buildinfo\n\nFAC\u003d$(CONFIG_LWS_IS_FACTORY_APPLICATION)\nifeq ($(FAC),)\n\tFAC\u003d0\nendif\nexport FAC\n\n$(LWS_BUILD_PATH)/pack.img: $(APP_BIN)\n\tif [ -z \u0022$(GENROMFS)\u0022 ]; then \u005c\n\t\techo \u0022ERROR: genromfs is unavailable, please install or compile genromfs\u0022 ; \u005c\n\t\texit 1 ; \u005c\n\tfi; \u005c\n\tif [ -z \u0022$(XXD)\u0022 ]; then \u005c\n\t\techo \u0022ERROR: xxd is unavailable, please install or compile xxd (usually provided by vim package)\u0022 ; \u005c\n\t\texit 1 ; \u005c\n\tfi; \u005c\n\tGNUSTAT\u003dstat ;\u005c\n\tif [ `which gstat 2\u003e/dev/null` ] ; then GNUSTAT\u003dgstat ; fi ;\u005c\n\tgenromfs -f $(LWS_BUILD_PATH)/romfs.img -d $(PROJECT_PATH)/romfs-files ; \u005c\n RLEN\u003d$$($$GNUSTAT -c %s $(LWS_BUILD_PATH)/romfs.img) ;\u005c\n LEN\u003d$$($$GNUSTAT -c %s $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin) ;\u005c\n printf \u0022 Original length: 0x%06x (%8d)\u005cn\u0022 $$LEN $$LEN ; \u005c\n printf %02x $$(( $$RLEN % 256 )) | xxd -r -p \u003e\u003e $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin ;\u005c\n printf %02x $$(( ( $$RLEN / 256 ) % 256 )) | xxd -r -p \u003e\u003e $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin ;\u005c\n printf %02x $$(( ( $$RLEN / 65536 ) % 256 )) | xxd -r -p \u003e\u003e $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin ;\u005c\n printf %02x $$(( ( $$RLEN / 16777216 ) % 256 )) | xxd -r -p \u003e\u003e $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin ;\u005c\n cat $(LWS_BUILD_PATH)/romfs.img \u003e\u003e $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin ; \u005c\n LEN\u003d$$($$GNUSTAT -c %s $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin) ;\u005c\n\tUNIXTIME\u003d$$(date +%s | tr -d '\u005cn') ; \u005c\n\techo -n -e \u0022{\u005cr\u005cn \u005c\u0022schema\u005c\u0022: \u005c\u0022lws1\u005c\u0022,\u005cr\u005cn \u005c\u0022model\u005c\u0022: \u005c\u0022$(CONFIG_LWS_MODEL_NAME)\u005c\u0022,\u005cr\u005cn \u005c\u0022builder\u005c\u0022: \u005c\u0022\u0022 \u003e $(jbi) ;\u005c\n\thostname | tr -d '\u005cn' \u003e\u003e $(jbi) ;\u005c\n\techo -n -e \u0022\u005c\u0022,\u005cr\u005cn \u005c\u0022app\u005c\u0022: \u005c\u0022\u0022 \u003e\u003e $(jbi) ;\u005c\n\techo -n $(PROJECT_NAME) \u003e\u003e $(jbi) ;\u005c\n\techo -n -e \u0022\u005c\u0022,\u005cr\u005cn \u005c\u0022user\u005c\u0022: \u005c\u0022\u0022 \u003e\u003e $(jbi) ;\u005c\n\twhoami | tr -d '\u005cn' \u003e\u003e$(jbi) ;\u005c\n\techo -n -e \u0022\u005c\u0022,\u005cr\u005cn \u005c\u0022git\u005c\u0022: \u005c\u0022\u0022 \u003e\u003e $(jbi) ;\u005c\n\tgit describe --dirty --always | tr -d '\u005cn' \u003e\u003e $(jbi) ;\u005c\n\techo -n -e \u0022\u005c\u0022,\u005cr\u005cn \u005c\u0022date\u005c\u0022: \u005c\u0022\u0022 \u003e\u003e $(jbi) ;\u005c\n\tdate | tr -d '\u005cn' \u003e\u003e $(jbi) ;\u005c\n\techo -n -e \u0022\u005c\u0022,\u005cr\u005cn \u005c\u0022unixtime\u005c\u0022: \u005c\u0022\u0022 \u003e\u003e $(jbi) ;\u005c\n\techo -n $$UNIXTIME \u003e\u003e $(jbi) ;\u005c\n\techo -n -e \u0022\u005c\u0022,\u005cr\u005cn \u005c\u0022file\u005c\u0022: \u005c\u0022\u0022$(PROJECT_NAME)-$$UNIXTIME.bin \u003e\u003e $(jbi) ;\u005c\n\techo -n -e \u0022\u005c\u0022,\u005cr\u005cn \u005c\u0022factory\u005c\u0022: \u005c\u0022$(FAC)\u0022 \u003e\u003e $(jbi) ;\u005c\n\techo -n -e \u0022\u005c\u0022\u005cr\u005cn}\u0022 \u003e\u003e $(jbi) ;\u005c\n\tJLEN\u003d$$($$GNUSTAT -c %s $(jbi)) ;\u005c\n\tprintf %02x $$(( $$JLEN % 256 )) | xxd -r -p \u003e\u003e $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin ;\u005c\n\tprintf %02x $$(( ( $$JLEN / 256 ) % 256 )) | xxd -r -p \u003e\u003e $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin ;\u005c\n\tprintf %02x $$(( ( $$JLEN / 65536 ) % 256 )) | xxd -r -p \u003e\u003e $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin ;\u005c\n\tprintf %02x $$(( ( $$JLEN / 16777216 ) % 256 )) | xxd -r -p \u003e\u003e $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin ;\u005c\n\tcat $(jbi) \u003e\u003e $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin ;\u005c\n\tcp $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin $(LWS_BUILD_PATH)/pack.img ;\u005c\n LEN\u003d$$($$GNUSTAT -c %s $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin) ;\u005c\n\tcp $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin $(LWS_BUILD_PATH)/$(PROJECT_NAME)-$$UNIXTIME.bin ;\u005c\n\tprintf \u0022 After ROMFS + Build info: 0x%06x (%8d)\u005cn\u0022 $$LEN $$LEN\n\n.PHONY: manifest\nmanifest:\nifeq ($F,)\n\techo \u0022Usage make F\u003d\u003cfactory app dir\u003e A\u003d\u003capp dir\u003e manifest\u0022\n\texit 1\nendif\nifeq ($A,)\n\techo \u0022Usage make F\u003d\u003cfactory app dir\u003e A\u003d\u003capp dir\u003e manifest\u0022\n\texit 1\nendif\n\techo -n -e \u0022{\u005cr\u005cn\u005c\u0022app\u005c\u0022: \u0022 \u003e build/manifest.json\n\tcat $(A)/build/json-buildinfo \u003e\u003e build/manifest.json\n\techo -n -e \u0022, \u005c\u0022factory\u005c\u0022: \u0022 \u003e\u003e build/manifest.json\n\tcat $(F)/build/json-buildinfo \u003e\u003e build/manifest.json\n\techo -n -e \u0022\u005cr\u005cn}\u005cr\u005cn\u0022 \u003e\u003e build/manifest.json\n\nall: $(LWS_BUILD_PATH)/pack.img\n\nflash: $(LWS_BUILD_PATH)/pack.img\n\nlws_flash_ota: $(LWS_BUILD_PATH)/pack.img\n\t$(IDF_PATH)/components/esptool_py/esptool/esptool.py \u005c\n\t\t--chip esp32 \u005c\n\t\t--port $(ESPPORT) \u005c\n\t\t--baud $(CONFIG_ESPTOOLPY_BAUD) \u005c\n\t\twrite_flash 0x120000 $(LWS_BUILD_PATH)/$(PROJECT_NAME).bin\n\nlws_erase_ota:\n\t$(IDF_PATH)/components/esptool_py/esptool/esptool.py \u005c\n\t --chip esp32 \u005c\n\t --port $(ESPPORT) \u005c\n\t --baud $(CONFIG_ESPTOOLPY_BAUD) \u005c\n\t erase_region 0x120000 0x2e0000\n\n\nexport A\nexport F\n.PHONY: upload\nupload: manifest\nifeq ($F,)\n\techo \u0022Usage make F\u003d\u003cfactory app dir\u003e A\u003d\u003capp dir\u003e manifest\u0022\n\texit 1\nendif\nifeq ($A,)\n\techo \u0022Usage make F\u003d\u003cfactory app dir\u003e A\u003d\u003capp dir\u003e manifest\u0022\n\texit 1\nendif\n\tUPL\u003d$(CONFIG_LWS_OTA_SERVER_UPLOAD_USER)@$(CONFIG_LWS_OTA_SERVER_FQDN):$(CONFIG_LWS_OTA_SERVER_UPLOAD_PATH)/$(CONFIG_LWS_OTA_SERVER_BASE_URL)/$(CONFIG_LWS_MODEL_NAME)/ ;\u005c\n\tAFILE\u003d$(A)/build/$$(cat $$A/build/json-buildinfo | grep -- \u005c\u0022file\u005c\u0022\u005c: |cut -d' ' -f3 |cut -d'\u0022' -f2) ;\u005c\n\techo \u0022 Uploading $$AFILE to \u0022 $$UPL ;\u005c\n\tscp $$AFILE $$UPL ;\u005c\n\tFFILE\u003d$(F)/build/$$(cat $$F/build/json-buildinfo | grep -- \u005c\u0022file\u005c\u0022\u005c: |cut -d' ' -f3 |cut -d'\u0022' -f2) ;\u005c\n\techo \u0022 Uploading $$FFILE\u0022 ;\u005c\n\tscp $$FFILE $$UPL ;\u005c\n\techo \u0022 Uploading manifest\u0022 ;\u005c\n\tscp build/manifest.json $$UPL\n","s":{"c":1743527497,"u": 232}} ],"g": 3217,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 1, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}