diff --git a/components/spi_flash/component.mk b/components/spi_flash/component.mk index b9bbbd33..6e3dda5c 100644 --- a/components/spi_flash/component.mk +++ b/components/spi_flash/component.mk @@ -10,9 +10,7 @@ endif CFLAGS += -DPARTITION_QUEUE_HEADER=\"sys/queue.h\" -ifdef CONFIG_ESP8266_OTA_FROM_OLD ifdef IS_BOOTLOADER_BUILD COMPONENT_SRCDIRS += port COMPONENT_OBJS += port/port.o endif -endif diff --git a/components/spi_flash/port/port.c b/components/spi_flash/port/port.c index 67dc67bb..32e3ca3c 100644 --- a/components/spi_flash/port/port.c +++ b/components/spi_flash/port/port.c @@ -14,7 +14,7 @@ #include "sdkconfig.h" -#if defined(CONFIG_ESP8266_OTA_FROM_OLD) && defined(BOOTLOADER_BUILD) +#if (defined(CONFIG_ESP8266_OTA_FROM_OLD) || defined(CONFIG_ESP8266_BOOT_COPY_APP)) && defined(BOOTLOADER_BUILD) #include #include