summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kconfig27
-rw-r--r--common/Makefile1
-rw-r--r--scripts/Makefile.spl4
3 files changed, 32 insertions, 0 deletions
diff --git a/Kconfig b/Kconfig
index a759e4d..1263d0b 100644
--- a/Kconfig
+++ b/Kconfig
@@ -291,6 +291,33 @@ config FIT_IMAGE_POST_PROCESS
injected into the FIT creation (i.e. the blobs would have been pre-
processed before being added to the FIT image).
+config SPL_DFU_SUPPORT
+ bool "Enable SPL with DFU to load binaries to memory device"
+ depends on USB
+ help
+ Currently the SPL does not have capability to load the
+ binaries or boot images to boot devices like ram,eMMC,SPI,etc.
+ This feature enables the DFU (Device Firmware Upgarde) in SPL with
+ RAM memory device support. The ROM code will load and execute
+ the SPL built with dfu. The user can load binaries (u-boot/kernel) to
+ selected device partition from host-pc using dfu-utils.
+ This feature will be useful to flash the binaries to factory
+ or bare-metal boards using USB interface.
+
+choice
+ bool "DFU device selection"
+ depends on SPL_DFU_SUPPORT
+
+config SPL_DFU_RAM
+ bool "RAM device"
+ depends on SPL_DFU_SUPPORT
+ help
+ select RAM/DDR memory device for loading binary images
+ (u-boot/kernel) to the selected device partition using
+ DFU and execute the u-boot/kernel from RAM.
+
+endchoice
+
config SYS_CLK_FREQ
depends on ARC || ARCH_SUNXI
int "CPU clock frequency"
diff --git a/common/Makefile b/common/Makefile
index 9a9a065..6b4456e 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -89,6 +89,7 @@ obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
endif # !CONFIG_SPL_BUILD
ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_SPL_DFU_SUPPORT) += cli_hush.o
obj-$(CONFIG_SPL_HASH_SUPPORT) += hash.o
obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o
obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 5a7f79c..4febc6b 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -66,6 +66,10 @@ endif
libs-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/
libs-y += drivers/
+libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/dfu/
+libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/gadget/
+libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/gadget/udc/
+libs-$(CONFIG_SPL_DFU_SUPPORT) += drivers/usb/dwc3/
libs-y += dts/
libs-y += fs/
libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/