patch-2.4.19 linux-2.4.19/arch/ppc/boot/Makefile

Next file: linux-2.4.19/arch/ppc/boot/chrp/Makefile
Previous file: linux-2.4.19/arch/ppc/amiga/config.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/arch/ppc/boot/Makefile linux-2.4.19/arch/ppc/boot/Makefile
@@ -17,29 +17,24 @@
 AFLAGS	+= -D__BOOTER__
 OBJCOPY_ARGS = -O elf32-powerpc
 
-ifeq ($(CONFIG_SMP),y)
-TFTPSIMAGE=/tftpboot/sImage.smp
-else
-TFTPSIMAGE=/tftpboot/sImage
-endif
+MKIMAGE				:= ./utils/mkimage.wrapper
 
-lib/zlib.a:
+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.
-subdir-y			:= lib images common
-subdir-$(CONFIG_ALL_PPC)	+= chrp pmac prep
-tools-$(CONFIG_ALL_PPC)		:= addnote piggyback mknote hack-coff mkprep
-subdir-$(CONFIG_4xx)		+= tree
-subdir-$(CONFIG_8xx)		+= mbx
-subdir-$(CONFIG_8260)		+= mbx
-tools-$(CONFIG_GEMINI)		:= mksimage
-
-# These are dirs we don't want to go into on BOOT_TARGETS
-NONBOOT				:= lib images common
+# 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_4xx)		:= 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))
@@ -50,37 +45,29 @@
 	$(MAKE) -C utils $(tools-y)
 
 # The targets all boards support for boot images.
-BOOT_TARGETS = zImage
-ifndef CONFIG_GEMINI
-BOOT_TARGETS += zImage.initrd znetboot znetboot.initrd
-endif
+BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd
 
-$(BOOT_TARGETS): sImage vmapus lib/zlib.a images/vmlinux.gz maketools
+$(BOOT_TARGETS): vmapus lib/zlib.a images/vmlinux.gz maketools
 ifneq ($(BOOTDIRS),)
 	for d in $(BOOTDIRS); do $(MAKE) -C $$d $@; done
 endif
 
-sImage: $(TOPDIR)/vmlinux
-ifdef CONFIG_GEMINI
-	$(OBJCOPY) -I elf32-powerpc -O binary $(TOPDIR)/vmlinux images/sImage
-endif
-
 vmapus: $(TOPDIR)/vmlinux
 ifdef CONFIG_APUS
 	$(STRIP) $(TOPDIR)/vmlinux -o images/vmapus
 	gzip $(GZIP_FLAGS) images/vmapus
 endif
 
-ifdef CONFIG_GEMINI
-znetboot : zImage
-	cp images/sImage $(TFTPSIMAGE)
-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
 
-# Clean up after ourselves.  We have to do it like this since only some dirs
-# need to be gone into. -- Tom
+# These are subdirs with files not normally rm'ed. -- Tom
 clean:
 	$(MAKE) -C images clean
-	$(MAKE) -C tree clean
 	$(MAKE) -C utils clean
 
 include $(TOPDIR)/Rules.make

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)