Skip to content

TFTP / Networking fixes#35

Merged
InvoxiPlayGames merged 7 commits into
Free60Project:masterfrom
mitchellwaite:dontCrashWhenNetworkingIsDisabled
Jun 9, 2026
Merged

TFTP / Networking fixes#35
InvoxiPlayGames merged 7 commits into
Free60Project:masterfrom
mitchellwaite:dontCrashWhenNetworkingIsDisabled

Conversation

@mitchellwaite

@mitchellwaite mitchellwaite commented Feb 10, 2026

Copy link
Copy Markdown
Contributor

When trying to make a version of XeLL that could live on a DVD and boot a linux installer, I noticed a few issues with the TFTP and networking flags that were causing issues and crashes when those features were disabled. To resolve those issues, this PR makes the following changes:

  • When networking is disabled, also disable TFTP
  • In the file loop, don't poll the network if networking is disabled
  • In the kboot configuration code, don't try to reinitialize the network, poll the network, or boot from TFTP if either feature is disabled. Variables have been slightly rearranged to resolve unused variable compiler warnings
  • In main.c, don't poll the network if TFTP and networking is disabled. fallback_address was changed to tftp_fallback_address and placed inside the TFTP ifndef block to make it more clear what the variable is used for

In addition, this change also adds macros to the beginning of, and make changes to, tftp.c such that it will compile against both the current lwip 1.4.1 and the 2.2.1 branch i'm working on

- If networking is disabled, also disable TFTP
- in kbootconf.c, don't bother trying TFTP boot when TFTP is disabled
- in kbootconf.c, don't try to reinitialize the network if networking is disabled
- in main.c, don't try to poll the network if TFTP is disabled
- update netif.dhcp code to use the new function for getting DHCP data
- include lwip/init.h for LWIP_VERSION_MAJOR and create macros to handle API differences so we compile without warnings on both versions
- use `ip_addr_t` (which is `typedef struct ip_addr` already!) instead of `struct ip_addr`
@mitchellwaite mitchellwaite changed the title Better handle the case when TFTP and/or networking is turned off TFTP / Networking fixes Feb 14, 2026
@InvoxiPlayGames

Copy link
Copy Markdown
Member

This would be ready to be merged if the merge conflict can be resolved

@mitchellwaite

Copy link
Copy Markdown
Contributor Author

@InvoxiPlayGames merge conflict is now resolved

@InvoxiPlayGames InvoxiPlayGames merged commit 3cae5a4 into Free60Project:master Jun 9, 2026
1 check passed
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.

2 participants