From 751d5f5751e1b067c27290ba9c487d70e582cbbf Mon Sep 17 00:00:00 2001 From: jrhoffa Date: Sun, 27 Nov 2022 18:16:51 -0800 Subject: [PATCH] Add lwIP TFTP support patch for esp-idf --- 0001-Enable-lwIP-TFTP-server-support.patch | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 0001-Enable-lwIP-TFTP-server-support.patch diff --git a/0001-Enable-lwIP-TFTP-server-support.patch b/0001-Enable-lwIP-TFTP-server-support.patch new file mode 100644 index 0000000..211781e --- /dev/null +++ b/0001-Enable-lwIP-TFTP-server-support.patch @@ -0,0 +1,46 @@ +From 963e5981b7e9212068ee6589983f5cd0e217f7b1 Mon Sep 17 00:00:00 2001 +From: jrhoffa +Date: Sun, 27 Nov 2022 18:05:45 -0800 +Subject: [PATCH] Enable lwIP TFTP server support + +--- + components/lwip/CMakeLists.txt | 4 ++++ + components/lwip/Kconfig | 7 +++++++ + 2 files changed, 11 insertions(+) + +diff --git a/components/lwip/CMakeLists.txt b/components/lwip/CMakeLists.txt +index acd587de92..40dcb7f4f4 100644 +--- a/components/lwip/CMakeLists.txt ++++ b/components/lwip/CMakeLists.txt +@@ -148,6 +148,10 @@ if(CONFIG_LWIP_DHCPS) + list(APPEND srcs "apps/dhcpserver/dhcpserver.c") + endif() + ++if(CONFIG_LWIP_TFTPS) ++ list(APPEND srcs "lwip/src/apps/tftp/tftp_server.c") ++endif() ++ + idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS "${include_dirs}" + LDFRAGMENTS linker.lf +diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig +index 57e8c2b045..5016394397 100644 +--- a/components/lwip/Kconfig ++++ b/components/lwip/Kconfig +@@ -871,6 +871,13 @@ menu "LWIP" + + endmenu # LWIP RAW API + ++ menu "TFTP" ++ config LWIP_TFTPS ++ bool "Enable TFTP server" ++ default n ++ ++ endmenu # TFTP ++ + menu "SNTP" + + config LWIP_SNTP_MAX_SERVERS +-- +2.25.1 +