]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - Makefile
Merge tag 'u-boot-imx-master-20231220' of https://gitlab.denx.de/u-boot/custodians...
[thirdparty/u-boot.git] / Makefile
index 1d551da3ed0722735f970a5dba828c60df343326..220411a293f49c527287ed5d8d6bfd46105aeaaa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0+
 
-VERSION = 2023
-PATCHLEVEL = 07
+VERSION = 2024
+PATCHLEVEL = 01
 SUBLEVEL =
-EXTRAVERSION =
+EXTRAVERSION = -rc5
 NAME =
 
 # *DOCUMENTATION*
@@ -485,6 +485,15 @@ export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o    \
 export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
                         --exclude CVS --exclude .pc --exclude .hg --exclude .git
 
+export PYTHON_ENABLE
+
+# This is y if U-Boot should not build any Python tools or libraries. Typically
+# you would need to set this if those tools/libraries (typically binman and
+# pylibfdt) cannot be built by your environment and are provided separately.
+ifeq ($(NO_PYTHON),)
+PYTHON_ENABLE=y
+endif
+
 # ===========================================================================
 # Rules shared between *config targets and build targets
 
@@ -877,7 +886,7 @@ libs-$(CONFIG_UT_ENV) += test/env/
 libs-$(CONFIG_UT_OPTEE) += test/optee/
 libs-$(CONFIG_UT_OVERLAY) += test/overlay/
 
-libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/)
+libs-y += $(if $(wildcard $(srctree)/board/$(BOARDDIR)/Makefile),board/$(BOARDDIR)/)
 
 libs-y := $(sort $(libs-y))
 
@@ -1278,7 +1287,7 @@ binary_size_check: u-boot-nodtb.bin FORCE
        fi
 
 ifeq ($(CONFIG_INIT_SP_RELATIVE)$(CONFIG_OF_SEPARATE),yy)
-ifneq ($(CONFIG_SYS_MALLOC_F_LEN),)
+ifneq ($(CONFIG_SYS_MALLOC_F),)
 subtract_sys_malloc_f_len = space=$$(($${space} - $(CONFIG_SYS_MALLOC_F_LEN)))
 else
 subtract_sys_malloc_f_len = true
@@ -1334,7 +1343,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
                 --toolpath $(objtree)/tools \
                $(if $(BINMAN_VERBOSE),-v$(BINMAN_VERBOSE)) \
                build -u -d u-boot.dtb -O . -m \
-               $(if $(BINMAN_ALLOW_MISSING),--allow-missing --ignore-missing) \
+               --allow-missing $(if $(BINMAN_ALLOW_MISSING),--ignore-missing) \
                -I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
                -I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \
                $(foreach f,$(BINMAN_INDIRS),-I $(f)) \
@@ -1358,14 +1367,6 @@ OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
 u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
        $(call if_changed,objcopy)
 
-#
-# U-Boot entry point, needed for booting of full-blown U-Boot
-# from the SPL U-Boot version.
-#
-ifndef CFG_SYS_UBOOT_START
-CFG_SYS_UBOOT_START := $(CONFIG_TEXT_BASE)
-endif
-
 # Boards with more complex image requirements can provide an .its source file
 # or a generator script
 # NOTE: Please do not use this. We are migrating away from Makefile rules to use
@@ -1385,7 +1386,7 @@ endif
 
 ifdef CONFIG_SPL_LOAD_FIT
 MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
-       -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
+       -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
        -p $(CONFIG_FIT_EXTERNAL_OFFSET) \
        -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
        $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(DEVICE_TREE))) \
@@ -1393,10 +1394,10 @@ MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
        $(patsubst %,-b arch/$(ARCH)/dts/%.dtbo,$(subst ",,$(CONFIG_OF_OVERLAY_LIST)))
 else
 MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
-       -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
+       -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
        -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
 MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \
-       -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
+       -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
        -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
 u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
 endif
@@ -1427,7 +1428,7 @@ MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
 UBOOT_BIN := u-boot.bin
 
 MKIMAGEFLAGS_u-boot-lzma.img = -A $(ARCH) -T standalone -C lzma -O u-boot \
-       -a $(CONFIG_TEXT_BASE) -e $(CFG_SYS_UBOOT_START) \
+       -a $(CONFIG_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
        -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
 
 u-boot.bin.lzma: u-boot.bin FORCE
@@ -1830,7 +1831,7 @@ quiet_cmd_envc = ENVC    $@
                touch $@ ; \
        fi
 
-include/generated/env.txt: $(wildcard $(ENV_FILE))
+include/generated/env.txt: $(wildcard $(ENV_FILE)) include/generated/autoconf.h
        $(call cmd,envc)
 
 # Write out the resulting environment, converted to a C string
@@ -2155,16 +2156,16 @@ CLEAN_DIRS  += $(MODVERDIR) \
               $(foreach d, spl tpl vpl, $(patsubst %,$d/%, \
                        $(filter-out include, $(shell ls -1 $d 2>/dev/null))))
 
-CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \
-              include/generated/env.* drivers/video/u_boot_logo.S \
+CLEAN_FILES += include/autoconf.mk* include/bmp_logo.h include/bmp_logo_data.h \
+              include/config.h include/generated/env.* drivers/video/u_boot_logo.S \
               tools/version.h u-boot* MLO* SPL System.map fit-dtb.blob* \
               u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \
               lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \
               idbloader.img flash.bin flash.log defconfig keep-syms-lto.c \
               mkimage-out.spl.mkimage mkimage.spl.mkimage imx-boot.map \
               itb.fit.fit itb.fit.itb itb.map spl.map mkimage-out.rom.mkimage \
-              mkimage.rom.mkimage rom.map simple-bin.map simple-bin-spi.map \
-              idbloader-spi.img lib/efi_loader/helloworld_efi.S
+              mkimage.rom.mkimage mkimage-in-simple-bin* rom.map simple-bin* \
+              idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include/generated spl tpl vpl \
@@ -2444,9 +2445,9 @@ quiet_cmd_genenv = GENENV  $@
 cmd_genenv = \
        $(objtree)/tools/printinitialenv | \
        sed -e '/^\s*$$/d' | \
-       sort --field-separator== -k1,1 --stable -o $@
+       sort -t '=' -k 1,1 -s -o $@
 
-u-boot-initial-env: $(env_h) FORCE
+u-boot-initial-env: scripts_basic $(env_h) FORCE
        $(Q)$(MAKE) $(build)=tools $(objtree)/tools/printinitialenv
        $(call if_changed,genenv)