mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-14 00:47:26 +00:00
Trigger generic board error only when building
At present the generic board error can occur when configuring U-Boot, or during distclean, but this is incorrect. The existing autoconf.mk may come from an earlier U-Boot configuration which is about to be overwritten. Make the error conditional so that it will only be triggered when we are actually building U-Boot. This avoids a problem where the system is being reconfigured to remove CONFIG_SYS_GENERIC_BOARD on an architecture that does not support it. Currently this will print an error and require the manual removal of include/autoconf.mk. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ce5346a805
commit
fada9e2048
2 changed files with 12 additions and 2 deletions
10
Makefile
10
Makefile
|
@ -183,6 +183,16 @@ endif
|
||||||
# load other configuration
|
# load other configuration
|
||||||
include $(TOPDIR)/config.mk
|
include $(TOPDIR)/config.mk
|
||||||
|
|
||||||
|
# Targets which don't build the source code
|
||||||
|
NON_BUILD_TARGETS = backup clean clobber distclean mkproper tidy unconfig
|
||||||
|
|
||||||
|
# Only do the generic board check when actually building, not configuring
|
||||||
|
ifeq ($(filter $(NON_BUILD_TARGETS),$(MAKECMDGOALS)),)
|
||||||
|
ifeq ($(findstring _config,$(MAKECMDGOALS)),)
|
||||||
|
$(CHECK_GENERIC_BOARD)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
|
# If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
|
||||||
# that (or fail if absent). Otherwise, search for a linker script in a
|
# that (or fail if absent). Otherwise, search for a linker script in a
|
||||||
# standard location.
|
# standard location.
|
||||||
|
|
|
@ -233,8 +233,8 @@ endif
|
||||||
# Does this architecture support generic board init?
|
# Does this architecture support generic board init?
|
||||||
ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
|
ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
|
||||||
ifneq ($(CONFIG_SYS_GENERIC_BOARD),)
|
ifneq ($(CONFIG_SYS_GENERIC_BOARD),)
|
||||||
$(error Your architecture does not support generic board. Please undefined \
|
CHECK_GENERIC_BOARD = $(error Your architecture does not support generic board. \
|
||||||
CONFIG_SYS_GENERIC_BOARD in your board config file)
|
Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue