Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/lv2/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
//#define NO_PRINT_CONFIG //commented to display config
//#define NO_NETWORKING //commented to actually use networking...
//#define NO_DVD //commented to actually use the DVD...
//#define NO_TFTP

/* Filesystem drivers */

#define FS_ISO9660
#define FS_FAT
//#define FS_EXT2FS
Expand Down
26 changes: 21 additions & 5 deletions source/lv2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
#include "asciiart.h"
#include "config.h"
#include "file.h"

#ifndef NO_TFTP
#include "tftp/tftp.h"
#endif

#include "log.h"

Expand Down Expand Up @@ -211,12 +214,25 @@ int main(){
ip_addr_t fallback_address;
ip4_addr_set_u32(&fallback_address, 0xC0A8015A); // 192.168.1.90

printf("\n * Looking for files on TFTP...\n\n");
for(;;){
tftp_loop(boot_server_name()); //less likely to find something...
tftp_loop(fallback_address);
#ifndef NO_TFTP
printf("\n * Looking for files on TFTP and local media...\n\n");
#else
printf("\n * Looking for files on local media...\n\n");
#endif

for(;;){
#ifndef NO_TFTP
//less likely to find something...
tftp_loop(boot_server_name());
tftp_loop(fallback_address);
#else
// If TFTP support isn't enabled
// the network still needs to be
// polled for the web interface
network_poll();
#endif

fileloop();

console_clrline();
}

Expand Down