X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=Makefile;h=26326e96df31c2d74343ab77758ba124e53cb0e9;hb=497348a71626ec8db4364c9d1dc0fc92054f170e;hp=d385467e8e2b96fb164278be3b8feb89e457990b;hpb=53c41548a9fd7f0595c81c47e1ac3d9671d753e4;p=karo-tx-uboot.git diff --git a/Makefile b/Makefile index d385467e8e..26326e96df 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,8 @@ # MA 02111-1307 USA # -VERSION = 2012 -PATCHLEVEL = 10 +VERSION = 2013 +PATCHLEVEL = 01 SUBLEVEL = EXTRAVERSION = ifneq "$(SUBLEVEL)" "" @@ -30,8 +30,6 @@ U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) else U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION) endif -TIMESTAMP_FILE = $(obj)include/generated/timestamp_autogenerated.h -VERSION_FILE = $(obj)include/generated/version_autogenerated.h HOSTARCH := $(shell uname -m | \ sed -e s/i.86/x86/ \ @@ -113,7 +111,7 @@ export CHECKSRC ifneq ($(BUILD_DIR),) saved-output := $(BUILD_DIR) -# Attempt to create a output directory. +# Attempt to create an output directory. $(shell [ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}) # Verify if it was successful. @@ -148,6 +146,9 @@ src := endif export obj src +TIMESTAMP_FILE = $(obj)include/generated/timestamp_autogenerated.h +VERSION_FILE = $(obj)include/generated/version_autogenerated.h + # Make sure CDPATH settings don't interfere unexport CDPATH @@ -231,8 +232,8 @@ endif OBJS = $(CPUDIR)/start.o ifeq ($(CPU),x86) -OBJS += $(CPUDIR)/start16.o -OBJS += $(CPUDIR)/resetvec.o +RESET_OBJS-$(CONFIG_X86_NO_RESET_VECTOR) += $(CPUDIR)/start16.o +RESET_OBJS-$(CONFIG_X86_NO_RESET_VECTOR) += $(CPUDIR)/resetvec.o endif ifeq ($(CPU),ppc4xx) OBJS += $(CPUDIR)/resetvec.o @@ -241,7 +242,7 @@ ifeq ($(CPU),mpc85xx) OBJS += $(CPUDIR)/resetvec.o endif -OBJS := $(addprefix $(obj),$(OBJS)) +OBJS := $(addprefix $(obj),$(OBJS) $(RESET_OBJS-)) HAVE_VENDOR_COMMON_LIB = $(if $(wildcard board/$(VENDOR)/common/Makefile),y,n) @@ -260,7 +261,8 @@ LIBS-y += drivers/net/npe/libnpe.o endif LIBS-$(CONFIG_OF_EMBED) += dts/libdts.o LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o -LIBS-y += fs/cbfs/libcbfs.o \ +LIBS-y += fs/libfs.o \ + fs/cbfs/libcbfs.o \ fs/cramfs/libcramfs.o \ fs/ext4/libext4fs.o \ fs/fat/libfat.o \ @@ -292,7 +294,10 @@ LIBS-y += drivers/net/libnet.o LIBS-y += drivers/net/phy/libphy.o LIBS-y += drivers/pci/libpci.o LIBS-y += drivers/pcmcia/libpcmcia.o -LIBS-y += drivers/power/libpower.o +LIBS-y += drivers/power/libpower.o \ + drivers/power/fuel_gauge/libfuel_gauge.o \ + drivers/power/pmic/libpmic.o \ + drivers/power/battery/libbattery.o LIBS-y += drivers/spi/libspi.o LIBS-y += drivers/dfu/libdfu.o ifeq ($(CPU),mpc83xx) @@ -312,12 +317,14 @@ LIBS-y += arch/powerpc/cpu/mpc8xxx/lib8xxx.o endif LIBS-y += drivers/rtc/librtc.o LIBS-y += drivers/serial/libserial.o +LIBS-y += drivers/sound/libsound.o LIBS-$(CONFIG_GENERIC_LPC_TPM) += drivers/tpm/libtpm.o LIBS-y += drivers/twserial/libtws.o LIBS-y += drivers/usb/eth/libusb_eth.o LIBS-y += drivers/usb/gadget/libusb_gadget.o LIBS-y += drivers/usb/host/libusb_host.o LIBS-y += drivers/usb/musb/libusb_musb.o +LIBS-y += drivers/usb/musb-new/libusb_musb-new.o LIBS-y += drivers/usb/phy/libusb_phy.o LIBS-y += drivers/usb/ulpi/libusb_ulpi.o LIBS-y += drivers/video/libvideo.o @@ -385,12 +392,12 @@ __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD)) ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) BOARD_SIZE_CHECK = \ @actual=`wc -c $@ | awk '{print $$1}'`; \ - limit=$(CONFIG_BOARD_SIZE_LIMIT); \ + limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \ if test $$actual -gt $$limit; then \ - echo "$@ exceeds file size limit:"; \ - echo " limit: $$limit bytes"; \ - echo " actual: $$actual bytes"; \ - echo " excess: $$((actual - limit)) bytes"; \ + 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 else @@ -403,6 +410,7 @@ ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin +ALL-$(CONFIG_SPL) += $(obj)$(subst ",,$(CONFIG_SPL_TARGET)) ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin # enable combined SPL/u-boot/dtb rules for tegra @@ -444,9 +452,18 @@ $(obj)u-boot.ldr.hex: $(obj)u-boot.ldr $(obj)u-boot.ldr.srec: $(obj)u-boot.ldr $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary +# +# U-Boot entry point, needed for booting of full-blown U-Boot +# from the SPL U-Boot version. +# +ifndef CONFIG_SYS_UBOOT_START +CONFIG_SYS_UBOOT_START := 0 +endif + $(obj)u-boot.img: $(obj)u-boot.bin $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \ - -O u-boot -a $(CONFIG_SYS_TEXT_BASE) -e 0 \ + -O u-boot -a $(CONFIG_SYS_TEXT_BASE) \ + -e $(CONFIG_SYS_UBOOT_START) \ -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \ sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ -d $< $@ @@ -470,14 +487,19 @@ $(obj)u-boot.sha1: $(obj)u-boot.bin $(obj)u-boot.dis: $(obj)u-boot $(OBJDUMP) -d $< > $@ -$(obj)u-boot.ubl: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin - $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin - cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $(obj)u-boot-ubl.bin - $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \ - -e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin $(obj)u-boot.ubl - rm $(obj)u-boot-ubl.bin + + +$(obj)u-boot-with-spl.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin + $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(or $(CONFIG_SPL_PAD_TO),0) \ + -O binary $(obj)spl/u-boot-spl \ + $(obj)spl/u-boot-spl-pad.bin + cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $@ rm $(obj)spl/u-boot-spl-pad.bin +$(obj)u-boot.ubl: $(obj)u-boot-with-spl.bin + $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \ + -e $(CONFIG_SYS_TEXT_BASE) -d $< $(obj)u-boot.ubl + $(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img $(obj)tools/mkimage -s -n $(if $(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),"/dev/null") \ -T aisimage \ @@ -493,8 +515,9 @@ $(obj)u-boot.ais: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img # Specify the target for use in elftosb call ELFTOSB_TARGET-$(CONFIG_MX28) = imx28 -$(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin - elftosb -zdf $(ELFTOSB_TARGET-y) -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd \ +$(obj)u-boot.sb: $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin elftosb + cd $(OBJTREE); \ + $(TOPDIR)/$(SUBDIR_TOOLS)/elftosb/bld/linux/elftosb -zdf $(ELFTOSB_TARGET-y) -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot-$(ELFTOSB_TARGET-y).bd \ -o $(obj)u-boot.sb # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. @@ -515,17 +538,21 @@ $(obj)u-boot.spr: $(obj)u-boot.img $(obj)spl/u-boot-spl.bin ifeq ($(SOC),tegra20) ifeq ($(CONFIG_OF_SEPARATE),y) -$(obj)u-boot-dtb-tegra.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin $(obj)u-boot.dtb - $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SYS_TEXT_BASE) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin - cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin $(obj)u-boot.dtb > $@ - rm $(obj)spl/u-boot-spl-pad.bin +nodtb=dtb +dtbfile=$(obj)u-boot.dtb else -$(obj)u-boot-nodtb-tegra.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin +nodtb=nodtb +dtbfile= +endif + +$(obj)u-boot-$(nodtb)-tegra.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin $(dtbfile) $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SYS_TEXT_BASE) -O binary $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin - cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin > $@ + cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin $(dtbfile) > $@ rm $(obj)spl/u-boot-spl-pad.bin endif -endif + +$(obj)u-boot-img.bin: $(obj)spl/u-boot-spl.bin $(obj)u-boot.img + cat $(obj)spl/u-boot-spl.bin $(obj)u-boot.img > $@ ifeq ($(CONFIG_SANDBOX),y) GEN_UBOOT = \ @@ -588,6 +615,8 @@ $(obj)spl/u-boot-spl.bin: $(SUBDIR_TOOLS) depend updater: $(MAKE) -C tools/updater all +elftosb: + $(MAKE) -C $(SUBDIR_TOOLS)/elftosb all # Explicitly make _depend in subdirs containing multiple targets to prevent # parallel sub-makes creating .depend files simultaneously. @@ -636,6 +665,16 @@ checkthumb: echo '*** Your board is configured for THUMB mode.'; \ false; \ fi + +# GCC 3.x is reported to have problems generating the type of relocation +# that U-Boot wants. +# See http://lists.denx.de/pipermail/u-boot/2012-September/135156.html +checkgcc4: + @if test $(call cc-version) -lt 0400; then \ + echo -n '*** Your GCC is too old, please upgrade to GCC 4.x or newer'; \ + false; \ + fi + # # Auto-generate the autoconf.mk file (which is included by all makefiles) # @@ -809,7 +848,7 @@ clean: @rm -f $(obj)include/generated/asm-offsets.h @rm -f $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE) - @$(MAKE) -C doc/DocBook/ cleandocs + @$(MAKE) -s -C doc/DocBook/ cleandocs @find $(OBJTREE) -type f \ \( -name 'core' -o -name '*.bak' -o -name '*~' -o -name '*.su' \ -o -name '*.o' -o -name '*.a' -o -name '*.exe' \) -print \ @@ -838,7 +877,8 @@ clobber: tidy @rm -f $(obj)nand_spl/{u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map} @rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.map} @rm -f $(obj)spl/{u-boot-spl.lds,u-boot.lst} - @rm -f $(obj)MLO + @rm -f $(obj)MLO MLO.byteswap + @rm -f $(obj)SPL @rm -f $(obj)tools/xway-swap-bytes @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c @rm -f $(obj)arch/powerpc/cpu/mpc83xx/ddr-gen?.c