binman: doc: Remove incomplete sentence
[platform/kernel/u-boot.git] / Makefile
index 86e0730..9be24c4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: GPL-2.0+
 
 VERSION = 2023
-PATCHLEVEL = 04
+PATCHLEVEL = 10
 SUBLEVEL =
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc4
 NAME =
 
 # *DOCUMENTATION*
@@ -423,7 +423,8 @@ DTC_MIN_VERSION     := 010406
 CHECK          = sparse
 
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-                 -Wbitwise -Wno-return-void -D__CHECK_ENDIAN__ $(CF)
+                 -Wbitwise -Wno-return-void -Wno-unknown-attribute \
+                 -D__CHECK_ENDIAN__ $(CF)
 
 KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
 
@@ -437,6 +438,7 @@ KBUILD_LDFLAGS  :=
 ifeq ($(cc-name),clang)
 ifneq ($(CROSS_COMPILE),)
 CLANG_TARGET   := --target=$(notdir $(CROSS_COMPILE:%-=%))
+LDPPFLAGS      += $(CLANG_TARGET)
 GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
 CLANG_PREFIX   := --prefix=$(GCC_TOOLCHAIN_DIR)
 GCC_TOOLCHAIN  := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
@@ -522,7 +524,7 @@ env_h := include/generated/environment.h
 no-dot-config-targets := clean clobber mrproper distclean \
                         help %docs check% coccicheck \
                         ubootversion backup tests check pcheck qcheck tcheck \
-                        pylint pylint_err
+                        pylint pylint_err _pip pip pip_test pip_release
 
 config-targets := 0
 mixed-targets  := 0
@@ -790,6 +792,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
 # See modpost pattern 2
 KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
 KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
+KBUILD_CFLAGS += $(call cc-disable-warning, deprecated-non-prototype)
 endif
 
 # These warnings generated too much noise in a regular build.
@@ -806,6 +809,7 @@ KBUILD_CPPFLAGS += $(KCPPFLAGS)
 KBUILD_AFLAGS += $(KAFLAGS)
 KBUILD_CFLAGS += $(KCFLAGS)
 
+KBUILD_LDFLAGS  += -z noexecstack
 KBUILD_LDFLAGS  += $(call ld-option,--no-warn-rwx-segments)
 
 KBUILD_HOSTCFLAGS += $(if $(CONFIG_TOOLS_DEBUG),-g)
@@ -891,8 +895,10 @@ u-boot-main := $(libs-y)
 ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y)
 PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a
 else
+ifndef CONFIG_CC_IS_CLANG
 PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc
 endif
+endif
 PLATFORM_LIBS += $(PLATFORM_LIBGCC)
 
 ifdef CONFIG_CC_COVERAGE
@@ -956,7 +962,6 @@ endif
 # Always append INPUTS so that arch config.mk's can add custom ones
 INPUTS-y += u-boot.srec u-boot.bin u-boot.sym System.map binary_size_check
 
-INPUTS-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin
 ifeq ($(CONFIG_SPL_FSL_PBL),y)
 INPUTS-$(CONFIG_RAMBOOT_PBL) += u-boot-with-spl-pbl.bin
 else
@@ -1028,6 +1033,9 @@ ifeq ($(CONFIG_ARC)$(CONFIG_NIOS2)$(CONFIG_X86)$(CONFIG_XTENSA),)
 LDFLAGS_u-boot += -Ttext $(CONFIG_TEXT_BASE)
 endif
 
+# make the checker run with the right architecture
+CHECKFLAGS += --arch=$(ARCH)
+
 # insure the checker run with the right endianness
 CHECKFLAGS += $(if $(CONFIG_CPU_BIG_ENDIAN),-mbig-endian,-mlittle-endian)
 
@@ -1326,7 +1334,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)) \
@@ -1335,6 +1343,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
                -a opensbi-path=${OPENSBI} \
                -a default-dt=$(default_dt) \
                -a scp-path=$(SCP) \
+               -a rockchip-tpl-path=$(ROCKCHIP_TPL) \
                -a spl-bss-pad=$(if $(CONFIG_SPL_SEPARATE_BSS),,1) \
                -a tpl-bss-pad=$(if $(CONFIG_TPL_SEPARATE_BSS),,1) \
                -a spl-dtb=$(CONFIG_SPL_OF_REAL) \
@@ -1520,6 +1529,9 @@ endif
 u-boot.uim: u-boot.bin FORCE
        $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
 
+u-boot-nand.imx: u-boot.imx FORCE
+       $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
+
 u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL $(if $(CONFIG_OF_SEPARATE),u-boot.img,u-boot.uim) FORCE
        $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
 
@@ -1756,7 +1768,7 @@ ifeq ($(CONFIG_KALLSYMS),y)
 endif
 
 ifeq ($(CONFIG_RISCV),y)
-       @tools/prelink-riscv $@ 0
+       @tools/prelink-riscv $@
 endif
 
 quiet_cmd_sym ?= SYM     $@
@@ -1800,7 +1812,7 @@ quiet_cmd_gen_envp = ENVP    $@
                rm -f $@; \
                touch $@ ; \
        fi
-include/generated/env.in: include/generated/env.txt FORCE
+include/generated/env.in: include/generated/env.txt
        $(call cmd,gen_envp)
 
 # Regenerate the environment if it changes
@@ -1818,7 +1830,7 @@ quiet_cmd_envc = ENVC    $@
                touch $@ ; \
        fi
 
-include/generated/env.txt: $(wildcard $(ENV_FILE)) FORCE
+include/generated/env.txt: $(wildcard $(ENV_FILE))
        $(call cmd,envc)
 
 # Write out the resulting environment, converted to a C string
@@ -2111,7 +2123,7 @@ tools/version.h: include/version.h
        $(Q)mkdir -p $(dir $@)
        $(call if_changed,copy)
 
-envtools: scripts_basic $(version_h) $(timestamp_h) tools/version.h
+envtools: u-boot-initial-env scripts_basic $(version_h) $(timestamp_h) tools/version.h
        $(Q)$(MAKE) $(build)=tools/env
 
 tools-only: export TOOLS_ONLY=y
@@ -2140,7 +2152,7 @@ CHANGELOG:
 
 # Directories & files removed with 'make clean'
 CLEAN_DIRS  += $(MODVERDIR) \
-              $(foreach d, spl tpl, $(patsubst %,$d/%, \
+              $(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 \
@@ -2152,10 +2164,10 @@ CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \
               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
+              idbloader-spi.img lib/efi_loader/helloworld_efi.S
 
 # Directories & files removed with 'make mrproper'
-MRPROPER_DIRS  += include/config include/generated spl tpl \
+MRPROPER_DIRS  += include/config include/generated spl tpl vpl \
                  .tmp_objdiff doc/output include/asm
 
 # Remove include/asm symlink created by U-Boot before v2014.01
@@ -2272,6 +2284,21 @@ backup:
        F=`basename $(srctree)` ; cd .. ; \
        gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
 
+PHONY += _pip pip pip_release
+
+pip_release: PIP_ARGS="--real"
+pip_test: PIP_ARGS=""
+pip: PIP_ARGS="-n"
+
+pip pip_test pip_release: _pip
+
+_pip:
+       scripts/make_pip.sh u_boot_pylib ${PIP_ARGS}
+       scripts/make_pip.sh patman ${PIP_ARGS}
+       scripts/make_pip.sh buildman ${PIP_ARGS}
+       scripts/make_pip.sh dtoc ${PIP_ARGS}
+       scripts/make_pip.sh binman ${PIP_ARGS}
+
 help:
        @echo  'Cleaning targets:'
        @echo  '  clean           - Remove most generated files but keep the config'
@@ -2305,6 +2332,11 @@ help:
        @echo  "  cfg             - Don't build, just create the .cfg files"
        @echo  "  envtools        - Build only the target-side environment tools"
        @echo  ''
+       @echo  'PyPi / pip targets:'
+       @echo  '  pip             - Check building of PyPi packages'
+       @echo  '  pip_test        - Build PyPi pakages and upload to test server'
+       @echo  '  pip_release     - Build PyPi pakages and upload to release server'
+       @echo  ''
        @echo  'Static analysers'
        @echo  '  checkstack      - Generate a list of stack hogs'
        @echo  '  coccicheck      - Execute static code analysis with Coccinelle'
@@ -2412,7 +2444,7 @@ 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
        $(Q)$(MAKE) $(build)=tools $(objtree)/tools/printinitialenv