Root/target/linux/coldfire/files-2.6.31/arch/m68k/boot/Makefile

1#
2# arch/m68k/boot/Makefile
3#
4# Based on arch/sh/boot/Makefile by Stuart Menefy
5#
6# Copyright (c) 2008 Freescale Semiconductor, Inc. All Rights Reserved.
7# by Kurt Mahan <kmahan@freescale.com>
8#
9# This file is subject to the terms and conditions of the GNU General Public
10# License. See the file "COPYING" in the main directory of this archive
11# for more details.
12#
13
14MKIMAGE := $(srctree)/scripts/mkuboot.sh
15
16#
17# Assign safe dummy values if these variables are not defined,
18# in order to suppress error message.
19#
20CONFIG_SDRAM_BASE ?= 0x40000000
21CONFIG_IMG_START ?= 0x00020000
22
23export CONFIG_SDRAM_BASE CONFIG_IMG_START
24
25targets := zImage zImage.srec vmlinux.srec uImage uImage.srec
26
27$(obj)/zImage: $(obj)/vmlinux.bin FORCE
28    $(call if_changed,gzip)
29    @echo ' Image $@ is ready'
30
31OBJCOPYFLAGS_zImage.srec := -I binary -O srec
32$(obj)/zImage.srec: $(obj)/zImage
33    $(call if_changed,objcopy)
34
35KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \
36             $$[$(CONFIG_SDRAM_BASE) + \
37            $(CONFIG_IMG_START)]')
38
39KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \
40             $$[$(CONFIG_SDRAM_BASE) + \
41            $(CONFIG_IMG_START)]')
42
43quiet_cmd_uimage = UIMAGE $@
44    cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A m68k -O linux -T kernel \
45           -C gzip -a $(KERNEL_LOAD) -e $(KERNEL_ENTRY) \
46           -n 'Linux-$(KERNELRELEASE)' -d $< $@
47
48$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
49    $(call if_changed,uimage)
50    @echo ' Image $@ is ready'
51
52$(obj)/vmlinux.bin: vmlinux FORCE
53    $(call if_changed,objcopy)
54
55$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
56    $(call if_changed,gzip)
57
58OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec
59$(obj)/vmlinux.srec: $(obj)/vmlinux.bin
60    $(call if_changed,objcopy)
61
62OBJCOPYFLAGS_uImage.srec := -I binary -O srec
63$(obj)/uImage.srec: $(obj)/uImage
64    $(call if_changed,objcopy)
65
66clean-files += uImage uImage.srec \
67           zImage zImage.srec \
68           vmlinux.srec vmlinux.bin vmlinux.bin.gz
69

Archive Download this file



interactive