Skip to content

pkg/lwip: fix lwip_ethernet dependency#9884

Merged
cladmi merged 3 commits intoRIOT-OS:masterfrom
miri64:pkg/fix/lwip_ethernet-dependency
Sep 4, 2018
Merged

pkg/lwip: fix lwip_ethernet dependency#9884
cladmi merged 3 commits intoRIOT-OS:masterfrom
miri64:pkg/fix/lwip_ethernet-dependency

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Sep 4, 2018

Contribution description

With out this fix the application or device drivers need to add this module. Otherwise, compilation of the lwIP adaptation layer will fail for Ethernet devices.

This also makes the tests/lwip application more flexible for usage of non-native boards with Ethernet devices as the implicit of the lwip_ethernet module there can now be removed.

Testing procedure

Take any non-native board (e.g. arduino-due) and try to compile tests/lwip with an Ethernet driver included (e.g. enc28j60). Without this PR the compilation will fail:

pkg/lwip/contrib/netdev/lwip_netdev.c: In function 'lwip_netdev_init':
pkg/lwip/contrib/netdev/lwip_netdev.c:122:33: error: 'ethip6_output' undeclared (first use in this function); did you mean '_eth_link_output'?
             netif->output_ip6 = ethip6_output;
                                 ^~~~~~~~~~~~~
                                 _eth_link_output

Issues/PRs references

Found by @gschorcht when porting an ESP32 with on-board Ethernet (in #9426). He pointed this out to me offline.

With out this fix the application or device drivers need to add this
module. Otherwise, compilation of the lwIP adaptation layer will fail
for Ethernet devices.
Now that `lwip_ethernet` is pulled in as a dependency of `lwip` +
`netdev_eth`, it can be removed. This also makes this application more
flexible for usage of non-`native` boards with Ethernet devices.
Now that `lwip_ethernet` is pulled in as a dependency of `lwip` +
`netdev_eth`, it can be removed.
@miri64 miri64 added Area: network Area: Networking Area: build system Area: Build system Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Sep 4, 2018
@miri64 miri64 requested a review from cladmi September 4, 2018 11:53
@miri64 miri64 changed the title Pkg/fix/lwip ethernet dependency pkg/lwip: fix lwip_ethernet dependency Sep 4, 2018
Copy link
Copy Markdown
Contributor

@cladmi cladmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fixes compiling:

BOARD=arduino-due USEMODULE=enc28j60 make -C tests/lwip

Also tested that lwip_ethernet is included for native in tests/lwip, tests/lwip_sock_ip, tests/lwip_sock_tcp, tests/lwip_sock_udp.

BOARD=native make  -C tests/lwip  info-debug-variable-USEMODULE | grep -o lwip_ethernet
lwip_ethernet

@cladmi cladmi merged commit 749d8ae into RIOT-OS:master Sep 4, 2018
@miri64 miri64 deleted the pkg/fix/lwip_ethernet-dependency branch September 4, 2018 12:27
@jia200x jia200x added this to the Release 2018.10 milestone Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: build system Area: Build system Area: network Area: Networking Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants