video: Make all video options depend on DM_VIDEO
[platform/kernel/u-boot.git] / Makefile
index 4c886a3..0f11747 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
 VERSION = 2022
 PATCHLEVEL = 10
 SUBLEVEL =
-EXTRAVERSION = -rc5
+EXTRAVERSION =
 NAME =
 
 # *DOCUMENTATION*
@@ -521,8 +521,8 @@ env_h := include/generated/environment.h
 
 no-dot-config-targets := clean clobber mrproper distclean \
                         help %docs check% coccicheck \
-                        ubootversion backup tests check qcheck tcheck pylint \
-                        pylint_err
+                        ubootversion backup tests check pcheck qcheck tcheck \
+                        pylint pylint_err
 
 config-targets := 0
 mixed-targets  := 0
@@ -643,6 +643,13 @@ export CFLAGS_EFI  # Compiler flags to add when building EFI app
 export CFLAGS_NON_EFI  # Compiler flags to remove when building EFI app
 export EFI_TARGET      # binutils target if EFI is natively supported
 
+export LTO_ENABLE
+
+# This is y if LTO is enabled for this build. See NO_LTO=1 to disable LTO
+ifeq ($(NO_LTO),)
+LTO_ENABLE=$(if $(CONFIG_LTO),y)
+endif
+
 # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
 # that (or fail if absent).  Otherwise, search for a linker script in a
 # standard location.
@@ -708,16 +715,16 @@ endif
 LTO_CFLAGS :=
 LTO_FINAL_LDFLAGS :=
 export LTO_CFLAGS LTO_FINAL_LDFLAGS
-ifdef CONFIG_LTO
+ifeq ($(LTO_ENABLE),y)
        ifeq ($(cc-name),clang)
-               LTO_CFLAGS              += -flto
+               LTO_CFLAGS              += -DLTO_ENABLE -flto
                LTO_FINAL_LDFLAGS       += -flto
 
                AR                      = $(shell $(CC) -print-prog-name=llvm-ar)
                NM                      = $(shell $(CC) -print-prog-name=llvm-nm)
        else
                NPROC                   := $(shell nproc 2>/dev/null || echo 1)
-               LTO_CFLAGS              += -flto=$(NPROC)
+               LTO_CFLAGS              += -DLTO_ENABLE -flto=$(NPROC)
                LTO_FINAL_LDFLAGS       += -fuse-linker-plugin -flto=$(NPROC)
 
                # use plugin aware tools
@@ -1016,7 +1023,7 @@ LDFLAGS_u-boot += $(LDFLAGS_FINAL)
 LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker)
 
 # ld.lld support
-LDFLAGS_u-boot += -z notext
+LDFLAGS_u-boot += -z notext $(call ld-option,--apply-dynamic-relocs)
 
 LDFLAGS_u-boot += --build-id=none
 
@@ -1131,18 +1138,9 @@ ifneq ($(CONFIG_SPL_FIT_GENERATOR),)
        @echo >&2 "arch-specific scripts with no tests."
        @echo >&2 "===================================================="
 endif
-ifneq ($(CONFIG_DM),y)
-       @echo >&2 "===================== WARNING ======================"
-       @echo >&2 "This board does not use CONFIG_DM. CONFIG_DM will be"
-       @echo >&2 "compulsory starting with the v2020.01 release."
-       @echo >&2 "Failure to update may result in board removal."
-       @echo >&2 "See doc/develop/driver-model/migration.rst for more info."
-       @echo >&2 "===================================================="
-endif
        $(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\
                $(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG))
        $(call deprecated,CONFIG_DM_I2C,I2C drivers,v2022.04,$(CONFIG_SYS_I2C_LEGACY))
-       $(call deprecated,CONFIG_DM_KEYBOARD,Keyboard drivers,v2022.10,$(CONFIG_KEYBOARD))
        @# CONFIG_SYS_TIMER_RATE has brackets in it for some boards which
        @# confuses this rule. Use if() to send just a single character which
        @# is enable to tell 'deprecated' that one of these symbols exists
@@ -1467,6 +1465,7 @@ endif
 
 u-boot-spl.kwb: u-boot.bin spl/u-boot-spl.bin FORCE
        $(call if_changed,mkimage)
+       $(BOARD_SIZE_CHECK)
 
 u-boot.sha1:   u-boot.bin
                tools/ubsha1 u-boot.bin
@@ -1517,7 +1516,7 @@ tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin FORCE
 SPL: spl/u-boot-spl.bin FORCE
        $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
 
-ifeq ($(CONFIG_ARCH_IMX8M)$(CONFIG_ARCH_IMX8), y)
+#ifeq ($(CONFIG_ARCH_IMX8M)$(CONFIG_ARCH_IMX8), y)
 ifeq ($(CONFIG_SPL_LOAD_IMX_CONTAINER), y)
 u-boot.cnt: u-boot.bin FORCE
        $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
@@ -1533,7 +1532,7 @@ flash.bin: spl/u-boot-spl.bin u-boot.itb FORCE
        $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
 endif
 endif
-endif
+#endif
 
 u-boot.uim: u-boot.bin FORCE
        $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
@@ -1724,7 +1723,7 @@ ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(ARCH)/Makefile.postlink)
 
 # Generate linker list symbols references to force compiler to not optimize
 # them away when compiling with LTO
-ifdef CONFIG_LTO
+ifeq ($(LTO_ENABLE),y)
 u-boot-keep-syms-lto := keep-syms-lto.o
 u-boot-keep-syms-lto_c := $(patsubst %.o,%.c,$(u-boot-keep-syms-lto))
 
@@ -1746,7 +1745,7 @@ endif
 
 # Rule to link u-boot
 # May be overridden by arch/$(ARCH)/config.mk
-ifdef CONFIG_LTO
+ifeq ($(LTO_ENABLE),y)
 quiet_cmd_u-boot__ ?= LTO     $@
       cmd_u-boot__ ?=                                                          \
                $(CC) -nostdlib -nostartfiles                                   \
@@ -2318,6 +2317,7 @@ help:
        @echo  'Test targets:'
        @echo  ''
        @echo  '  check           - Run all automated tests that use sandbox'
+       @echo  '  pcheck          - Run quick automated tests in parallel'
        @echo  '  qcheck          - Run quick automated tests that use sandbox'
        @echo  '  tcheck          - Run quick automated tests on tools'
        @echo  '  pylint          - Run pylint on all Python files'
@@ -2363,6 +2363,9 @@ help:
 tests check:
        $(srctree)/test/run
 
+pcheck:
+       $(srctree)/test/run parallel
+
 qcheck:
        $(srctree)/test/run quick