X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=Makefile;h=7e5fd23e7c3fdf554743b08e6b32afb09f3df621;hb=aa3fba9753d6def6a144054b0279588e1fdec573;hp=2824a6e159440c9475d76fdfcdf40915dfa03b80;hpb=dd758c6720266c9b7bcd8d0da91a64a2fa1e181a;p=platform%2Fkernel%2Fu-boot.git diff --git a/Makefile b/Makefile index 2824a6e..7e5fd23 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ # SPDX-License-Identifier: GPL-2.0+ VERSION = 2019 -PATCHLEVEL = 04 +PATCHLEVEL = 07 SUBLEVEL = -EXTRAVERSION = +EXTRAVERSION = -rc3 NAME = # *DOCUMENTATION* @@ -337,6 +337,19 @@ endif # KBUILD_MODULES := 1 #endif +define size_check + actual=$$( wc -c $1 | awk '{print $$1}'); \ + limit=$$( printf "%d" $2 ); \ + if test $$actual -gt $$limit; then \ + echo "$1 exceeds file size limit:" >&2; \ + echo " limit: $$limit bytes" >&2; \ + echo " actual: $$actual bytes" >&2; \ + echo " excess: $$((actual - limit)) bytes" >&2; \ + exit 1; \ + fi +endef +export size_check + export KBUILD_MODULES KBUILD_BUILTIN export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD @@ -713,7 +726,7 @@ libs-y += drivers/spi/ libs-$(CONFIG_FMAN_ENET) += drivers/net/fm/ libs-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/ libs-$(CONFIG_SYS_FSL_MMDC) += drivers/ddr/fsl/ -libs-$(CONFIG_ALTERA_SDRAM) += drivers/ddr/altera/ +libs-$(CONFIG_$(SPL_)ALTERA_SDRAM) += drivers/ddr/altera/ libs-y += drivers/serial/ libs-y += drivers/usb/dwc3/ libs-y += drivers/usb/common/ @@ -778,20 +791,17 @@ LDPPFLAGS += \ ######################################################################### ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) -BOARD_SIZE_CHECK = \ - @actual=`wc -c $@ | awk '{print $$1}'`; \ - limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \ - if test $$actual -gt $$limit; then \ - echo "$@ exceeds file size limit:" >&2 ; \ - echo " limit: $$limit bytes" >&2 ; \ - echo " actual: $$actual bytes" >&2 ; \ - echo " excess: $$((actual - limit)) bytes" >&2; \ - exit 1; \ - fi +BOARD_SIZE_CHECK= @ $(call size_check,$@,$(CONFIG_BOARD_SIZE_LIMIT)) else BOARD_SIZE_CHECK = endif +ifneq ($(CONFIG_SPL_SIZE_LIMIT),0) +SPL_SIZE_CHECK = @$(call size_check,$@,$$(tools/spl_size_limit)) +else +SPL_SIZE_CHECK = +endif + # Statically apply RELA-style relocations (currently arm64 only) # This is useful for arm64 where static relocation needs to be performed on # the raw binary, but certain simulators only accept an ELF file (but don't @@ -1015,6 +1025,17 @@ ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy) @echo >&2 "====================================================" endif endif +ifneq ($(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG),) +ifneq ($(CONFIG_WDT),y) + @echo >&2 "===================== WARNING ======================" + @echo >&2 "This board does not use CONFIG_WDT (DM watchdog support)." + @echo >&2 "Please update the board to use CONFIG_WDT before the" + @echo >&2 "v2019.10 release." + @echo >&2 "Failure to update by the deadline may result in board removal." + @echo >&2 "See doc/driver-model/MIGRATION.txt for more info." + @echo >&2 "====================================================" +endif +endif @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG @# options are whitelisted, so new ones should not be added. @@ -1047,16 +1068,29 @@ fit-dtb.blob.lzo: fit-dtb.blob fit-dtb.blob: dts/dt.dtb FORCE $(call if_changed,mkimage) +ifneq ($(SOURCE_DATE_EPOCH),) + touch -d @$(SOURCE_DATE_EPOCH) fit-dtb.blob + chmod 0600 fit-dtb.blob +endif MKIMAGEFLAGS_fit-dtb.blob = -f auto -A $(ARCH) -T firmware -C none -O u-boot \ -a 0 -e 0 -E \ $(patsubst %,-b arch/$(ARCH)/dts/%.dtb,$(subst ",,$(CONFIG_OF_LIST))) -d /dev/null +ifneq ($(EXT_DTB),) +u-boot-fit-dtb.bin: u-boot-nodtb.bin $(EXT_DTB) + $(call if_changed,cat) +else u-boot-fit-dtb.bin: u-boot-nodtb.bin $(FINAL_DTB_CONTAINER) $(call if_changed,cat) +endif u-boot.bin: u-boot-fit-dtb.bin FORCE $(call if_changed,copy) + +u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE + $(call if_changed,cat) + else ifeq ($(CONFIG_OF_SEPARATE),y) u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE $(call if_changed,cat) @@ -1070,6 +1104,7 @@ endif %.imx: %.bin $(Q)$(MAKE) $(build)=arch/arm/mach-imx $@ + $(BOARD_SIZE_CHECK) %.vyb: %.imx $(Q)$(MAKE) $(build)=arch/arm/cpu/armv7/vf610 $@ @@ -1097,6 +1132,9 @@ OBJCOPYFLAGS_u-boot-spl.srec = $(OBJCOPYFLAGS_u-boot.srec) spl/u-boot-spl.srec: spl/u-boot-spl FORCE $(call if_changed,objcopy) +%.scif: %.srec + $(Q)$(MAKE) $(build)=arch/arm/mach-rmobile $@ + OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \ $(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \ $(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),-R .bootpg -R .resetvec) @@ -1375,6 +1413,7 @@ cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \ u-boot.rom: u-boot-x86-16bit.bin u-boot.bin \ $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \ + $(if $(CONFIG_TPL_X86_16BIT_INIT),tpl/u-boot-tpl.bin) \ $(if $(CONFIG_HAVE_REFCODE),refcode.bin) FORCE $(call if_changed,binman) @@ -1683,6 +1722,8 @@ u-boot.lds: $(LDSCRIPT) prepare FORCE spl/u-boot-spl.bin: spl/u-boot-spl @: + $(SPL_SIZE_CHECK) + spl/u-boot-spl: tools prepare \ $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SPL_OF_PLATDATA),dts/dt.dtb) \ $(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_TPL_OF_PLATDATA),dts/dt.dtb) @@ -1745,6 +1786,7 @@ checkarmreloc: u-boot envtools: scripts_basic $(version_h) $(timestamp_h) $(Q)$(MAKE) $(build)=tools/env +tools-only: export TOOLS_ONLY=y tools-only: scripts_basic $(version_h) $(timestamp_h) $(Q)$(MAKE) $(build)=tools @@ -1774,7 +1816,7 @@ CLEAN_DIRS += $(MODVERDIR) \ $(filter-out include, $(shell ls -1 $d 2>/dev/null)))) CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h \ - boot* u-boot* MLO* SPL System.map fit-dtb.blob + boot* u-boot* MLO* SPL System.map fit-dtb.blob* # Directories & files removed with 'make mrproper' MRPROPER_DIRS += include/config include/generated spl tpl \ @@ -1972,6 +2014,13 @@ endif $(build)=$(build-dir) $(@:.ko=.o) $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost +quiet_cmd_genenv = GENENV $@ +cmd_genenv = $(OBJCOPY) --dump-section .rodata.default_environment=$@ env/common.o; \ + sed --in-place -e 's/\x00/\x0A/g' $@ + +u-boot-initial-env: u-boot.bin + $(call if_changed,genenv) + # Consistency checks # ---------------------------------------------------------------------------