xref: /linux/arch/sh/boot/Makefile (revision cf00e20444fc39fe37691ca32919061bf65527b0)
11da177e4SLinus Torvalds#
21da177e4SLinus Torvalds# arch/sh/boot/Makefile
31da177e4SLinus Torvalds#
41da177e4SLinus Torvalds# This file is subject to the terms and conditions of the GNU General Public
51da177e4SLinus Torvalds# License.  See the file "COPYING" in the main directory of this archive
61da177e4SLinus Torvalds# for more details.
71da177e4SLinus Torvalds#
81da177e4SLinus Torvalds# Copyright (C) 1999 Stuart Menefy
91da177e4SLinus Torvalds#
101da177e4SLinus Torvalds
11*cf00e204SPaul MundtMKIMAGE := $(srctree)/scripts/mkuboot.sh
12*cf00e204SPaul Mundt
13*cf00e204SPaul Mundt#
14*cf00e204SPaul Mundt# Assign safe dummy values if these variables are not defined,
15*cf00e204SPaul Mundt# in order to suppress error message.
16*cf00e204SPaul Mundt#
17*cf00e204SPaul MundtCONFIG_PAGE_OFFSET	?= 0x80000000
18*cf00e204SPaul MundtCONFIG_MEMORY_START	?= 0x0c000000
19*cf00e204SPaul MundtCONFIG_BOOT_LINK_OFFSET	?= 0x00800000
20*cf00e204SPaul MundtCONFIG_ZERO_PAGE_OFFSET	?= 0x00001000
21*cf00e204SPaul Mundt
22*cf00e204SPaul Mundtexport CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
23*cf00e204SPaul Mundt       CONFIG_ZERO_PAGE_OFFSET
24*cf00e204SPaul Mundt
25*cf00e204SPaul Mundttargets := zImage vmlinux.srec uImage uImage.srec
261da177e4SLinus Torvaldssubdir- := compressed
271da177e4SLinus Torvalds
281da177e4SLinus Torvalds$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
291da177e4SLinus Torvalds	$(call if_changed,objcopy)
301da177e4SLinus Torvalds	@echo '  Kernel: $@ is ready'
311da177e4SLinus Torvalds
321da177e4SLinus Torvalds$(obj)/compressed/vmlinux: FORCE
331da177e4SLinus Torvalds	$(Q)$(MAKE) $(build)=$(obj)/compressed $@
341da177e4SLinus Torvalds
35*cf00e204SPaul MundtKERNEL_LOAD	:= $(shell printf "0x%8x" $$[$(CONFIG_PAGE_OFFSET)  + \
36*cf00e204SPaul Mundt					     $(CONFIG_MEMORY_START) + \
37*cf00e204SPaul Mundt					     $(CONFIG_ZERO_PAGE_OFFSET)+0x1000])
38*cf00e204SPaul Mundt
39*cf00e204SPaul Mundtquiet_cmd_uimage = UIMAGE  $@
40*cf00e204SPaul Mundt      cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
41*cf00e204SPaul Mundt		   -C gzip -a $(KERNEL_LOAD) -e $(KERNEL_LOAD) \
42*cf00e204SPaul Mundt		   -n 'Linux-$(KERNELRELEASE)' -d $< $@
43*cf00e204SPaul Mundt
44*cf00e204SPaul Mundt$(obj)/uImage: $(obj)/zImage FORCE
45*cf00e204SPaul Mundt	$(call if_changed,uimage)
46*cf00e204SPaul Mundt	@echo '  Image $@ is ready'
47*cf00e204SPaul Mundt
48*cf00e204SPaul MundtOBJCOPYFLAGS_vmlinux.srec := -I binary -O srec
49*cf00e204SPaul Mundt$(obj)/vmlinux.srec: $(obj)/compressed/vmlinux
50*cf00e204SPaul Mundt	$(call if_changed,objcopy)
51*cf00e204SPaul Mundt
52*cf00e204SPaul MundtOBJCOPYFLAGS_uImage.srec := -I binary -O srec
53*cf00e204SPaul Mundt$(obj)/uImage.srec: $(obj)/uImage
54*cf00e204SPaul Mundt	$(call if_changed,objcopy)
55*cf00e204SPaul Mundt
56*cf00e204SPaul Mundtclean-files	+= uImage uImage.srec vmlinux.srec
57