Comments (29)
What does the factory build process say about the ROMFS? Here it says
Original length: 0x0ba470 ( 762992)
After ROMFS + Build info: 0x0e3589 ( 931209)
and if I look in build, I see
-rw-rw-r--. 1 agreen agreen 931209 May 2 18:56 lws-esp32-factory.bin
Did the build proceed OK otherwise on your Mac?
from lws-esp32-factory.
I'm seeing (after a make clean)
Original length: 0x000000 ( 0)
After ROMFS + Build info: 0x02a92d ( 174381)
and
-rw-r--r-- 1 tedwood staff 174381 2 May 12:28 /Users/tedwood/lws-esp32-factory/main/../build/lws-esp32-factory.bin
from lws-esp32-factory.
Mmmm sounds like your build is broke somewhere. So far we know it works well on Fedora or Ubuntu, both Linux. Mac should not be a million miles away.
Can you delete ./build and then cut and paste here the whole build log.
from lws-esp32-factory.
(and if you made any changes to get it this far, please let me know them).
from lws-esp32-factory.
I had to add gstat in place of OSX's stat, and make sure that ranlib called the ESP32 version - at the moment it calls whichever ranlib it finds first in the path. I fixed it by just making sure it looks in the /bin directory of the ESP32 compiler first, but this isn't a particularly robust solution
make all
cc -DCURSES_LOC="<ncurses.h>" -DKBUILD_NO_NLS -Wno-format-security -DLOCALE -c -o mconf.o mconf.c
flex -L -P zconf -o zconf.lex.c zconf.l
zconf.l:255: warning, -s option given but default rule can be matched
bison -t -l -p zconf -o zconf.tab.c zconf.y
sed -E "s/\\x0D$//" zconf.gperf | gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$' -p -t
cc -DCURSES_LOC="<ncurses.h>" -DKBUILD_NO_NLS -Wno-format-security -DLOCALE -c -o zconf.tab.o zconf.tab.c
lxdialog/check-lxdialog.sh -check cc -DCURSES_LOC="<ncurses.h>" -DKBUILD_NO_NLS -Wno-format-security -DLOCALE -lncurses
cc -DCURSES_LOC="<ncurses.h>" -DKBUILD_NO_NLS -Wno-format-security -DLOCALE -c -o lxdialog/checklist.o lxdialog/checklist.c
cc -DCURSES_LOC="<ncurses.h>" -DKBUILD_NO_NLS -Wno-format-security -DLOCALE -c -o lxdialog/util.o lxdialog/util.c
cc -DCURSES_LOC="<ncurses.h>" -DKBUILD_NO_NLS -Wno-format-security -DLOCALE -c -o lxdialog/inputbox.o lxdialog/inputbox.c
cc -DCURSES_LOC="<ncurses.h>" -DKBUILD_NO_NLS -Wno-format-security -DLOCALE -c -o lxdialog/textbox.o lxdialog/textbox.c
cc -DCURSES_LOC="<ncurses.h>" -DKBUILD_NO_NLS -Wno-format-security -DLOCALE -c -o lxdialog/yesno.o lxdialog/yesno.c
cc -DCURSES_LOC="<ncurses.h>" -DKBUILD_NO_NLS -Wno-format-security -DLOCALE -c -o lxdialog/menubox.o lxdialog/menubox.c
cc -o mconf mconf.o zconf.tab.o lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o -lncurses
cc -DCURSES_LOC="<ncurses.h>" -DKBUILD_NO_NLS -Wno-format-security -DLOCALE -c -o conf.o conf.c
cc -o conf conf.o zconf.tab.o -lncurses
GENCONFIG
cp: /Users/tedwood/lws-esp32-factory/main/../build/lws-esp32-factory.bin: No such file or directory
stat: cannot stat '/Users/tedwood/lws-esp32-factory/main/../build/lws-esp32-factory.bin': No such file or directory
Original length: 0x000000 ( 0)
After ROMFS + Build info: 0x02a92d ( 174381)
CC src/bootloader_flash.o
CC src/bootloader_random.o
CC src/efuse.o
CC src/esp_image_format.o
CC src/flash_encrypt.o
CC src/flash_partitions.o
CC src/secure_boot.o
CC src/secure_boot_signatures.o
AR libbootloader_support.a
CC log.o
AR liblog.a
CC spi_flash_rom_patch.o
AR libspi_flash.a
CC micro-ecc/uECC.o
AR libmicro-ecc.a
CC esp32/brownout.o
CC esp32/cpu_util.o
CC esp32/rtc_clk.o
CC esp32/rtc_init.o
CC esp32/rtc_pm.o
CC esp32/rtc_sleep.o
CC esp32/rtc_time.o
AR libsoc.a
CC bootloader_start.o
CC flash_qio_mode.o
AR libmain.a
LD bootloader.elf
esptool.py v2.0-beta3
Building partitions from /Users/tedwood/lws-esp32-factory/partitions.csv...
CC esp_ota_ops.o
AR libapp_update.a
CC src/bootloader_flash.o
CC src/bootloader_random.o
CC src/efuse.o
CC src/esp_image_format.o
CC src/flash_encrypt.o
CC src/flash_partitions.o
CC src/secure_boot.o
CC src/secure_boot_signatures.o
AR libbootloader_support.a
CC bt.o
AR libbt.a
CC libcoap/src/address.o
CC libcoap/src/async.o
CC libcoap/src/block.o
CC libcoap/src/coap_time.o
CC libcoap/src/debug.o
CC libcoap/src/encode.o
CC libcoap/src/hashkey.o
CC libcoap/src/mem.o
CC libcoap/src/net.o
CC libcoap/src/option.o
CC libcoap/src/pdu.o
CC libcoap/src/resource.o
CC libcoap/src/str.o
CC libcoap/src/subscribe.o
CC libcoap/src/uri.o
CC port/coap_io_socket.o
AR libcoap.a
CXX cxx_guards.o
AR libcxx.a
CC gpio.o
CC i2c.o
CC i2s.o
CC ledc.o
CC pcnt.o
CC periph_ctrl.o
CC rmt.o
CC rtc_module.o
CC sdmmc_host.o
CC sdmmc_transaction.o
CC sigmadelta.o
CC spi_common.o
CC spi_master.o
CC spi_slave.o
CC timer.o
CC uart.o
AR libdriver.a
CC app_trace.o
CC cache_err_int.o
CC clk.o
CC core_dump.o
CC cpu_start.o
CC crosscore_int.o
CC deep_sleep.o
CC event_default_handlers.o
CC event_loop.o
CC freertos_hooks.o
CC gdbstub.o
CC heap_alloc_caps.o
CC hw_random.o
CC int_wdt.o
CC intr_alloc.o
CC ipc.o
CC lib_printf.o
CC panic.o
CC phy_init.o
CC system_api.o
CC task_wdt.o
CC hwcrypto/aes.o
CC hwcrypto/sha.o
AR libesp32.a
CC emac_dev.o
CC emac_main.o
CC eth_phy/phy_common.o
CC eth_phy/phy_lan8720.o
CC eth_phy/phy_tlk110.o
AR libethernet.a
CC library/xmlparse.o
CC library/xmlrole.o
CC library/xmltok.o
CC library/xmltok_impl.o
CC library/xmltok_ns.o
CC port/chardata.o
CC port/expat_element.o
CC port/minicheck.o
AR libexpat.a
CC src/option/syscall.o
CC src/option/unicode.o
CC src/diskio.o
CC src/diskio_spiflash.o
CC src/ff.o
CC src/vfs_fat.o
CC src/vfs_fat_sdmmc.o
CC src/vfs_fat_spiflash.o
AR libfatfs.a
CC FreeRTOS-openocd.o
CC croutine.o
CC event_groups.o
CC heap_regions.o
CC heap_regions_debug.o
CC list.o
CC port.o
CC queue.o
CC ringbuf.o
CC tasks.o
CC timers.o
CC xtensa_init.o
CC xtensa_intr.o
CC xtensa_overlay_os_hook.o
AS portasm.o
AS xtensa_context.o
AS xtensa_intr_asm.o
AS xtensa_vectors.o
AR libfreertos.a
CC src//jsmn.o
AR libjsmn.a
CC library/cJSON.o
CC port/cJSON_Utils.o
AR libjson.a
doing lws cmake
-- The C compiler identification is unknown
-- Check for working C compiler: /Users/tedwood/esp/xtensa-esp32-elf/bin/../bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /Users/tedwood/esp/xtensa-esp32-elf/bin/../bin/xtensa-esp32-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_TOOLCHAIN_FILE='/Users/tedwood/lws-esp32-factory/components/libwebsockets/cross-esp32.cmake'
-- Found Git: /usr/bin/git
Git commit hash: [email protected]
-- Performing Test LWS_HAVE_inline
-- Performing Test LWS_HAVE_inline - Success
-- Performing Test LWS_HAVE___inline__
-- Performing Test LWS_HAVE___inline__ - Success
-- Performing Test LWS_HAVE___inline
-- Performing Test LWS_HAVE___inline - Success
-- Looking for bzero
-- Looking for bzero - not found
-- Looking for fork
-- Looking for fork - not found
-- Looking for getenv
-- Looking for getenv - not found
-- Looking for memset
-- Looking for memset - not found
-- Looking for socket
-- Looking for socket - not found
-- Looking for strerror
-- Looking for strerror - not found
-- Looking for vfork
-- Looking for vfork - not found
-- Looking for execvpe
-- Looking for execvpe - not found
-- Looking for snprintf
-- Looking for snprintf - not found
-- Looking for _snprintf
-- Looking for _snprintf - not found
-- Looking for _vsnprintf
-- Looking for _vsnprintf - not found
-- Looking for getloadavg
-- Looking for getloadavg - not found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - not found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for in6addr.h
-- Looking for in6addr.h - not found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for memory.h
-- Looking for memory.h - not found
-- Looking for netinet/in.h
-- Looking for netinet/in.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for strings.h
-- Looking for strings.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/prctl.h
-- Looking for sys/prctl.h - not found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for sys/sockio.h
-- Looking for sys/sockio.h - not found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for vfork.h
-- Looking for vfork.h - not found
-- Looking for zlib.h
-- Looking for zlib.h - not found
-- Looking for 4 include files stdlib.h, ..., float.h
-- Looking for 4 include files stdlib.h, ..., float.h - found
-- Found ZLIB: /Users/tedwood/lws-esp32-factory/build/zlib/libzlib.a (found version "1.2.11")
zlib include dirs: /Users/tedwood/lws-esp32-factory/components/zlib
zlib libraries: /Users/tedwood/lws-esp32-factory/build/zlib/libzlib.a
Compiling with SSL support
OpenSSL include dir: /Users/tedwood/RPK/esp-idf/components/openssl/include
-- Looking for openssl/ecdh.h
-- Looking for openssl/ecdh.h - not found
-- Looking for SSL_CTX_set1_param
-- Looking for SSL_CTX_set1_param - not found
-- Looking for X509_VERIFY_PARAM_set1_host
-- Looking for X509_VERIFY_PARAM_set1_host - not found
Searching for OpenSSL executable and dlls
OpenSSL executable:
GENCERTS = 1
Generating SSL Certificates for the test-server...
SUCCESSFULLY generated SSL certificate
-- Looking for RPMTools... - rpmbuild NOT FOUND
---------------------------------------------------------------------
Settings: (For more help do cmake -LH <srcpath>)
---------------------------------------------------------------------
LWS_WITH_STATIC = ON
LWS_WITH_SHARED = OFF
LWS_WITH_SSL = ON (SSL Support)
LWS_SSL_CLIENT_USE_OS_CA_CERTS = 1
LWS_USE_WOLFSSL = OFF (wolfSSL/CyaSSL replacement for OpenSSL)
LWS_WITHOUT_BUILTIN_SHA1 = OFF
LWS_WITHOUT_BUILTIN_GETIFADDRS = OFF
LWS_WITHOUT_CLIENT = OFF
LWS_WITHOUT_SERVER = OFF
LWS_LINK_TESTAPPS_DYNAMIC = OFF
LWS_WITHOUT_TESTAPPS = ON
LWS_WITHOUT_TEST_SERVER = OFF
LWS_WITHOUT_TEST_SERVER_EXTPOLL = OFF
LWS_WITHOUT_TEST_PING = OFF
LWS_WITHOUT_TEST_ECHO = OFF
LWS_WITHOUT_TEST_CLIENT = OFF
LWS_WITHOUT_TEST_FRAGGLE = OFF
LWS_WITHOUT_EXTENSIONS = ON
LWS_WITH_LATENCY = OFF
LWS_WITHOUT_DAEMONIZE = ON
LWS_USE_LIBEV =
LWS_USE_LIBUV =
LWS_USE_LIBEVENT =
LWS_IPV6 = OFF
LWS_UNIX_SOCK = OFF
LWS_WITH_HTTP2 = OFF
LWS_SSL_SERVER_WITH_ECDH_CERT = OFF
LWS_MAX_SMP = 1
LWS_WITH_CGI = OFF
LWS_HAVE_OPENSSL_ECDH_H =
LWS_HAVE_SSL_CTX_set1_param =
LWS_WITH_HTTP_PROXY = OFF
LIBHUBBUB_LIBRARIES =
PLUGINS =
LWS_WITH_ACCESS_LOG = OFF
LWS_WITH_SERVER_STATUS = OFF
LWS_WITH_LEJP = OFF
LWS_WITH_LEJP_CONF = OFF
LWS_WITH_SMTP = OFF
LWS_WITH_GENERIC_SESSIONS = OFF
LWS_STATIC_PIC = OFF
LWS_WITH_RANGES = ON
LWS_PLAT_OPTEE = OFF
LWS_WITH_ESP32 = 1
LWS_WITH_ZIP_FOPS = 1
LWS_AVOID_SIGPIPE_IGN = OFF
---------------------------------------------------------------------
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
COMPONENT_PATH
OPENSSL_LIBRARIES
-- Build files have been written to: /Users/tedwood/lws-esp32-factory/build/libwebsockets
Scanning dependencies of target websockets
[ 4%] Building C object CMakeFiles/websockets.dir/lib/base64-decode.c.o
[ 8%] Building C object CMakeFiles/websockets.dir/lib/handshake.c.o
[ 12%] Building C object CMakeFiles/websockets.dir/lib/libwebsockets.c.o
[ 16%] Building C object CMakeFiles/websockets.dir/lib/service.c.o
[ 20%] Building C object CMakeFiles/websockets.dir/lib/pollfd.c.o
[ 25%] Building C object CMakeFiles/websockets.dir/lib/output.c.o
[ 29%] Building C object CMakeFiles/websockets.dir/lib/parsers.c.o
[ 33%] Building C object CMakeFiles/websockets.dir/lib/context.c.o
[ 37%] Building C object CMakeFiles/websockets.dir/lib/alloc.c.o
[ 41%] Building C object CMakeFiles/websockets.dir/lib/header.c.o
[ 45%] Building C object CMakeFiles/websockets.dir/lib/client.c.o
[ 50%] Building C object CMakeFiles/websockets.dir/lib/client-handshake.c.o
[ 54%] Building C object CMakeFiles/websockets.dir/lib/client-parser.c.o
[ 58%] Building C object CMakeFiles/websockets.dir/lib/ssl.c.o
[ 62%] Building C object CMakeFiles/websockets.dir/lib/ssl-server.c.o
[ 66%] Building C object CMakeFiles/websockets.dir/lib/ssl-client.c.o
[ 70%] Building C object CMakeFiles/websockets.dir/lib/sha-1.c.o
[ 75%] Building C object CMakeFiles/websockets.dir/lib/lws-plat-esp32.c.o
[ 79%] Building C object CMakeFiles/websockets.dir/lib/romfs.c.o
[ 83%] Building C object CMakeFiles/websockets.dir/lib/server.c.o
[ 87%] Building C object CMakeFiles/websockets.dir/lib/server-handshake.c.o
[ 91%] Building C object CMakeFiles/websockets.dir/lib/ranges.c.o
[ 95%] Building C object CMakeFiles/websockets.dir/lib/fops-zip.c.o
[100%] Linking C static library lib/libwebsockets.a
[100%] Built target websockets
CC log.o
AR liblog.a
CC api/api_lib.o
CC api/api_msg.o
CC api/err.o
CC api/netbuf.o
CC api/netdb.o
CC api/netifapi.o
CC api/pppapi.o
CC api/sockets.o
CC api/tcpip.o
CC apps/sntp/sntp.o
CC apps/ping/esp_ping.o
CC apps/ping/ping.o
CC apps/dhcpserver.o
CC core/ipv4/autoip.o
CC core/ipv4/dhcp.o
CC core/ipv4/icmp.o
CC core/ipv4/igmp.o
CC core/ipv4/ip4.o
CC core/ipv4/ip4_addr.o
CC core/ipv4/ip_frag.o
CC core/ipv6/dhcp6.o
CC core/ipv6/ethip6.o
CC core/ipv6/icmp6.o
CC core/ipv6/inet6.o
CC core/ipv6/ip6.o
CC core/ipv6/ip6_addr.o
CC core/ipv6/ip6_frag.o
CC core/ipv6/mld6.o
CC core/ipv6/nd6.o
CC core/def.o
CC core/dns.o
CC core/inet_chksum.o
CC core/init.o
CC core/ip.o
CC core/mem.o
CC core/memp.o
CC core/netif.o
CC core/pbuf.o
CC core/raw.o
CC core/stats.o
CC core/sys.o
CC core/tcp.o
CC core/tcp_in.o
CC core/tcp_out.o
CC core/timers.o
CC core/udp.o
CC netif/etharp.o
CC netif/ethernet.o
CC netif/ethernetif.o
CC netif/lowpan6.o
CC netif/slipif.o
CC port/freertos/sys_arch.o
CC port/netif/ethernetif.o
CC port/netif/wlanif.o
CC port/debug/lwip_debug.o
AR liblwip.a
CC library/aes.o
CC library/aesni.o
CC library/arc4.o
CC library/asn1parse.o
CC library/asn1write.o
CC library/base64.o
CC library/bignum.o
CC library/blowfish.o
CC library/camellia.o
CC library/ccm.o
CC library/certs.o
CC library/cipher.o
CC library/cipher_wrap.o
CC library/ctr_drbg.o
CC library/debug.o
CC library/des.o
CC library/dhm.o
CC library/ecdh.o
CC library/ecdsa.o
CC library/ecjpake.o
CC library/ecp.o
CC library/ecp_curves.o
CC library/entropy.o
CC library/entropy_poll.o
CC library/error.o
CC library/gcm.o
CC library/havege.o
CC library/hmac_drbg.o
CC library/md.o
CC library/md2.o
CC library/md4.o
CC library/md5.o
CC library/md_wrap.o
CC library/memory_buffer_alloc.o
CC library/net.o
CC library/oid.o
CC library/padlock.o
CC library/pem.o
CC library/pk.o
CC library/pk_wrap.o
CC library/pkcs11.o
CC library/pkcs12.o
CC library/pkcs5.o
CC library/pkparse.o
CC library/pkwrite.o
CC library/platform.o
CC library/ripemd160.o
CC library/rsa.o
CC library/sha1.o
CC library/sha256.o
CC library/sha512.o
CC library/ssl_cache.o
CC library/ssl_ciphersuites.o
CC library/ssl_cli.o
CC library/ssl_cookie.o
CC library/ssl_srv.o
CC library/ssl_ticket.o
CC library/ssl_tls.o
CC library/threading.o
CC library/timing.o
CC library/version.o
CC library/version_features.o
CC library/x509.o
CC library/x509_create.o
CC library/x509_crl.o
CC library/x509_crt.o
CC library/x509_csr.o
CC library/x509write_crt.o
CC library/x509write_csr.o
CC library/xtea.o
CC port/esp_bignum.o
CC port/esp_hardware.o
CC port/esp_sha1.o
CC port/esp_sha256.o
CC port/esp_sha512.o
CC port/mbedtls_debug.o
CC port/net.o
AR libmbedtls.a
CC mdns.o
AR libmdns.a
CC micro-ecc/uECC.o
AR libmicro-ecc.a
CC locks.o
CC reent_init.o
CC syscall_table.o
CC syscalls.o
CC time.o
AR libnewlib.a
CC library/nghttp2_buf.o
CC library/nghttp2_callbacks.o
CC library/nghttp2_frame.o
CC library/nghttp2_hd.o
CC library/nghttp2_hd_huffman.o
CC library/nghttp2_hd_huffman_data.o
CC library/nghttp2_helper.o
CC library/nghttp2_http.o
CC library/nghttp2_map.o
CC library/nghttp2_mem.o
CC library/nghttp2_npn.o
CC library/nghttp2_option.o
CC library/nghttp2_outbound_item.o
CC library/nghttp2_pq.o
CC library/nghttp2_priority_spec.o
CC library/nghttp2_queue.o
CC library/nghttp2_rcbuf.o
CC library/nghttp2_session.o
CC library/nghttp2_stream.o
CC library/nghttp2_submit.o
CC library/nghttp2_version.o
CC port/http_parser.o
AR libnghttp.a
CXX src/nvs_api.o
CXX src/nvs_item_hash_list.o
CXX src/nvs_page.o
CXX src/nvs_pagemanager.o
CXX src/nvs_storage.o
CXX src/nvs_types.o
AR libnvs_flash.a
CC library/ssl_cert.o
CC library/ssl_lib.o
CC library/ssl_methods.o
CC library/ssl_pkey.o
CC library/ssl_stack.o
CC library/ssl_x509.o
CC platform/ssl_pm.o
CC platform/ssl_port.o
AR libopenssl.a
CC sdmmc_cmd.o
AR libsdmmc.a
CC esp32/brownout.o
CC esp32/cpu_util.o
CC esp32/rtc_clk.o
CC esp32/rtc_init.o
CC esp32/rtc_pm.o
CC esp32/rtc_sleep.o
CC esp32/rtc_time.o
AR libsoc.a
CC cache_utils.o
CC flash_mmap.o
CC flash_ops.o
CC partition.o
CC spi_flash_rom_patch.o
AR libspi_flash.a
CC tcpip_adapter_lwip.o
AR libtcpip_adapter.a
CC ulp.o
CC ulp_macro.o
AR libulp.a
CC vfs.o
CC vfs_uart.o
AR libvfs.a
CXX Partition.o
CXX SPI_Flash.o
CXX WL_Flash.o
CXX crc32.o
CXX wear_levelling.o
AR libwear_levelling.a
CC src/crypto/aes-cbc.o
CC src/crypto/aes-internal-dec.o
CC src/crypto/aes-internal-enc.o
CC src/crypto/aes-internal.o
CC src/crypto/aes-unwrap.o
CC src/crypto/aes-wrap.o
CC src/crypto/bignum.o
CC src/crypto/crypto_internal-cipher.o
CC src/crypto/crypto_internal-modexp.o
CC src/crypto/crypto_internal-rsa.o
CC src/crypto/crypto_internal.o
CC src/crypto/des-internal.o
CC src/crypto/dh_group5.o
CC src/crypto/dh_groups.o
CC src/crypto/md4-internal.o
CC src/crypto/md5-internal.o
CC src/crypto/md5.o
CC src/crypto/ms_funcs.o
CC src/crypto/rc4.o
CC src/crypto/sha1-internal.o
CC src/crypto/sha1-pbkdf2.o
CC src/crypto/sha1.o
CC src/crypto/sha256-internal.o
CC src/crypto/sha256.o
CC port/os_xtensa.o
AR libwpa_supplicant.a
CC eri.o
CC trax.o
AR libxtensa-debug-module.a
CC adler32.o
CC compress.o
CC crc32.o
CC deflate.o
CC gzclose.o
CC gzlib.o
CC gzread.o
CC gzwrite.o
CC infback.o
CC inffast.o
CC inflate.o
CC inftrees.o
CC trees.o
CC uncompr.o
CC zutil.o
AR libzlib.a
CC main.o
AR libmain.a
LD lws-esp32-factory.elf
esptool.py v2.0-beta3
To flash all build output, run 'make flash' or:
python2 /Users/tedwood/RPK/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/cu.SLAB_USBtoUART --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /Users/tedwood/lws-esp32-factory/build/bootloader/bootloader.bin 0x10000 /Users/tedwood/lws-esp32-factory/build/lws-esp32-factory.bin 0x8000 /Users/tedwood/lws-esp32-factory/build/partitions.bin
from lws-esp32-factory.
It seems the make rule is disordered...
cp: /Users/tedwood/lws-esp32-factory/main/../build/lws-esp32-factory.bin: No such file or directory
stat: cannot stat '/Users/tedwood/lws-esp32-factory/main/../build/lws-esp32-factory.bin': No such file or directory
Original length: 0x000000 ( 0)
After ROMFS + Build info: 0x02a92d ( 174381)
This should happen right at the end, after it has done the build.
Can you try use GNU make if not doing so already?
ranlib is in esp-idf part, lws doesn't run it itself as far as I recall.
from lws-esp32-factory.
Using GNU make V3.81
from lws-esp32-factory.
Hmmm try this as a workaround
$ make all pack.img flash monitor
from lws-esp32-factory.
It still doesn't make pack.img at the end. It gets to the end of the build and says "pack.img is up to date"
from lws-esp32-factory.
Ehhh... :-) there shouldn't be a file pack.img. If there is, delete it.
Can you edit this bit of ./components/libwebsockets/scripts/esp32.mk
around line 20
.PHONY: romfs.img
pack.img:
...
Add another .PHONY after the first
.PHONY: pack.img
see if that helps.
from lws-esp32-factory.
No change. Still showing "make: Nothing to be done for `pack.img'" at end of build
.
from lws-esp32-factory.
How about
$ make all ; make pack.img
from lws-esp32-factory.
It still doesn't mount ROMFS
make pack.img
cp: /Users/tedwood/lws-esp32-factory/main/../build/lws-esp32-factory.bin and /Users/tedwood/lws-esp32-factory/main/../build/lws-esp32-factory.bin are identical (not copied).
Original length: 0x0cbb50 ( 834384)
After ROMFS + Build info: 0x0f647d ( 1008765)
Question: what is the purpose of that cp ? It always seems to copy to itself.
from lws-esp32-factory.
The cp is a bug, it's harmless.
Actually that result shows now we can work around the disordered make part of the problem. Which considering I don't have your problem or platform, is not bad.
My working image is smaller than yours
Original length: 0x0ba470 ( 762992)
After ROMFS + Build info: 0x0e3589 ( 931209)
How about
- Hack
components/libwebsockets/scripts/esp32.mk
again removing line 76 or so
all: pack.img
- delete ./build and retry
from lws-esp32-factory.
Same size data as before
I have to say I'm impressed by your ability to debug this without having the platform in front of you.
from lws-esp32-factory.
It's bedtime where I am... the code walks the ELF sections at runtime to find the end of the original esp32 image to which the romfs is appended. So please paste the startup log, the build log lines for that exact same image like
Original length: 0x0ba470 ( 762992)
After ROMFS + Build info: 0x0e3589 ( 931209)
and let me know the exact esp-idf commit you are using. Any changes to sdkconfig?
Dunno if it's necessary but emailing the .bin to [email protected] might throw some light too.
from lws-esp32-factory.
Really appreciate your help with this.
using esp-idf commit 07b61d54f7e502bb12527e4b582de121ffa6fa02
Original length: 0x0b1ed0 ( 728784)
After ROMFS + Build info: 0x0daffb ( 897019)
Hard resetting...
MONITOR
--- idf_monitor on /dev/cu.SLAB_USBtoUART 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0008,len:8
load:0x3fff0010,len:2492
ho 0 tail 12 room 4
load:0x40078000,len:8920
ho 0 tail 12 room 4
load:0x40080000,len:252
0x40080000: _iram_start at ??:?
entry 0x40080034
0x40080034: _iram_start at ??:?
E (50) boot: force_factory 0 bs.ota_info.offset 53248
I (1022) cpu_start: Pro cpu up.
I (1023) cpu_start: Starting app cpu, entry point is 0x40080dd8
0x40080dd8: call_start_cpu1 at /Users/tedwood/lws-esp32-factory/esp-idf/components/esp32/./cpu_start.c:173
I (0) cpu_start: App cpu up.
I (1032) heap_alloc_caps: Initializing. RAM available for dynamic allocation:
I (1055) heap_alloc_caps: At 3FFAE2A0 len 00001D60 (7 KiB): DRAM
I (1075) heap_alloc_caps: At 3FFB9148 len 00026EB8 (155 KiB): DRAM
I (1096) heap_alloc_caps: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (1118) heap_alloc_caps: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1139) heap_alloc_caps: At 40092658 len 0000D9A8 (54 KiB): IRAM
I (1160) cpu_start: Pro cpu start user code
I (1219) cpu_start: Starting scheduler on PRO CPU.
I (204) cpu_start: Starting scheduler on APP CPU.
I (234) wifi: wifi firmware version: ba7c292
I (234) wifi: config NVS flash: disabled
I (234) wifi: config nano formating: disabled
I (234) wifi: Init dynamic tx buffer num: 32
I (234) wifi: Init dynamic rx buffer num: 64
I (234) wifi: wifi driver task: 3ffc2004, prio:23, stack:3584
I (244) wifi: Init static rx buffer num: 10
I (244) wifi: Init dynamic rx buffer num: 0
I (254) wifi: Init rx ampdu len mblock:7
I (254) wifi: Init lldesc rx ampdu entry mblock:4
I (264) wifi: wifi power manager task: 0x3ffc73ac prio: 21 stack: 2560
E (264) wifi: wifi_set_chan_range 1694 ret=1
I (274) wifi: wifi timer task: 3ffc842c, prio:22, stack:3584
I (304) phy: phy_version: 350, Mar 22 2017, 15:02:06, 0, 0
I (304) wifi: mode : sta (24:0a:c4:02:05:ec) + softAP (24:0a:c4:02:05:ed)
4: No SSL certs... using port 80
4: Initial logging level 63
4: Libwebsockets version: 2.2.0 [email protected]
4: IPV6 not compiled in
4: Threads: 1 each 30 fds
4: mem: platform fd map: 120 bytes
4: Compiled with OpenSSL support
4: SSL disabled: no LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT
4: mem: per-conn: 432 bytes + protocol rx buf
1: Failed to mount ROMFS at 0xc1ed4 0xc1ed4
4: setting mount default to factory
from lws-esp32-factory.
The ROMFS offset computation is actually correct... the partition starts at +0x10000, the length before it was 0xb1ed0 and there should be a 32-bit ROMFS size before the ROMFS itself.
When you flash it, it is actually flashing 897019 bytes?
What is in your image at that offset? Here it (using my image size number) looks like
$ hexdump -s 762992 build/lws-esp32-factory.bin -n32 -C
000ba470 00 90 02 00 2d 72 6f 6d 31 66 73 2d 00 02 8e 00 |....-rom1fs-....|
000ba480 d4 fb 02 b7 72 6f 6d 20 35 39 30 38 38 63 32 30 |....rom 59088c20|
It shows the ROMFS length word (0x29000) and then the romfs image.
What does hexdump -s 728784 build/lws-esp32-factory.bin -n32 -C
show you?
from lws-esp32-factory.
Any news?
from lws-esp32-factory.
Sorry - was at conference yesterday.
Total number of bytes written to flash is actually 743600
esptool.py v2.0-beta3
Connecting........____
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash params set to 0x0220
Compressed 11744 bytes to 7519...
Wrote 11744 bytes (7519 compressed) at 0x00001000 in 0.1 seconds (effective 842.1 kbit/s)...
Hash of data verified.
Compressed 728784 bytes to 452644...
Wrote 728784 bytes (452644 compressed) at 0x00010000 in 7.9 seconds (effective 738.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 110...
Wrote 3072 bytes (110 compressed) at 0x00008000 in 0.0 seconds (effective 9690.6 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting...
Hexdump looks like this:
Teds-MacBook-Pro:lws-esp32-factory tedwood$ hexdump -s 728784 build/lws-esp32-factory.bin -n32 -C
00b1ed0 e9 08 02 20 24 0e 08 40 00 00 00 00 00 00 00 00
00b1ee0 00 00 00 00 00 00 00 00 00 00 00 00 e8 ff 00 00
00b1ef0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
from lws-esp32-factory.
Ah.
After a make all; make pack.img:
Teds-MacBook-Pro:lws-esp32-factory tedwood$ hexdump -n64 -s 728784 -C build/lws-esp32-factory.bin
000b1ed0 00 90 02 00 2d 72 6f 6d 31 66 73 2d 00 02 8e 00 |....-rom1fs-....|
000b1ee0 d8 88 ee 95 72 6f 6d 20 35 39 30 62 30 37 36 34 |....rom 590b0764|
000b1ef0 00 00 00 00 00 00 00 49 00 00 00 20 00 00 00 00 |.......I... ....|
000b1f00 d1 ff ff 97 2e 00 00 00 00 00 00 00 00 00 00 00 |................|
000b1f10
After a make all flash
Teds-MacBook-Pro:lws-esp32-factory tedwood$ hexdump -n64 -s 728784 -C build/lws-esp32-factory.bin
000b1ed0 e9 08 02 20 24 0e 08 40 00 00 00 00 00 00 00 00 |... $..@........|
000b1ee0 00 00 00 00 00 00 00 00 00 00 00 00 e8 ff 00 00 |................|
000b1ef0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
Make flash recreates lws-esp32-factory.bin from scracth each time.
If I do
make all
make pack.img
and then call the python loader script direct, it flashes the romfs and starts up OK
from lws-esp32-factory.
I had a similiar problem, but it was my fault.
I compiled with make flash instead of make all flash. (on Ubuntu)
Just for people who might have the same problem.
from lws-esp32-factory.
Ok... so for mac build IIUI
-
makefile script needs gstat instead of stat... the underlying problem is the format string %s means 'size' in GNU stat and is undefined in bsd stat (size is %z there but in GNU stat, that means file date).
-
have to build with
make all; make pack.img flash monitor
I pushed a patch on lws favouring gstat if it exists, plus added a note in the READMEs about the make workaround for mac, and updated -factory and -test-server-demos. So I think that's it for this one.
from lws-esp32-factory.
Mm no I see I missed your point about make flash regenerating the file... how about hack in a stanza
flash: pack.img
in components/libwebsockets/scripts/esp32.mk
?
from lws-esp32-factory.
That didn't work. It still rebuilds the image as part of make flash and doesn't redo make pack.img afterwards....
from lws-esp32-factory.
I still don't understand what is different processing the aggregate makefiles under Linux and under bsd... both apparently with GNU make. I am not the only person building this just fine.
Can you try a later GNU make? My version is from Fedora 26 alpha, 4.2.1, but you don't need it to be that recent, since it built fine on F25 and Ubuntu reportedly.
from lws-esp32-factory.
Thats it. gmake 4.2.1 builds it correctly
from lws-esp32-factory.
Ehhh lol... OK I will update the READMEs accordingly... thanks for your help debugging it
from lws-esp32-factory.
I just pushed an update to the build stuff that fixes problems with parallel build (make -j n) and should remove this make version requirement thing.
from lws-esp32-factory.
Related Issues (20)
- lws-esp32-factory/components/bootloader/Makefile.projbuild:37: *** multiple target patterns. Stop. HOT 3
- oto_choose_part will accept partition outside range HOT 2
- INFO: ota update of factory partition fails HOT 8
- lws-esp32-factory is always listed as dirty HOT 4
- Does it link on ESP32 HOT 2
- Connection terminates after approximetly 10 minutes HOT 3
- Minor: Missing "hard" for Git command in Readme HOT 1
- Lets Encrypt stops at first step
- tcp_connect: can only connect from state CLOSED
- Partition table too small for newer esp-idf HOT 4
- how to force enter app after first reboot HOT 7
- Updated alignment with esp-idf/mbedtls needed to build with latest esp-idf HOT 16
- websocket client example
- Error during make flash monitor HOT 2
- mbedtls_handshake: ssl ret -6900 state 8
- arduino-esp32 support ?
- multiple definition of api functions when using openssl api functions HOT 1
- build fail for lws-esp32-factory HOT 12
- Can this be used on esp8266 HOT 1
- Please give me an esp8266 program about LWS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lws-esp32-factory.