1 # BK Id: SCCS/s.Makefile 1.30 11/19/01 09:04:20 trini
3 # arch/ppc/boot/Makefile
5 # This file is subject to the terms and conditions of the GNU General Public
6 # License. See the file "COPYING" in the main directory of this archive
9 # Tom Rini January 2001
12 # arch/ppc/boot/Makefile
13 # Copyright (C) 1994 by Linus Torvalds
14 # Adapted for PowerPC by Gary Thomas
15 # modified by Cort (cort@cs.nmt.edu)
18 USE_STANDARD_AS_RULE := true
20 TFTPIMAGE = /tftpboot/zImage.prep
21 ifeq ($(CONFIG_SMP),y)
22 TFTPIMAGE = $(TFTPBOOT).smp
25 LD_ARGS = -T ../ld.script -Ttext 0x00800000 -Bstatic
26 obj-y := head.o ../simple/legacy.o misc.o \
27 ../common/util.o ../common/string.o \
28 ../common/misc-common.o \
29 ../common/mpc10x_memory.o \
30 ../common/serial_stub.o
31 OBJCOPY_ARGS = -O elf32-powerpc
34 obj-$(CONFIG_SERIAL_CONSOLE) += ../common/ns16550.o
35 obj-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o
38 MKPREP := ../utils/mkprep
40 OFFSET := ../utils/offset
42 # Extra include search dirs
43 CFLAGS_kbd.o += -I$(TOPDIR)/drivers/char
47 zImage: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz ../common/dummy.o \
49 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
50 --add-section=.image=../images/vmlinux.gz \
51 --set-section-flags=.image=contents,alloc,load,readonly,data \
52 ../common/dummy.o image.o
53 $(LD) $(LD_ARGS) -o $@ $(obj-y) image.o $(LIBS)
54 $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr
55 $(MKPREP) -pbp $@ ../images/$@.prep
58 zImage.initrd: $(obj-y) $(LIBS) ../ld.script ../images/vmlinux.gz $(MKPREP) \
60 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
61 --add-section=.ramdisk=../images/ramdisk.image.gz \
62 --set-section-flags=.ramdisk=contents,alloc,load,readonly,data \
63 --add-section=.image=../images/vmlinux.gz \
64 --set-section-flags=.image=contents,alloc,load,readonly,data \
65 ../common/dummy.o image.o
66 $(LD) $(LD_ARGS) -o $@ $(obj-y) image.o $(LIBS)
67 $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab -R .stabstr
68 $(MKPREP) -pbp $@ ../images/$@.prep
72 dd if=../images/zImage.prep of=/dev/fd0H1440 bs=64b
75 cp ../images/zImage.prep $(TFTPIMAGE)
77 znetboot.initrd : zImage.initrd
78 cp ../images/zImage.initrd.prep $(TFTPIMAGE)
80 include $(TOPDIR)/Rules.make