diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-05 12:59:29 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-05 12:59:29 +0200 |
commit | bed1a6ffab6ba8f59146af07ccbdc7a625b6496f (patch) | |
tree | 6301a84dc2ef2d746a9a60979573e03eb6cc1c6a /Makefile | |
parent | b40aeb00d32f07c5b1b617ea4e88032cb895d8b3 (diff) | |
parent | d5b6012ac1e674e7ce285d6b47cd346d765267d0 (diff) | |
download | barebox-bed1a6ffab6ba8f59146af07ccbdc7a625b6496f.tar.gz barebox-bed1a6ffab6ba8f59146af07ccbdc7a625b6496f.tar.xz |
Merge branch 'for-next/pbl'
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -254,6 +254,7 @@ MAKEFLAGS += --include-dir=$(srctree) # We need some generic definitions. include $(srctree)/scripts/Kbuild.include +include $(srctree)/scripts/Makefile.lib # Make variables (CC, etc...) @@ -436,12 +437,6 @@ else include/config/auto.conf: ; endif # $(dot-config) -# The all: target is the default when no target is given on the -# command line. -# This allow a user to issue only 'make' to build a kernel -# Defaults barebox but it is usually overridden in the arch makefile -all: barebox.bin - include $(srctree)/arch/$(ARCH)/Makefile ifdef CONFIG_DEBUG_INFO @@ -472,7 +467,14 @@ CFLAGS += $(call cc-option,-Wno-pointer-sign,) # set in the environment # Also any assignments in arch/$(ARCH)/Makefile take precedence over # this default value -export KBUILD_IMAGE ?= barebox +export KBUILD_IMAGE ?= barebox.bin + +barebox-flash-image: $(KBUILD_IMAGE) + $(call if_changed,ln) + +all: barebox-flash-image + +common-$(CONFIG_PBL_IMAGE) += pbl/ barebox-dirs := $(patsubst %/,%,$(filter %/, $(common-y))) @@ -481,6 +483,7 @@ barebox-alldirs := $(sort $(barebox-dirs) $(patsubst %/,%,$(filter %/, \ $(core-n) $(core-) $(drivers-n) $(drivers-) \ $(net-n) $(net-) $(libs-n) $(libs-)))) +pbl-common-y := $(patsubst %/, %/built-in-pbl.o, $(common-y)) common-y := $(patsubst %/, %/built-in.o, $(common-y)) # Build barebox @@ -510,6 +513,8 @@ common-y := $(patsubst %/, %/built-in.o, $(common-y)) # System.map is generated to document addresses of all kernel symbols barebox-common := $(common-y) +barebox-pbl-common := $(pbl-common-y) +export barebox-pbl-common barebox-all := $(barebox-common) barebox-lds := $(lds-y) @@ -517,7 +522,7 @@ barebox-lds := $(lds-y) # May be overridden by arch/$(ARCH)/Makefile quiet_cmd_barebox__ ?= LD $@ cmd_barebox__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_barebox) -o $@ \ - -T $(barebox-lds) $(barebox-head) \ + -T $(barebox-lds) \ --start-group $(barebox-common) --end-group \ $(filter-out $(barebox-lds) $(barebox-common) FORCE ,$^) @@ -671,7 +676,9 @@ OBJCOPYFLAGS_barebox.bin = -O binary barebox.bin: barebox FORCE $(call if_changed,objcopy) +ifndef CONFIG_PBL_IMAGE $(call cmd,check_file_size,$(CONFIG_BAREBOX_MAX_IMAGE_SIZE)) +endif ifdef CONFIG_X86 barebox.S: barebox @@ -696,9 +703,6 @@ endif @echo " * Init Calls content" >> barebox.S $(Q)$(OBJDUMP) -j .barebox_initcalls -d barebox >> barebox.S else -quiet_cmd_disasm = DISASM $@ - cmd_disasm = $(OBJDUMP) -d $< > $@ - barebox.S: barebox FORCE $(call if_changed,disasm) endif @@ -714,7 +718,7 @@ barebox.srec: barebox # The actual objects are generated when descending, # make sure no implicit rule kicks in -$(sort $(barebox-head) $(barebox-common) ) $(barebox-lds): $(barebox-dirs) ; +$(sort $(barebox-head) $(barebox-common) ) $(barebox-lds) $(barebox-pbl-common): $(barebox-dirs) ; # Handle descending into subdirectories listed in $(barebox-dirs) # Preset locale variables to speed up the build process. Limit locale @@ -1004,7 +1008,7 @@ CLEAN_DIRS += $(MODVERDIR) CLEAN_FILES += barebox System.map include/generated/barebox_default_env.h \ .tmp_version .tmp_barebox* barebox.bin barebox.map barebox.S \ .tmp_kallsyms* barebox_default_env* barebox.ldr \ - scripts/bareboxenv-target \ + scripts/bareboxenv-target barebox-flash-image \ Doxyfile.version barebox.srec barebox.s5p # Directories & files removed with 'make mrproper' |