aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r--arch/mips/Makefile34
1 files changed, 29 insertions, 5 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 37f9ef324f2f..75a36ad11ff5 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -194,6 +194,8 @@ include $(srctree)/arch/mips/Kbuild.platforms
194ifdef CONFIG_PHYSICAL_START 194ifdef CONFIG_PHYSICAL_START
195load-y = $(CONFIG_PHYSICAL_START) 195load-y = $(CONFIG_PHYSICAL_START)
196endif 196endif
197entry-y = 0x$(shell $(NM) vmlinux 2>/dev/null \
198 | grep "\bkernel_entry\b" | cut -f1 -d \ )
197 199
198cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic 200cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
199drivers-$(CONFIG_PCI) += arch/mips/pci/ 201drivers-$(CONFIG_PCI) += arch/mips/pci/
@@ -225,6 +227,9 @@ KBUILD_CFLAGS += $(cflags-y)
225KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y) 227KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y)
226KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0) 228KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0)
227 229
230bootvars-y = VMLINUX_LOAD_ADDRESS=$(load-y) \
231 VMLINUX_ENTRY_ADDRESS=$(entry-y)
232
228LDFLAGS += -m $(ld-emul) 233LDFLAGS += -m $(ld-emul)
229 234
230ifdef CONFIG_CC_STACKPROTECTOR 235ifdef CONFIG_CC_STACKPROTECTOR
@@ -254,9 +259,25 @@ drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/
254# suspend and hibernation support 259# suspend and hibernation support
255drivers-$(CONFIG_PM) += arch/mips/power/ 260drivers-$(CONFIG_PM) += arch/mips/power/
256 261
262# boot image targets (arch/mips/boot/)
263boot-y := vmlinux.bin
264boot-y += vmlinux.ecoff
265boot-y += vmlinux.srec
266ifeq ($(shell expr $(load-y) \< 0xffffffff80000000 2> /dev/null), 0)
267boot-y += uImage
268boot-y += uImage.gz
269endif
270
271# compressed boot image targets (arch/mips/boot/compressed/)
272bootz-y := vmlinuz
273bootz-y += vmlinuz.bin
274bootz-y += vmlinuz.ecoff
275bootz-y += vmlinuz.srec
276
257ifdef CONFIG_LASAT 277ifdef CONFIG_LASAT
258rom.bin rom.sw: vmlinux 278rom.bin rom.sw: vmlinux
259 $(Q)$(MAKE) $(build)=arch/mips/lasat/image $@ 279 $(Q)$(MAKE) $(build)=arch/mips/lasat/image \
280 $(bootvars-y) $@
260endif 281endif
261 282
262# 283#
@@ -280,13 +301,14 @@ vmlinux.64: vmlinux
280all: $(all-y) 301all: $(all-y)
281 302
282# boot 303# boot
283vmlinux.bin vmlinux.ecoff vmlinux.srec: $(vmlinux-32) FORCE 304$(boot-y): $(vmlinux-32) FORCE
284 $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) arch/mips/boot/$@ 305 $(Q)$(MAKE) $(build)=arch/mips/boot VMLINUX=$(vmlinux-32) \
306 $(bootvars-y) arch/mips/boot/$@
285 307
286# boot/compressed 308# boot/compressed
287vmlinuz vmlinuz.bin vmlinuz.ecoff vmlinuz.srec: $(vmlinux-32) FORCE 309$(bootz-y): $(vmlinux-32) FORCE
288 $(Q)$(MAKE) $(build)=arch/mips/boot/compressed \ 310 $(Q)$(MAKE) $(build)=arch/mips/boot/compressed \
289 VMLINUX_LOAD_ADDRESS=$(load-y) 32bit-bfd=$(32bit-bfd) $@ 311 $(bootvars-y) 32bit-bfd=$(32bit-bfd) $@
290 312
291 313
292CLEAN_FILES += vmlinux.32 vmlinux.64 314CLEAN_FILES += vmlinux.32 vmlinux.64
@@ -323,6 +345,8 @@ define archhelp
323 echo ' vmlinuz.ecoff - ECOFF zboot image' 345 echo ' vmlinuz.ecoff - ECOFF zboot image'
324 echo ' vmlinuz.bin - Raw binary zboot image' 346 echo ' vmlinuz.bin - Raw binary zboot image'
325 echo ' vmlinuz.srec - SREC zboot image' 347 echo ' vmlinuz.srec - SREC zboot image'
348 echo ' uImage - U-Boot image'
349 echo ' uImage.gz - U-Boot image (gzip)'
326 echo 350 echo
327 echo ' These will be default as appropriate for a configured platform.' 351 echo ' These will be default as appropriate for a configured platform.'
328endef 352endef