feat(bootloader): Modify makefile to support esp8266

This commit is contained in:
Wu Jian Gang
2018-06-04 16:33:31 +08:00
parent d7e266f170
commit 69fdfe2a32
4 changed files with 8 additions and 18 deletions

View File

@ -18,7 +18,7 @@ SECURE_BOOT_SIGNING_KEY=$(abspath $(call dequote,$(CONFIG_SECURE_BOOT_SIGNING_KE
export SECURE_BOOT_SIGNING_KEY # used by bootloader_support component
# Has a matching value in bootloader_support esp_flash_partitions.h
BOOTLOADER_OFFSET := 0x1000
BOOTLOADER_OFFSET := 0x0000
# Custom recursive make for bootloader sub-project
#
@ -56,7 +56,7 @@ bootloader: $(BOOTLOADER_BIN)
ESPTOOL_ALL_FLASH_ARGS += $(BOOTLOADER_OFFSET) $(BOOTLOADER_BIN)
bootloader-flash: $(BOOTLOADER_BIN) $(call prereq_if_explicit,erase_flash)
$(ESPTOOLPY_WRITE_FLASH) 0x1000 $^
$(ESPTOOLPY_WRITE_FLASH) 0x0000 $^
else ifdef CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH

View File

@ -8,14 +8,14 @@ endif
PROJECT_NAME := bootloader
COMPONENTS := esptool_py bootloader_support log spi_flash micro-ecc soc main
COMPONENTS := esptool_py main
# Clear C and CXX from top level project
CFLAGS =
CXXFLAGS =
#We cannot include the esp32 component directly but we need its includes.
CFLAGS += -I $(IDF_PATH)/components/esp32/include
#We cannot include the esp8266 component directly but we need its includes.
CFLAGS += -I $(IDF_PATH)/components/esp8266/include
# The bootloader pseudo-component is also included in this build, for its Kconfig.projbuild to be included.
#

View File

@ -1,4 +0,0 @@
# Submodules normally added in component.mk, but fully qualified
# paths can be added at this level (we need binary librtc to be
# available to link bootloader).
COMPONENT_SUBMODULES += $(IDF_PATH)/components/esp32/lib

View File

@ -6,15 +6,9 @@
#
LINKER_SCRIPTS := \
esp32.bootloader.ld \
$(IDF_PATH)/components/esp32/ld/esp32.rom.ld \
$(IDF_PATH)/components/esp32/ld/esp32.rom.spiram_incompatible_fns.ld \
$(IDF_PATH)/components/esp32/ld/esp32.peripherals.ld \
esp32.bootloader.rom.ld
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
LINKER_SCRIPTS += $(IDF_PATH)/components/esp32/ld/esp32.rom.spiflash.ld
endif
esp8266.bootloader.ld \
$(IDF_PATH)/components/esp8266/ld/esp8266.rom.ld \
esp8266.bootloader.rom.ld
COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH) $(addprefix -T ,$(LINKER_SCRIPTS))