Repository navigation
feat: package lwIP for Xbox - #12
Conversation
|
ReenigneArcher
left a comment
There was a problem hiding this comment.
The recipe packages lwIP 2.2.1 at the same upstream commit as the SDK's former submodule. I verified that lwip.pc links the packaged archive and that a local xemu guest can initialize networking through it. The sample matrix passed on this head. The previous head passed all 27 hosted guest tests. The current hosted job hit HTTP 403 while downloading xemu support files before the guest ran. Current hosted job
Before Sunshine-client can switch, the package needs the discovery and receive options below. The integration also needs to preserve Sunshine's receive-queue sizing, network thread priorities, and packet-drop handling under receive pressure. Those settings were outside my focused mDNS and socket-options probe.
Review completed by Codex | Model: gpt-6.2-sol | Thinking: xhigh
| include $(LWIPDIR)/Filelists.mk | ||
|
|
||
| XBDK_NET := $(NXDK_DIR)/lib/net | ||
| LWIP_SOURCES := $(COREFILES) $(CORE4FILES) $(CORE6FILES) $(APIFILES) \ |
There was a problem hiding this comment.
[P2] Build the discovery and socket features Sunshine uses before switching it to this package
Sunshine's current Xbox build compiles the mDNS sources with IGMP and per-interface client storage. It also enables socket receive timeouts for pairing and receive-buffer sizing for streaming. This archive omits the mDNS and IGMP symbols. I linked the exact CI package in xemu and both SO_RCVTIMEO and SO_RCVBUF returned ENOPROTOOPT.
The source-list change below goes with enabling LWIP_IGMP, LWIP_MDNS_RESPONDER, LWIP_SO_RCVTIMEO, and LWIP_SO_RCVBUF and setting LWIP_NUM_NETIF_CLIENT_DATA to 1 in lib/net/nforceif/include/lwipopts.h. lwIP 2.2.1 already defaults LWIP_MDNS_SEARCH to 1. Rebuild the whole archive and install the matching headers because these options alter lwIP types also used by nxNetInit. Refresh the recipe checksum for lwip.mk.
With those changes, the local guest accepted both socket options, read back the selected receive buffer, registered the interface for mDNS, and started a discovery search. The probe checked local API behavior in xemu.
| LWIP_SOURCES := $(COREFILES) $(CORE4FILES) $(CORE6FILES) $(APIFILES) \ | |
| LWIP_SOURCES := $(COREFILES) $(CORE4FILES) $(CORE6FILES) $(APIFILES) $(MDNSFILES) \ |
Review completed by Codex | Model: gpt-6.2-sol | Thinking: xhigh
| projects can request package modules with `NXDK_PACKAGES`. Install `lwip` | ||
| for networking. Makefile projects can require it with `NXDK_NET=y` or by | ||
| including `lwip` in `NXDK_PACKAGES`. |
There was a problem hiding this comment.
Keep lwIP installation instructions beside its recipe
Move the install and NXDK_NET=y guidance into pkgbuilds/lwip/README.md. The package descriptions in the overview work as links to the individual packages.
| projects can request package modules with `NXDK_PACKAGES`. Install `lwip` | |
| for networking. Makefile projects can require it with `NXDK_NET=y` or by | |
| including `lwip` in `NXDK_PACKAGES`. | |
| projects can request package modules with `NXDK_PACKAGES`. See the | |
| [lwIP package documentation](pkgbuilds/lwip/README.md) for Xbox networking. |
Review completed by Codex | Model: gpt-6.2-sol | Thinking: xhigh



Description
Package the existing lwIP 2.2.1 port and Xbox Ethernet driver as
lwip. The archive includesnxNetInitand exports the existinglibnxdk_net.libname. The recipe also installs the lwIP and port headers and pkg-config metadata.Remove the lwIP Git submodule and SDK archive build rule. Makefile projects pick up the installed package automatically or require it using
NXDK_NET=yorNXDK_PACKAGES=lwip. The Docker SDK and both HTTP samples now consume the package.Screenshot
Issues Fixed or Closed
Roadmap Issues
Testing
Built the package and both HTTP sample ISOs using the Docker SDK. Verified that the hello sample builds without a package prefix and that the HTTP sample emits an installation diagnostic when lwIP is missing. The lwIP guest passed locally in xemu. The full hosted run passed all 27 guest tests, including Xbox Ethernet initialization and UDP socket binding. Windows, macOS, and Ubuntu sample builds also passed. Verified the license checksum with
core.autocrlf=true. Bash syntax, clang-format, andgit diff --checkpassed. Hosted xemu tests · Build SamplesType of Change
Checklist
AI Usage
See our AI usage policy.