diff --git a/arch/arm/cpu/armv7/at91/config.mk b/arch/arm/cpu/armv7/at91/config.mk
index 09eab709554486c02d789e3481a8e39914c30a29..db6030880fba2f456661bb74c70157cf88f027d9 100644
--- a/arch/arm/cpu/armv7/at91/config.mk
+++ b/arch/arm/cpu/armv7/at91/config.mk
@@ -3,8 +3,6 @@
 #
 # SPDX-License-Identifier:	GPL-2.0+
 #
-ifdef CONFIG_SPL_BUILD
-ALL-y	+= boot.bin
-else
+ifndef CONFIG_SPL_BUILD
 ALL-y	+= u-boot.img
 endif
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl
index 7afe437e62e11b1ed25f13c909fff68263957948..07db0bff8dfb364195bdf08529d1f30d342bdaee 100644
--- a/scripts/Makefile.spl
+++ b/scripts/Makefile.spl
@@ -181,6 +181,10 @@ ALL-y	+= $(obj)/sunxi-spl.bin
 endif
 endif
 
+ifeq ($(CONFIG_SYS_SOC),"at91")
+ALL-y	+= boot.bin
+endif
+
 all:	$(ALL-y)
 
 ifdef CONFIG_SAMSUNG