diff --git a/common/Kconfig b/common/Kconfig index 1c9f4774ba..e3a5e1be1e 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -874,7 +874,7 @@ config UPDATE_COMMON config UPDATE_TFTP bool "Auto-update using fitImage via TFTP" - depends on FIT + depends on FIT && OF_LIBFDT && !MTD_NOR_FLASH select UPDATE_COMMON help This option allows performing update of NOR with data in fitImage @@ -883,16 +883,24 @@ config UPDATE_TFTP config UPDATE_TFTP_CNT_MAX int "The number of connection retries during auto-update" default 0 - depends on UPDATE_TFTP + depends on UPDATE_TFTP || DFU_TFTP config UPDATE_TFTP_MSEC_MAX int "Delay in mSec to wait for the TFTP server during auto-update" default 100 - depends on UPDATE_TFTP + depends on UPDATE_TFTP || DFU_TFTP + +config UPDATE_LOAD_ADDR + hex "Address in memory to load the update to" + depends on UPDATE_TFTP || DFU_TFTP + default 0x100000 + help + This option defines the location in memory to be used to load the + update to, if 'loadaddr' is not set in the environment. config UPDATE_FIT bool "Firmware update using fitImage" - depends on FIT + depends on FIT && OF_LIBFDT depends on DFU select UPDATE_COMMON help diff --git a/common/update.c b/common/update.c index 80f16af653..3502713d7d 100644 --- a/common/update.c +++ b/common/update.c @@ -10,14 +10,6 @@ #include #include -#if !(defined(CONFIG_FIT) && defined(CONFIG_OF_LIBFDT)) -#error "CONFIG_FIT and CONFIG_OF_LIBFDT are required for auto-update feature" -#endif - -#if defined(CONFIG_UPDATE_TFTP) && !defined(CONFIG_MTD_NOR_FLASH) -#error "CONFIG_UPDATE_TFTP and !CONFIG_MTD_NOR_FLASH needed for legacy behaviour" -#endif - #include #include #include @@ -31,19 +23,6 @@ /* env variable holding the location of the update file */ #define UPDATE_FILE_ENV "updatefile" -/* set configuration defaults if needed */ -#ifndef CONFIG_UPDATE_LOAD_ADDR -#define CONFIG_UPDATE_LOAD_ADDR 0x100000 -#endif - -#ifndef CONFIG_UPDATE_TFTP_MSEC_MAX -#define CONFIG_UPDATE_TFTP_MSEC_MAX 100 -#endif - -#ifndef CONFIG_UPDATE_TFTP_CNT_MAX -#define CONFIG_UPDATE_TFTP_CNT_MAX 0 -#endif - extern ulong tftp_timeout_ms; extern int tftp_timeout_count_max; #ifdef CONFIG_MTD_NOR_FLASH