# # arch/ppc/boot/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive # for more details. # # Copyright (C) 1994 by Linus Torvalds # Adapted for PowerPC by Gary Thomas # modified by Cort (cort@cs.nmt.edu) # GZIP_FLAGS = -v9f CFLAGS += -fno-builtin -D__BOOTER__ -I$(TOPDIR)/arch/$(ARCH)/boot/include AFLAGS += -D__BOOTER__ OBJCOPY_ARGS = -O elf32-powerpc MKIMAGE := ./utils/mkimage.wrapper lib/zlib.a: lib/zlib.c $(MAKE) -C lib images/vmlinux.gz: $(TOPDIR)/vmlinux $(MAKE) -C images vmlinux.gz # Subdirs and tools needed for each. Assume we always need to go into # 'simple' unless told otherwise. subdir-y := lib common simple subdir-$(CONFIG_ALL_PPC) := chrp pmac prep tools-$(CONFIG_ALL_PPC) := addnote mknote hack-coff mkprep tools-$(CONFIG_PPLUS) := mkbugboot mkprep tools-$(CONFIG_40x) := mktree tools-$(CONFIG_EBONY) := mktree tools-$(CONFIG_LOPEC) := mkbugboot mkprep tools-$(CONFIG_MCPN765) := mkbugboot mkprep tools-$(CONFIG_MENF1) := mkprep tools-$(CONFIG_MVME5100) := mkbugboot mkprep tools-$(CONFIG_PRPMC750) := mkbugboot mkprep tools-$(CONFIG_PRPMC800) := mkbugboot mkprep tools-$(CONFIG_SPRUCE) := mktree # These are dirs we don't want to go into on BOOT_TARGETS. We have them for # the 'depend' stage. NONBOOT := lib common # These are the subdirs we want to use BOOTDIRS = $(filter-out $(NONBOOT), $(subdir-y)) # This will make the tools we need. We do it like this to ensure that we use # HOSTCC. -- Tom maketools: $(MAKE) -C utils $(tools-y) # The targets all boards support for boot images. BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd $(BOOT_TARGETS): vmapus lib/zlib.a images/vmlinux.gz maketools ifneq ($(BOOTDIRS),) for d in $(BOOTDIRS); do $(MAKE) -C $$d $@; done endif vmapus: $(TOPDIR)/vmlinux ifdef CONFIG_APUS $(STRIP) $(TOPDIR)/vmlinux -o images/vmapus gzip $(GZIP_FLAGS) images/vmapus endif # Make an image for PPCBoot pImage: images/vmlinux.gz $(MKIMAGE) -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ -n 'Linux-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)' \ -d $< images/vmlinux.PPCBoot ln -sf vmlinux.PPCBoot images/pImage cp -f ./images/vmlinux.PPCBoot /tftpboot/pImage vmlinux.sm: $(TOPDIR)/vmlinux utils/addSystemMap ./utils/addSystemMap $(TOPDIR)/System.map $(TOPDIR)/vmlinux images/vmlinux.sm # These are subdirs with files not normally rm'ed. -- Tom clean: $(MAKE) -C images clean $(MAKE) -C utils clean include $(TOPDIR)/Rules.make