diff options
Diffstat (limited to 'arch/mips/Makefile')
-rw-r--r-- | arch/mips/Makefile | 34 |
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 | |||
194 | ifdef CONFIG_PHYSICAL_START | 194 | ifdef CONFIG_PHYSICAL_START |
195 | load-y = $(CONFIG_PHYSICAL_START) | 195 | load-y = $(CONFIG_PHYSICAL_START) |
196 | endif | 196 | endif |
197 | entry-y = 0x$(shell $(NM) vmlinux 2>/dev/null \ | ||
198 | | grep "\bkernel_entry\b" | cut -f1 -d \ ) | ||
197 | 199 | ||
198 | cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic | 200 | cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic |
199 | drivers-$(CONFIG_PCI) += arch/mips/pci/ | 201 | drivers-$(CONFIG_PCI) += arch/mips/pci/ |
@@ -225,6 +227,9 @@ KBUILD_CFLAGS += $(cflags-y) | |||
225 | KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y) | 227 | KBUILD_CPPFLAGS += -DVMLINUX_LOAD_ADDRESS=$(load-y) |
226 | KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0) | 228 | KBUILD_CPPFLAGS += -DDATAOFFSET=$(if $(dataoffset-y),$(dataoffset-y),0) |
227 | 229 | ||
230 | bootvars-y = VMLINUX_LOAD_ADDRESS=$(load-y) \ | ||
231 | VMLINUX_ENTRY_ADDRESS=$(entry-y) | ||
232 | |||
228 | LDFLAGS += -m $(ld-emul) | 233 | LDFLAGS += -m $(ld-emul) |
229 | 234 | ||
230 | ifdef CONFIG_CC_STACKPROTECTOR | 235 | ifdef CONFIG_CC_STACKPROTECTOR |
@@ -254,9 +259,25 @@ drivers-$(CONFIG_OPROFILE) += arch/mips/oprofile/ | |||
254 | # suspend and hibernation support | 259 | # suspend and hibernation support |
255 | drivers-$(CONFIG_PM) += arch/mips/power/ | 260 | drivers-$(CONFIG_PM) += arch/mips/power/ |
256 | 261 | ||
262 | # boot image targets (arch/mips/boot/) | ||
263 | boot-y := vmlinux.bin | ||
264 | boot-y += vmlinux.ecoff | ||
265 | boot-y += vmlinux.srec | ||
266 | ifeq ($(shell expr $(load-y) \< 0xffffffff80000000 2> /dev/null), 0) | ||
267 | boot-y += uImage | ||
268 | boot-y += uImage.gz | ||
269 | endif | ||
270 | |||
271 | # compressed boot image targets (arch/mips/boot/compressed/) | ||
272 | bootz-y := vmlinuz | ||
273 | bootz-y += vmlinuz.bin | ||
274 | bootz-y += vmlinuz.ecoff | ||
275 | bootz-y += vmlinuz.srec | ||
276 | |||
257 | ifdef CONFIG_LASAT | 277 | ifdef CONFIG_LASAT |
258 | rom.bin rom.sw: vmlinux | 278 | rom.bin rom.sw: vmlinux |
259 | $(Q)$(MAKE) $(build)=arch/mips/lasat/image $@ | 279 | $(Q)$(MAKE) $(build)=arch/mips/lasat/image \ |
280 | $(bootvars-y) $@ | ||
260 | endif | 281 | endif |
261 | 282 | ||
262 | # | 283 | # |
@@ -280,13 +301,14 @@ vmlinux.64: vmlinux | |||
280 | all: $(all-y) | 301 | all: $(all-y) |
281 | 302 | ||
282 | # boot | 303 | # boot |
283 | vmlinux.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 |
287 | vmlinuz 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 | ||
292 | CLEAN_FILES += vmlinux.32 vmlinux.64 | 314 | CLEAN_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.' |
328 | endef | 352 | endef |