Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The properly built lwip2 binaries for #7121 #7129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

dok-net
Copy link
Contributor

@dok-net dok-net commented Mar 3, 2020

From clean git checkout, "make install".
Fixes #7127

@d-a-v
Copy link
Collaborator

d-a-v commented Mar 3, 2020

tcp_priv.h is correct but willingly not merged like you propose to avoid gcc warns. To solve it cleanly, a lwIP patch would be needed but has not been done yet.

I don't understand the rest of this PR, please elaborate what is wrong with current master.

edit:
Are you proposing a lwip2 (= lwIP + glue) recompilation from your git master without modification ?
Are you saying that this version you propose works without WDT with some of your work where current version from git master issued from same sources have WDT issues ?

@dok-net dok-net changed the title The properly built binaries for #7121 The properly built lwip2 binaries for #7121 Mar 3, 2020
@dok-net
Copy link
Contributor Author

dok-net commented Mar 3, 2020

tcp_priv.h reverted, thanks for clarifying.

@dok-net
Copy link
Contributor Author

dok-net commented Mar 3, 2020

These binaries are the result of cd Arduino/hardware/esp8266com/esp8266/tools/sdk/lwip2; make install, as per your and the README details, for lwIP2 in ESP8266 git master fresh clone. I can only guess that the binaries you merges the other day are broken.

As these are binaries, produced from a make process that's mostly opaque, I cannot comment further, except that in my tests, that fail on ESP8266 git master, this PR fixes the WDT resets completely.

@d-a-v
Copy link
Collaborator

d-a-v commented Mar 3, 2020

OK. Because the make process is not opaque at all from this side of internet,
I will produce these binaries myself (or if another maintainer propose to do it) as I always did, from a computer and a clean repository, different than the one used to produce the binaries that you find offending so you can test them.

@dok-net
Copy link
Contributor Author

dok-net commented Mar 3, 2020

Great, could you elaborate for the sake of quick research how to match what is landed in ESP8266 Arduino to the sources used, i.e. GNU lwIP? The Makefiles do traverse up and down and do a cascade of includes, on both sides of the internet, I assume :-)
As of writing this, I haven't had a WDT reboot in hours, now, using the "contributor" binaries instead of the "collaborator" ones.

@d-a-v
Copy link
Collaborator

d-a-v commented Mar 3, 2020

@dok-net will this file work for you ?
https://github.com/d-a-v/Arduino/raw/90347e719d6c5082ad88d20e617cb79f3aabef1d/tools/sdk/lib/liblwip2-536-feat.a

Great, could you elaborate for the sake of quick research how to match what is landed in ESP8266 Arduino to the sources used, i.e. GNU lwIP? The Makefiles do traverse up and down and do a cascade of includes, on both sides of the internet, I assume :-)

lwIP is not GNU (just check its official website spelling and its frontpage).

Indeed, "lwip2" is a glue layer that takes unpatched official lwIP sources from the other side of internet to put it straight right into esp8266 arduino. We could put this glue into the core and avoid precompiled binaries but that would increase compilation time, which is already not short.

If you can read makefiles or cmakefiles then it should be easy to understand how it works. Otherwise I'm afraid I do not know methods to honor "quick understanding without knowing" requests. Original lwIP library was generated the same way and I took it as first version for lwip2.
Make and its Makefiles are very ancient and wide-spread in the open source world. Lots of projects aim at replacing them but they are still there. cmake which is more and more adopted in projects will build Makefiles for make. arduino-builder is replacement for it, but in constant improvement while there are projects aiming at compiling esp8266 arduino projects using make, including one from somebody you may know better than I do, updated 19 days ago - so still in production. Sloeber generates and uses makefiles too I believe.

The shortest explanation about make is:

generated-file: dependency1 dependency2 dependancy3 ...
<tab>   command-to-execute-after-dependencies-are-resolved

dependency1: subdependency1 subdependency2 ...
<tab>   ...

@dok-net
Copy link
Contributor Author

dok-net commented Mar 3, 2020

This clean-built binary doesn't WDT reset every so often, please commit them all, or mine to your liking.
With regard to the source revision, you wouldn't give me the answer, so it appears to be as follows:
lwip2-src is cloned from https://git.savannah.nongnu.org/git/lwip.git, checkout is done for the tag given in lwip2/builder/makefiles/Makefile.defs, currently UPSTREAM_VERSION = STABLE-2_1_2_RELEASE.
Also, the contents of tools/sdk/lwip2/include/lwip-git-hash.h,

// generated by makefiles/make-lwip2-hash
#ifndef LWIP_HASH_H
#define LWIP_HASH_H
#define LWIP_HASH_STR "STABLE-2_1_2_RELEASE/glue:1.2-30-g92add50"
#endif // LWIP_HASH_H

detail the revisions of the lwip repository, obviously, and the builder submodule, a.k.a. lwip2, a.k.a. https://github.com/d-a-v/esp82xx-nonos-linklayer.git, a.k.a. glue , in git describe --tag syntax.

@dok-net dok-net closed this Mar 3, 2020
@dok-net dok-net deleted the rebuild_lwip2 branch March 3, 2020 18:42
@dok-net
Copy link
Contributor Author

dok-net commented Mar 3, 2020

@d-a-v I closed this in anticipation of your fix commit for the lwip binaries.
PR #7128 is (loosely) related to this, in any case, the nullptr checks I've added fix the broken OTA for me (issue #7124) and should be best practice anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in master merged with PR #7022: WDT resets
2 participants