Lines Matching +full:09 +full:- +full:release

2 # SPDX-License-Identifier:	GPL-2.0+
6 PATCHLEVEL = 09
17 # o Do not use make's built-in rules and variables
18 # (this increases performance and avoids hard-to-debug behaviour);
20 MAKEFLAGS += -rR --include-dir=$(CURDIR)
34 # Most importantly: sub-Makefiles should only ever modify files in
37 # unavoidable when linking the built-in.o targets which finally
48 # ---------------------------------------------------------------------------
55 # cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
62 # A simple variant is to prefix commands with $(Q) - that's useful
63 # for commands that shall be hidden in non-verbose mode.
95 # If the user is running make -s (silent mode), suppress echoing of
98 ifneq ($(filter 4.%,$(MAKE_VERSION)),) # make-4
102 else # make-3.8x
103 ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
145 saved-output := $(KBUILD_OUTPUT)
146 KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
149 $(error failed to create output directory "$(saved-output)"))
151 PHONY += $(MAKECMDGOALS) sub-make
153 $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
156 sub-make: FORCE
157 $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
158 -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
161 skip-makefile := 1
166 ifeq ($(skip-makefile),)
171 MAKEFLAGS += --no-print-directory
176 # Use 'make C=1' to enable checking of only re-compiled files.
178 # of whether they are re-compiled or not.
234 HOSTARCH := $(shell uname -m | \
235 sed -e s/i.86/x86/ \
236 -e s/sun4u/sparc64/ \
237 -e s/arm.*/arm/ \
238 -e s/sa110/arm/ \
239 -e s/ppc64/powerpc/ \
240 -e s/ppc/powerpc/ \
241 -e s/macppc/powerpc/\
242 -e s/sh.*/sh/)
244 HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \
245 sed -e 's/\(cygwin\).*/cygwin/')
260 CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
261 else if [ -x /bin/bash ]; then echo /bin/bash; \
266 HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
267 $(if $(CONFIG_TOOLS_DEBUG),-g)
268 HOSTCXXFLAGS = -O2
271 HOSTCFLAGS += -ansi
276 # and use GNU C's cpp. To do this we pass the -traditional-cpp
277 # option to the compiler. Note that the -traditional-cpp flag
283 # -multiply_defined suppress option to turn off this error.
287 DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.')
288 DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.')
290 os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \
291 $(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;)
295 HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp")
296 HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress")
301 HOSTLDFLAGS += $(call os_x_before, 10, 7, "", "-Xlinker -no_pie")
304 # Decide whether to build built-in, modular, or both.
305 # Normally, just do built-in.
310 # If we have only "make modules", don't compile built-in objects.
312 # the built-in objects during the descend as well, in order to
323 # U-Boot does not need modules
343 ifneq ($(shell $(CROSS_COMPILE)ld.bfd -v 2> /dev/null),)
349 CPP = $(CC) -E
362 CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
363 -Wbitwise -Wno-return-void -D__CHECK_ENDIAN__ $(CF)
365 KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
367 KBUILD_CFLAGS := -Wall -Wstrict-prototypes \
368 -Wno-format-security \
369 -fno-builtin -ffreestanding
370 KBUILD_CFLAGS += -fshort-wchar -Werror
371 KBUILD_AFLAGS := -D__ASSEMBLY__
373 # Read UBOOTRELEASE from include/config/uboot.release (if it exists)
374 UBOOTRELEASE = $(shell cat include/config/uboot.release 2> /dev/null)
387 # When compiling out-of-tree modules, put MODVERDIR in the module
389 # even be read-only.
394 export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \
395 -name CVS -o -name .pc -o -name .hg -o -name .git \) \
396 -prune -o
397 export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
398 --exclude CVS --exclude .pc --exclude .hg --exclude .git
407 $(Q)rm -f .tmp_quiet_recordmcount
418 $(Q)ln -fsn $(srctree) source
434 no-dot-config-targets := clean clobber mrproper distclean \
438 config-targets := 0
439 mixed-targets := 0
440 dot-config := 1
442 ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
443 ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
444 dot-config := 0
450 config-targets := 1
452 mixed-targets := 1
457 ifeq ($(mixed-targets),1)
464 $(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one
468 $(Q)set -e; \
470 $(MAKE) -f $(srctree)/Makefile $$i; \
474 ifeq ($(config-targets),1)
476 # *config targets only - make sure prerequisites are updated, and descend
490 # Build targets only - this includes vmlinux, arch specific targets, clean
500 ifeq ($(dot-config),1)
502 -include include/config/auto.conf
506 -include include/config/auto.conf.cmd
516 $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
518 @# deleted so "make silentoldconfig" will be re-run on the next build.
519 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.autoconf || \
520 { rm -f include/config/auto.conf; false; }
527 u-boot.cfg spl/u-boot.cfg tpl/u-boot.cfg: include/config.h FORCE
528 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.autoconf $(@)
530 -include include/autoconf.mk
531 -include include/autoconf.mk.dep
534 # is up-to-date. When we switch to a different board configuration, old CONFIG
539 autoconf_is_old := $(shell find . -path ./$(KCONFIG_CONFIG) -newer \
548 # These are set by the arch-specific config.mk. Make sure they are exported
562 #LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds.debug
572 LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds
575 LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot.lds
578 LDSCRIPT := $(srctree)/arch/$(ARCH)/cpu/u-boot.lds
585 endif # $(dot-config)
588 # Xtensa linker script cannot be preprocessed with -ansi because of
592 LDPPFLAGS += -ansi
596 KBUILD_CFLAGS += -Os
598 KBUILD_CFLAGS += -O2
601 KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
602 KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks)
604 KBUILD_CFLAGS += -g
605 # $(KBUILD_AFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
607 KBUILD_AFLAGS += -g
610 ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-stack-usage.sh $(CC)),y)
611 KBUILD_CFLAGS += -fstack-usage
614 KBUILD_CFLAGS += $(call cc-option,-Wno-format-nonliteral)
615 KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
619 ifeq ($(findstring 3.4,$(shell $(CC) --version)),3.4)
620 KBUILD_AFLAGS += -Wa,-gstabs,-S
624 # Prohibit date/time macros, which would make the build non-deterministic
625 KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)
637 -Iinclude \
638 $(if $(KBUILD_SRC), -I$(srctree)/include) \
641 -I$(srctree)/arch/$(ARCH)/thumb1/include),) \
642 -I$(srctree)/arch/$(ARCH)/include \
643 -include $(srctree)/include/linux/kconfig.h
645 NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
654 # U-Boot objects....order is important (i.e. start must be first)
658 libs-y += lib/
659 libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
660 libs-$(CONFIG_OF_EMBED) += dts/
662 libs-y += fs/
663 libs-y += net/
664 libs-y += disk/
665 libs-y += drivers/
666 libs-y += drivers/cpu/
667 libs-y += drivers/dma/
668 libs-y += drivers/gpio/
669 libs-y += drivers/i2c/
670 libs-y += drivers/mtd/
671 libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/raw/
672 libs-y += drivers/mtd/onenand/
673 libs-$(CONFIG_CMD_UBI) += drivers/mtd/ubi/
674 libs-y += drivers/mtd/spi/
675 libs-y += drivers/net/
676 libs-y += drivers/net/phy/
677 libs-y += drivers/pci/
678 libs-y += drivers/power/ \
686 drivers/power/io-domain/ \
688 libs-y += drivers/spi/
689 libs-$(CONFIG_FMAN_ENET) += drivers/net/fm/
690 libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/
691 libs-$(CONFIG_SYS_FSL_MMDC) += drivers/ddr/fsl/
692 libs-$(CONFIG_ALTERA_SDRAM) += drivers/ddr/altera/
693 libs-y += drivers/serial/
694 libs-y += drivers/usb/cdns3/
695 libs-y += drivers/usb/dwc3/
696 libs-y += drivers/usb/common/
697 libs-y += drivers/usb/emul/
698 libs-y += drivers/usb/eth/
699 libs-y += drivers/usb/gadget/
700 libs-y += drivers/usb/gadget/udc/
701 libs-y += drivers/usb/host/
702 libs-y += drivers/usb/musb/
703 libs-y += drivers/usb/musb-new/
704 libs-y += drivers/usb/phy/
705 libs-y += drivers/usb/ulpi/
706 libs-y += cmd/
707 libs-y += common/
708 libs-y += env/
709 libs-$(CONFIG_API) += api/
710 libs-$(CONFIG_HAS_POST) += post/
712 libs-y += test/
713 libs-y += test/dm/
714 libs-$(CONFIG_UT_ENV) += test/env/
715 libs-$(CONFIG_UT_OVERLAY) += test/overlay/
717 libs-y += $(if $(BOARDDIR),board/$(BOARDDIR)/)
719 libs-y := $(sort $(libs-y))
721 u-boot-dirs := $(patsubst %/,%,$(filter %/, $(libs-y))) tools examples
723 u-boot-alldirs := $(sort $(u-boot-dirs) $(patsubst %/,%,$(filter %/, $(libs-))))
725 libs-y := $(patsubst %/, %/built-in.o, $(libs-y))
727 u-boot-init := $(head-y)
728 u-boot-main := $(libs-y)
735 PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc
745 -include $(srctree)/include/u-boot/u-boot.lds.h \
746 -DCPUDIR=$(CPUDIR) \
747 $(shell $(LD) --version | \
748 sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
755 @actual=`wc -c $@ | awk '{print $$1}'`; \
757 if test $$actual -gt $$limit; then \
761 echo " excess: $$((actual - limit)) bytes" >&2; \
768 # Statically apply RELA-style relocations (currently arm64 only)
773 # $(1) is u-boot ELF, $(2) is u-boot bin, $(3) is text base
775 start=$$($(NM) $(1) | grep __rel_dyn_start | cut -f 1 -d ' '); \
776 end=$$($(NM) $(1) | grep __rel_dyn_end | cut -f 1 -d ' '); \
777 tools/relocate-rela $(2) $(3) $$start $$end
783 ALL-y += u-boot.srec u-boot.bin u-boot.sym System.map binary_size_check
784 ALL-$(CONFIG_SUPPORT_USBPLUG) += usbplug.bin
786 ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin
788 ALL-$(CONFIG_RAMBOOT_PBL) += u-boot-with-spl-pbl.bin
793 ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl
796 ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin
798 ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot-ivt.img
800 ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img
802 ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin
803 ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb
805 ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb.img
807 ALL-$(CONFIG_OF_HOSTFILE) += u-boot.dtb
809 ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%)
811 ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf
812 ALL-$(CONFIG_EFI_APP) += u-boot-app.efi
813 ALL-$(CONFIG_EFI_STUB) += u-boot-payload.efi
816 ALL-$(CONFIG_X86_RESET_VECTOR) += u-boot.rom
819 # enable combined SPL/u-boot/dtb rules for tegra
821 ALL-y += u-boot-tegra.bin u-boot-nodtb-tegra.bin
822 ALL-$(CONFIG_OF_SEPARATE) += u-boot-dtb-tegra.bin
827 ALL-y += $(CONFIG_BUILD_TARGET:"%"=%)
830 LDFLAGS_u-boot += $(LDFLAGS_FINAL)
833 LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker)
836 LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
841 cmd_objcopy = $(OBJCOPY) --gap-fill=0xff $(OBJCOPYFLAGS) \
849 cmd_efipayload = $(OBJCOPY) -I binary -O $(EFIPAYLOAD_BFDTARGET) -B $(EFIPAYLOAD_BFDARCH) $< $@
854 cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \
858 cmd_mkfitimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -f $(U_BOOT_ITS) -E $@ \
862 cmd_cat = cat $(filter-out $(PHONY), $^) > $@
864 append = cat $(filter-out $< $(PHONY), $^) >> $@
867 cmd_pad_cat = $(cmd_objcopy) && $(append) || rm -f $@
869 cfg: u-boot.cfg
872 cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \
875 all: $(ALL-y) cfg
886 $(call cmd,cfgcheck,u-boot.cfg)
891 dts/dt.dtb: u-boot
898 cmd_truncate = truncate -s "%8" $@
902 fit-dtb.blob: dts/dt.dtb FORCE
905 MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
906 -a 0 -e 0 -E \
907 $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null
909 u-boot-fit-dtb.bin: u-boot-nodtb.bin fit-dtb.blob
912 u-boot.bin: u-boot-fit-dtb.bin FORCE
916 u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE
921 u-boot-dtb-kern.bin: u-boot-dtb.bin FORCE
924 u-boot.bin: u-boot-dtb-kern.bin $(EMBED_KERN_DTB) FORCE
927 u-boot.bin: u-boot-dtb.bin FORCE
933 u-boot.bin: u-boot-nodtb.bin FORCE
938 usbplug.bin: u-boot.bin
943 $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
951 u-boot.dtb: dts/dt.dtb FORCE
954 OBJCOPYFLAGS_u-boot.hex := -O ihex
956 OBJCOPYFLAGS_u-boot.srec := -O srec
958 u-boot.hex u-boot.srec: u-boot FORCE
961 OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \
962 $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec)
964 binary_size_check: u-boot-nodtb.bin FORCE
965 @file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \
966 map_size=$(shell cat u-boot.map | \
967 … = $$1} END {if (start != "" && end != "") print "ibase=16; " toupper(end) " - " toupper(start)}' \
971 if test $$map_size -ne $$file_size; then \
972 echo "u-boot.map shows a binary size of $$map_size" >&2 ; \
973 echo " but u-boot-nodtb.bin shows $$file_size" >&2 ; \
978 u-boot-nodtb.bin: u-boot FORCE
983 u-boot.ldr: u-boot
985 $(LDR) -T $(CONFIG_CPU) -c $@ $< $(LDR_FLAGS)
989 # ---------------------------------------------------------------------------
991 cmd_binman = $(srctree)/tools/binman/binman -d u-boot.dtb -O . \
992 -I . -I $(srctree)/board/$(BOARDDIR) $<
994 OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex
996 OBJCOPYFLAGS_u-boot.ldr.srec := -I binary -O srec
998 u-boot.ldr.hex u-boot.ldr.srec: u-boot.ldr FORCE
1002 # U-Boot entry point, needed for booting of full-blown U-Boot
1003 # from the SPL U-Boot version.
1011 cmd_cpp_cfg = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) -ansi \
1012 -DDO_DEPS_ONLY -D__ASSEMBLY__ -x assembler-with-cpp -P -dM -E -o $@ $<
1020 U_BOOT_ITS := u-boot.its
1028 MKIMAGEFLAGS_u-boot.img = -f auto -A $(ARCH) -T firmware -C none -O u-boot \
1029 -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
1030 -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board" -E \
1031 $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST)))
1033 MKIMAGEFLAGS_u-boot.img = -A $(ARCH) -T firmware -C none -O u-boot \
1034 -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
1035 -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
1036 MKIMAGEFLAGS_u-boot-ivt.img = -A $(ARCH) -T firmware_ivt -C none -O u-boot \
1037 -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_UBOOT_START) \
1038 -n "U-Boot $(UBOOTRELEASE) for $(BOARD) board"
1039 u-boot-ivt.img: MKIMAGEOUTPUT = u-boot-ivt.img.log
1040 CLEAN_FILES += u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log
1043 MKIMAGEFLAGS_u-boot-dtb.img = $(MKIMAGEFLAGS_u-boot.img)
1045 MKIMAGEFLAGS_u-boot.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \
1046 -T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE)
1048 MKIMAGEFLAGS_u-boot-spl.kwb = -n $(srctree)/$(CONFIG_SYS_KWD_CONFIG:"%"=%) \
1049 -T kwbimage -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) \
1050 $(if $(KEYDIR),-k $(KEYDIR))
1052 MKIMAGEFLAGS_u-boot.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
1053 -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage
1055 u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \
1056 $(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,u-boot.bin) FORCE
1059 u-boot.itb: u-boot-nodtb.bin dts/dt.dtb $(U_BOOT_ITS) FORCE
1062 u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE
1065 u-boot.sha1: u-boot.bin
1066 tools/ubsha1 u-boot.bin
1068 u-boot.dis: u-boot
1069 $(OBJDUMP) -d $< > $@
1072 SPL_PAYLOAD := tpl/u-boot-with-tpl.bin
1074 SPL_PAYLOAD := u-boot.bin
1077 OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
1078 --pad-to=$(CONFIG_SPL_PAD_TO)
1079 u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) FORCE
1082 MKIMAGEFLAGS_lpc32xx-spl.img = -T lpc32xximage -a $(CONFIG_SPL_TEXT_BASE)
1084 lpc32xx-spl.img: spl/u-boot-spl.bin FORCE
1087 OBJCOPYFLAGS_lpc32xx-boot-0.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO)
1089 lpc32xx-boot-0.bin: lpc32xx-spl.img FORCE
1092 OBJCOPYFLAGS_lpc32xx-boot-1.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO)
1094 lpc32xx-boot-1.bin: lpc32xx-spl.img FORCE
1097 lpc32xx-full.bin: lpc32xx-boot-0.bin lpc32xx-boot-1.bin u-boot.img FORCE
1100 CLEAN_FILES += lpc32xx-*
1102 OBJCOPYFLAGS_u-boot-with-tpl.bin = -I binary -O binary \
1103 --pad-to=$(CONFIG_TPL_PAD_TO)
1104 tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin FORCE
1107 SPL: spl/u-boot-spl.bin FORCE
1108 $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
1110 u-boot-with-spl.imx u-boot-with-nand-spl.imx: SPL u-boot.bin FORCE
1111 $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@
1113 MKIMAGEFLAGS_u-boot.ubl = -n $(UBL_CONFIG) -T ublimage -e $(CONFIG_SYS_TEXT_BASE)
1115 u-boot.ubl: u-boot-with-spl.bin FORCE
1118 MKIMAGEFLAGS_u-boot-spl.ais = -s -n $(if $(CONFIG_AIS_CONFIG_FILE), \
1120 -T aisimage -e $(CONFIG_SPL_TEXT_BASE)
1121 spl/u-boot-spl.ais: spl/u-boot-spl.bin FORCE
1124 OBJCOPYFLAGS_u-boot.ais = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO)
1125 u-boot.ais: spl/u-boot-spl.ais u-boot.img FORCE
1128 u-boot-signed.sb: u-boot.bin spl/u-boot-spl.bin
1129 $(Q)$(MAKE) $(build)=arch/arm/cpu/arm926ejs/mxs u-boot-signed.sb
1130 u-boot.sb: u-boot.bin spl/u-boot-spl.bin
1131 $(Q)$(MAKE) $(build)=arch/arm/cpu/arm926ejs/mxs u-boot.sb
1133 # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL.
1138 # The resulting image containing both U-Boot images is called u-boot.spr
1139 MKIMAGEFLAGS_u-boot-spl.img = -A $(ARCH) -T firmware -C none \
1140 -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n XLOADER
1141 spl/u-boot-spl.img: spl/u-boot-spl.bin FORCE
1144 OBJCOPYFLAGS_u-boot.spr = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \
1145 --gap-fill=0xff
1146 u-boot.spr: spl/u-boot-spl.img u-boot.img FORCE
1151 cmd_socboot = cat spl/u-boot-spl.sfp spl/u-boot-spl.sfp \
1152 spl/u-boot-spl.sfp spl/u-boot-spl.sfp \
1153 u-boot.img > $@ || rm -f $@
1154 u-boot-with-spl.sfp: spl/u-boot-spl.sfp u-boot.img FORCE
1158 # x86 uses a large ROM. We fill it with 0xff, put the 16-bit stuff (including
1159 # reset vector) at the top, Intel ME descriptor at the bottom, and U-Boot in
1163 rom: u-boot.rom FORCE
1170 $(filter-out FORCE,$^) -o $@
1172 u-boot.rom: u-boot-x86-16bit.bin u-boot.bin \
1173 $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
1177 OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec
1178 u-boot-x86-16bit.bin: u-boot FORCE
1183 u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
1188 OBJCOPYFLAGS_u-boot-nodtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)
1189 u-boot-nodtb-tegra.bin: spl/u-boot-spl u-boot-nodtb.bin FORCE
1192 OBJCOPYFLAGS_u-boot-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)
1193 u-boot-tegra.bin: spl/u-boot-spl u-boot.bin FORCE
1196 u-boot-dtb-tegra.bin: u-boot-tegra.bin FORCE
1200 OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI)
1201 u-boot-app.efi: u-boot FORCE
1204 u-boot.bin.o: u-boot.bin FORCE
1207 u-boot-payload.lds: $(LDSCRIPT_EFI) FORCE
1210 # Rule to link the EFI payload which contains a stub and a U-Boot binary
1211 quiet_cmd_u-boot_payload ?= LD $@
1212 cmd_u-boot_payload ?= $(LD) $(LDFLAGS_EFI_PAYLOAD) -o $@ \
1213 -T u-boot-payload.lds arch/x86/cpu/call32.o \
1214 lib/efi/efi.o lib/efi/efi_stub.o u-boot.bin.o \
1217 u-boot-payload: u-boot.bin.o u-boot-payload.lds FORCE
1218 $(call if_changed,u-boot_payload)
1220 OBJCOPYFLAGS_u-boot-payload.efi := $(OBJCOPYFLAGS_EFI)
1221 u-boot-payload.efi: u-boot-payload FORCE
1224 u-boot-img.bin: spl/u-boot-spl.bin u-boot.img FORCE
1228 #concatenated with u-boot binary. It is need by PowerPC SoC having
1230 MKIMAGEFLAGS_u-boot-spl.pbl = -n $(srctree)/$(CONFIG_SYS_FSL_PBL_RCW:"%"=%) \
1231 -R $(srctree)/$(CONFIG_SYS_FSL_PBL_PBI:"%"=%) -T pblimage \
1232 -A $(ARCH) -a $(CONFIG_SPL_TEXT_BASE)
1234 spl/u-boot-spl.pbl: spl/u-boot-spl.bin FORCE
1238 UBOOT_BINLOAD := u-boot.img
1240 UBOOT_BINLOAD := u-boot.bin
1243 OBJCOPYFLAGS_u-boot-with-spl-pbl.bin = -I binary -O binary --pad-to=$(CONFIG_SPL_PAD_TO) \
1244 --gap-fill=0xff
1246 u-boot-with-spl-pbl.bin: spl/u-boot-spl.pbl $(UBOOT_BINLOAD) FORCE
1250 # is located at 0xfffffffc. So we can't use the "u-boot-img.bin" target
1251 # and need to introduce a new build target with the full blown U-Boot
1255 OBJCOPYFLAGS_u-boot-img-spl-at-end.bin := -I binary -O binary \
1256 --pad-to=$(CONFIG_UBOOT_PAD_TO) --gap-fill=0xff
1257 u-boot-img-spl-at-end.bin: u-boot.img spl/u-boot-spl.bin FORCE
1264 quiet_cmd_u-boot-elf ?= LD $@
1265 cmd_u-boot-elf ?= $(LD) u-boot-elf.o -o $@ \
1266 --defsym=$(PLATFORM_ELFENTRY)=$(CONFIG_SYS_TEXT_BASE) \
1267 -Ttext=$(CONFIG_SYS_TEXT_BASE)
1268 u-boot.elf: u-boot.bin
1269 $(Q)$(OBJCOPY) -I binary $(PLATFORM_ELFFLAGS) $< u-boot-elf.o
1270 $(call if_changed,u-boot-elf)
1274 # Rule to link u-boot
1276 quiet_cmd_u-boot__ ?= LD $@
1277 cmd_u-boot__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_u-boot) -o $@ \
1278 -T u-boot.lds $(u-boot-init) \
1279 --start-group $(u-boot-main) --end-group \
1280 $(PLATFORM_LIBS) -Map u-boot.map; \
1281 $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
1285 smap=`$(call SYSTEM_MAP,u-boot) | \
1287 $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \
1288 -c $(srctree)/common/system_map.c -o common/system_map.o
1290 u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds FORCE
1291 +$(call if_changed,u-boot__)
1294 $(call cmd,u-boot__) common/system_map.o
1298 cmd_sym ?= $(OBJDUMP) -t $< > $@
1299 u-boot.sym: u-boot FORCE
1304 $(sort $(u-boot-init) $(u-boot-main)): $(u-boot-dirs) ;
1306 # Handle descending into subdirectories listed in $(vmlinux-dirs)
1312 PHONY += $(u-boot-dirs)
1313 $(u-boot-dirs): prepare scripts
1318 $(filter-out tools, $(u-boot-dirs)): tools
1319 # The "examples" conditionally depend on U-Boot (say, when USE_PRIVATE_LIBGCC
1320 # is "yes"), so compile examples after U-Boot is compiled.
1321 examples: $(filter-out examples, $(u-boot-dirs))
1323 define filechk_uboot.release
1327 # Store (new) UBOOTRELEASE string in include/config/uboot.release
1328 include/config/uboot.release: include/config/auto.conf FORCE
1329 $(call filechk,uboot.release)
1334 # A multi level approach is used. prepareN is processed before prepareN-1.
1344 prepare3: include/config/uboot.release
1346 @$(kecho) ' Using $(srctree) as source for U-Boot'
1347 $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
1373 # ---------------------------------------------------------------------------
1378 echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; \
1379 if [ -n "$(PLAT_SPL_FW_VERSION)" ]; then \
1382 if [ -n "$(PLAT_FW_VERSION)" ]; then \
1385 echo \#define CC_VERSION_STRING \"$$(LC_ALL=C $(CC) --version | head -n 1)\"; \
1386 echo \#define LD_VERSION_STRING \"$$(LC_ALL=C $(LD) --version | head -n 1)\"; )
1391 echo \#define U_BOOT_VERSION \"USB-PLUG \" PLAIN_VERSION; \
1392 if [ -n "$(PLAT_SPL_FW_VERSION)" ]; then \
1395 if [ -n "$(PLAT_FW_VERSION)" ]; then \
1398 echo \#define CC_VERSION_STRING \"$$(LC_ALL=C $(CC) --version | head -n 1)\"; \
1399 echo \#define LD_VERSION_STRING \"$$(LC_ALL=C $(LD) --version | head -n 1)\"; )
1405 # with the misused '-d' switch. Respect that and search a working date with
1406 # well known pre- and suffixes for the GNU variant of date.
1408 (if test -n "$${SOURCE_DATE_EPOCH}"; then \
1412 $${date} -u -d "$${SOURCE_DATE}" >/dev/null 2>&1 && DATE="$${date}"; \
1414 if test -n "$${DATE}"; then \
1415 LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DATE "%b %d %C%y"'; \
1416 LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TIME "%T"'; \
1417 LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_TZ "%z"'; \
1418 LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_DMI_DATE "%m/%d/%Y"'; \
1419 LC_ALL=C $${DATE} -u -d "$${SOURCE_DATE}" +'#define U_BOOT_BUILD_DATE 0x%Y%m%d'; \
1432 $(version_h): include/config/uboot.release FORCE
1438 # ---------------------------------------------------------------------------
1440 cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) \
1441 -D__ASSEMBLY__ -x assembler-with-cpp -P -o $@ $<
1443 u-boot.lds: $(LDSCRIPT) prepare FORCE
1446 spl/u-boot-spl.bin: spl/u-boot-spl
1448 spl/u-boot-spl: tools prepare \
1451 $(Q)$(MAKE) obj=spl -f $(srctree)/scripts/Makefile.spl all
1453 spl/sunxi-spl.bin: spl/u-boot-spl
1456 spl/sunxi-spl-with-ecc.bin: spl/sunxi-spl.bin
1459 spl/u-boot-spl.sfp: spl/u-boot-spl
1462 spl/boot.bin: spl/u-boot-spl
1465 tpl/u-boot-tpl.bin: tools prepare \
1467 $(Q)$(MAKE) obj=tpl -f $(srctree)/scripts/Makefile.spl all
1469 TAG_SUBDIRS := $(patsubst %,$(srctree)/%,$(u-boot-dirs) include)
1472 FINDFLAGS := -L
1475 ctags -w -o ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \
1476 -name '*.[chS]' -print`
1477 ln -s ctags tags
1480 etags -a -o etags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \
1481 -name '*.[chS]' -print`
1483 $(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) -name '*.[chS]' -print > \
1485 cscope -b -q -k
1489 grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
1491 System.map: u-boot
1496 # ARM relocations should all be R_ARM_RELATIVE (32-bit) or
1497 # R_AARCH64_RELATIVE (64-bit).
1498 checkarmreloc: u-boot
1499 @RELOC="`$(CROSS_COMPILE)readelf -r -W $< | cut -d ' ' -f 4 | \
1500 grep R_A | sort -u`"; \
1501 if test "$$RELOC" != "R_ARM_RELATIVE" -a \
1510 tools-only: scripts_basic $(version_h) $(timestamp_h)
1513 tools-all: export HOST_TOOLS_ALL=y
1514 tools-all: envtools tools ;
1521 git log --no-merges U-Boot-1_1_5.. | \
1522 unexpand -a | sed -e 's/\s\s*$$//' > $@
1536 $(filter-out include, $(shell ls -1 $d 2>/dev/null))))
1539 boot* u-boot* MLO* SPL System.map fit-dtb.blob *.bin *.img *.gz .cc
1547 # clean - Delete most, but leave enough to build external modules
1549 clean: rm-dirs := $(CLEAN_DIRS)
1550 clean: rm-files := $(CLEAN_FILES)
1552 clean-dirs := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $(srctree)/$f/Makefile),$f))
1554 clean-dirs := $(addprefix _clean_, $(clean-dirs) doc/DocBook)
1556 PHONY += $(clean-dirs) clean archclean
1557 $(clean-dirs):
1561 clean: $(clean-dirs)
1565 \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
1566 -o -name '*.ko.*' -o -name '*.su' -o -name '*.cfgtmp' \
1567 -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
1568 -o -name '*.symtypes' -o -name 'modules.order' \
1569 -o -name modules.builtin -o -name '.tmp_*.o.*' \
1570 -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \
1571 -o -name '*.gcno' \) -type f -print | xargs rm -f
1573 # mrproper - Delete all generated files, including .config
1575 mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
1576 mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
1577 mrproper-dirs := $(addprefix _mrproper_,scripts)
1579 PHONY += $(mrproper-dirs) mrproper archmrproper
1580 $(mrproper-dirs):
1583 mrproper: clean $(mrproper-dirs)
1586 @rm -f arch/*/include/asm/arch
1594 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
1595 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
1596 -o -name '.*.rej' -o -name '*%' -o -name 'core' \
1597 -o -name '*.pyc' \) \
1598 -type f -print | xargs rm -f
1599 @rm -f boards.cfg
1603 gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
1607 @echo ' clean - Remove most generated files but keep the config'
1608 @echo ' mrproper - Remove all generated files + config + various backup files'
1609 @echo ' distclean - mrproper + remove editor backup and patch files'
1612 @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help
1615 @echo ' all - Build all necessary images depending on configuration'
1616 @echo ' tests - Build U-Boot for sandbox and run tests'
1617 @echo '* u-boot - Build the bare u-boot'
1618 @echo ' dir/ - Build all files in dir and below'
1619 @echo ' dir/file.[oisS] - Build specified target only'
1620 @echo ' dir/file.lst - Build specified mixed source/assembly target only'
1622 @echo ' tags/ctags - Generate ctags file for editors'
1623 @echo ' etags - Generate etags file for editors'
1624 @echo ' cscope - Generate cscope index'
1625 @echo ' ubootrelease - Output the release version string (use with make -s)'
1626 @echo ' ubootversion - Output the version stored in Makefile (use with make -s)'
1627 @echo " cfg - Don't build, just create the .cfg files"
1628 @echo " envtools - Build only the target-side environment tools"
1631 @echo ' checkstack - Generate a list of stack hogs'
1634 @$(MAKE) -f $(srctree)/doc/DocBook/Makefile dochelp
1655 # ---------------------------------------------------------------------------
1660 endif #ifeq ($(config-targets),1)
1661 endif #ifeq ($(mixed-targets),1)
1666 $(OBJDUMP) -d u-boot $$(find . -name u-boot-spl) | \
1676 # ---------------------------------------------------------------------------
1678 # - build with mixed source and output
1679 # - build with separate output dir 'make O=...'
1680 # - external modules
1682 # target-dir => where to store outputfile
1683 # build-dir => directory in kernel source tree to use
1686 build-dir = $(patsubst %/,%,$(dir $@))
1687 target-dir = $(dir $@)
1689 zap-slash=$(filter-out .,$(patsubst %/,%,$(dir $@)))
1690 build-dir = $(KBUILD_EXTMOD)$(if $(zap-slash),/$(zap-slash))
1691 target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
1695 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
1697 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
1699 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
1701 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
1703 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
1705 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
1707 $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
1713 $(build)=$(build-dir)
1717 $(build)=$(build-dir)
1721 $(build)=$(build-dir) $(@:.ko=.o)
1722 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
1725 cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \
1726 sed --in-place -e 's/\x00/\x0A/g' $@
1728 u-boot-initial-env: u-boot.bin
1734 quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs)))
1735 cmd_rmdirs = rm -rf $(rm-dirs)
1737 quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)))
1738 cmd_rmfiles = rm -f $(rm-files)
1750 endif # skip-makefile