kbuild: fixdep: Resync this with v4.17
[oweals/u-boot.git] / scripts / Makefile.spl
index 7af6b120b6c10db9f2f7c8b4518e8ce9b142fa5a..314b02ba07dbee88e71aa9eeb352e9f6f5f70e30 100644 (file)
@@ -71,7 +71,11 @@ HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makef
 libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/)
 libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
 
+ifeq ($(CONFIG_TPL_BUILD),y)
+libs-$(CONFIG_TPL_FRAMEWORK) += common/spl/
+else
 libs-$(CONFIG_SPL_FRAMEWORK) += common/spl/
+endif
 libs-y += common/init/
 
 # Special handling for a few options which support SPL/TPL
@@ -88,6 +92,7 @@ endif
 
 libs-y += drivers/
 libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/dwc3/
+libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/cdns3/
 libs-y += dts/
 libs-y += fs/
 libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/
@@ -229,9 +234,11 @@ ALL-y      += $(obj)/boot.bin
 endif
 
 ifdef CONFIG_TPL_BUILD
-ALL-$(CONFIG_TPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-16bit-tpl.bin
+ALL-$(CONFIG_TPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-start16-tpl.bin \
+       $(obj)/u-boot-x86-reset16-tpl.bin
 else
-ALL-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-16bit-spl.bin
+ALL-$(CONFIG_SPL_X86_16BIT_INIT) += $(obj)/u-boot-x86-start16-spl.bin \
+       $(obj)/u-boot-x86-reset16-spl.bin
 endif
 
 ALL-$(CONFIG_ARCH_ZYNQ)                += $(obj)/boot.bin
@@ -337,12 +344,20 @@ OBJCOPYFLAGS_$(SPL_BIN)-nodtb.bin = $(SPL_OBJCFLAGS) -O binary \
 $(obj)/$(SPL_BIN)-nodtb.bin: $(obj)/$(SPL_BIN) FORCE
        $(call if_changed,objcopy)
 
-OBJCOPYFLAGS_u-boot-x86-16bit-spl.bin := -O binary -j .start16 -j .resetvec
-$(obj)/u-boot-x86-16bit-spl.bin: $(obj)/u-boot-spl FORCE
+OBJCOPYFLAGS_u-boot-x86-start16-spl.bin := -O binary -j .start16
+$(obj)/u-boot-x86-start16-spl.bin: $(obj)/u-boot-spl FORCE
+       $(call if_changed,objcopy)
+
+OBJCOPYFLAGS_u-boot-x86-start16-tpl.bin := -O binary -j .start16
+$(obj)/u-boot-x86-start16-tpl.bin: $(obj)/u-boot-tpl FORCE
+       $(call if_changed,objcopy)
+
+OBJCOPYFLAGS_u-boot-x86-reset16-spl.bin := -O binary -j .resetvec
+$(obj)/u-boot-x86-reset16-spl.bin: $(obj)/u-boot-spl FORCE
        $(call if_changed,objcopy)
 
-OBJCOPYFLAGS_u-boot-x86-16bit-tpl.bin := -O binary -j .start16 -j .resetvec
-$(obj)/u-boot-x86-16bit-tpl.bin: $(obj)/u-boot-tpl FORCE
+OBJCOPYFLAGS_u-boot-x86-reset16-tpl.bin := -O binary -j .resetvec
+$(obj)/u-boot-x86-reset16-tpl.bin: $(obj)/u-boot-tpl FORCE
        $(call if_changed,objcopy)
 
 LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL)