diff options
author | Paul Mackerras <paulus@samba.org> | 2006-01-15 01:30:44 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-15 01:30:44 -0500 |
commit | a7fdd90bc43e3e9cb08bc1b13650024d419b89e5 (patch) | |
tree | 5c99a41b9d157186668ed63c001f72a09965143b /arch/ppc/boot/openfirmware/Makefile | |
parent | e8625d463560198cff7cb3eb22886c47d728d501 (diff) |
[PATCH] ppc: Remove powermac support from ARCH=ppc
This makes it possible to build kernels for PReP and/or CHRP
with ARCH=ppc by removing the (non-building) powermac support.
It's now also possible to select PReP and CHRP independently.
Powermac users should now build with ARCH=powerpc instead of
ARCH=ppc. (This does mean that it is no longer possible to
build a 32-bit kernel for a G5.)
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/boot/openfirmware/Makefile')
-rw-r--r-- | arch/ppc/boot/openfirmware/Makefile | 96 |
1 files changed, 9 insertions, 87 deletions
diff --git a/arch/ppc/boot/openfirmware/Makefile b/arch/ppc/boot/openfirmware/Makefile index 83a6433459ce..2a411ec2e650 100644 --- a/arch/ppc/boot/openfirmware/Makefile +++ b/arch/ppc/boot/openfirmware/Makefile | |||
@@ -21,26 +21,16 @@ bootlib := $(boot)/lib | |||
21 | of1275 := $(boot)/of1275 | 21 | of1275 := $(boot)/of1275 |
22 | images := $(boot)/images | 22 | images := $(boot)/images |
23 | 23 | ||
24 | OBJCOPY_ARGS := -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment | ||
25 | COFF_LD_ARGS := -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x00500000 \ | ||
26 | -Bstatic | ||
27 | CHRP_LD_ARGS := -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x00800000 | 24 | CHRP_LD_ARGS := -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x00800000 |
28 | NEWWORLD_LD_ARGS:= -T $(srctree)/$(boot)/ld.script -e _start -Ttext 0x01000000 | ||
29 | 25 | ||
30 | COMMONOBJS := start.o misc.o common.o | 26 | COMMONOBJS := start.o misc.o common.o |
31 | COFFOBJS := coffcrt0.o $(COMMONOBJS) coffmain.o | ||
32 | CHRPOBJS := crt0.o $(COMMONOBJS) chrpmain.o | 27 | CHRPOBJS := crt0.o $(COMMONOBJS) chrpmain.o |
33 | NEWWORLDOBJS := crt0.o $(COMMONOBJS) newworldmain.o | ||
34 | 28 | ||
35 | targets := $(COFFOBJS) $(CHRPOBJS) $(NEWWORLDOBJS) dummy.o | 29 | targets := $(CHRPOBJS) dummy.o |
36 | COFFOBJS := $(addprefix $(obj)/, $(COFFOBJS)) | ||
37 | CHRPOBJS := $(addprefix $(obj)/, $(CHRPOBJS)) | 30 | CHRPOBJS := $(addprefix $(obj)/, $(CHRPOBJS)) |
38 | NEWWORLDOBJS := $(addprefix $(obj)/, $(NEWWORLDOBJS)) | ||
39 | 31 | ||
40 | LIBS := lib/lib.a $(bootlib)/lib.a $(of1275)/lib.a $(common)/lib.a | 32 | LIBS := lib/lib.a $(bootlib)/lib.a $(of1275)/lib.a $(common)/lib.a |
41 | 33 | ||
42 | HACKCOFF := $(utils)/hack-coff | ||
43 | |||
44 | ifdef CONFIG_SMP | 34 | ifdef CONFIG_SMP |
45 | END := .smp | 35 | END := .smp |
46 | endif | 36 | endif |
@@ -72,56 +62,11 @@ targets += image.initrd.o | |||
72 | $(obj)/image.initrd.o: $(obj)/image.o $(images)/ramdisk.image.gz FORCE | 62 | $(obj)/image.initrd.o: $(obj)/image.o $(images)/ramdisk.image.gz FORCE |
73 | $(call if_changed,genimage-initrd) | 63 | $(call if_changed,genimage-initrd) |
74 | 64 | ||
75 | # Create the note section for New-World PowerMacs. | ||
76 | quiet_cmd_mknote = MKNOTE $@ | ||
77 | cmd_mknote = $(utils)/mknote > $@ | ||
78 | targets += note | ||
79 | $(obj)/note: $(utils)/mknote FORCE | ||
80 | $(call if_changed,mknote) | ||
81 | |||
82 | 65 | ||
83 | $(obj)/coffcrt0.o: EXTRA_AFLAGS := -DXCOFF | 66 | targets += crt0.o |
84 | targets += coffcrt0.o crt0.o | 67 | $(obj)/crt0.o: $(common)/crt0.S FORCE |
85 | $(obj)/coffcrt0.o $(obj)/crt0.o: $(common)/crt0.S FORCE | ||
86 | $(call if_changed_dep,as_o_S) | 68 | $(call if_changed_dep,as_o_S) |
87 | 69 | ||
88 | quiet_cmd_gencoffb = COFF $@ | ||
89 | cmd_gencoffb = $(LD) -o $@ $(COFF_LD_ARGS) $(COFFOBJS) $< $(LIBS) && \ | ||
90 | $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) | ||
91 | targets += coffboot | ||
92 | $(obj)/coffboot: $(obj)/image.o $(COFFOBJS) $(LIBS) $(srctree)/$(boot)/ld.script FORCE | ||
93 | $(call if_changed,gencoffb) | ||
94 | targets += coffboot.initrd | ||
95 | $(obj)/coffboot.initrd: $(obj)/image.initrd.o $(COFFOBJS) $(LIBS) \ | ||
96 | $(srctree)/$(boot)/ld.script FORCE | ||
97 | $(call if_changed,gencoffb) | ||
98 | |||
99 | |||
100 | quiet_cmd_gen-coff = COFF $@ | ||
101 | cmd_gen-coff = $(OBJCOPY) $(OBJCOPY_ARGS) $< $@ && \ | ||
102 | $(HACKCOFF) $@ && \ | ||
103 | ln -sf $(notdir $@) $(images)/zImage$(initrd).pmac | ||
104 | |||
105 | $(images)/vmlinux.coff: $(obj)/coffboot | ||
106 | $(call cmd,gen-coff) | ||
107 | |||
108 | $(images)/vmlinux.initrd.coff: $(obj)/coffboot.initrd | ||
109 | $(call cmd,gen-coff) | ||
110 | |||
111 | quiet_cmd_gen-elf-pmac = ELF $@ | ||
112 | cmd_gen-elf-pmac = $(LD) $(NEWWORLD_LD_ARGS) -o $@ \ | ||
113 | $(NEWWORLDOBJS) $(LIBS) $< && \ | ||
114 | $(OBJCOPY) $@ $@ --add-section=.note=$(obj)/note \ | ||
115 | -R .comment $(del-ramdisk-sec) | ||
116 | |||
117 | $(images)/vmlinux.elf-pmac: $(obj)/image.o $(NEWWORLDOBJS) $(LIBS) \ | ||
118 | $(obj)/note $(srctree)/$(boot)/ld.script | ||
119 | $(call cmd,gen-elf-pmac) | ||
120 | $(images)/vmlinux.initrd.elf-pmac: $(obj)/image.initrd.o $(NEWWORLDOBJS) \ | ||
121 | $(LIBS) $(obj)/note \ | ||
122 | $(srctree)/$(boot)/ld.script | ||
123 | $(call cmd,gen-elf-pmac) | ||
124 | |||
125 | quiet_cmd_gen-chrp = CHRP $@ | 70 | quiet_cmd_gen-chrp = CHRP $@ |
126 | cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $(CHRPOBJS) $< $(LIBS) && \ | 71 | cmd_gen-chrp = $(LD) $(CHRP_LD_ARGS) -o $@ $(CHRPOBJS) $< $(LIBS) && \ |
127 | $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) | 72 | $(OBJCOPY) $@ $@ -R .comment $(del-ramdisk-sec) |
@@ -139,46 +84,23 @@ $(images)/zImage.chrp-rs6k $(images)/zImage.initrd.chrp-rs6k: \ | |||
139 | %-rs6k: % | 84 | %-rs6k: % |
140 | $(call cmd,addnote) | 85 | $(call cmd,addnote) |
141 | 86 | ||
142 | quiet_cmd_gen-miboot = GEN $@ | ||
143 | cmd_gen-miboot = $(OBJCOPY) $(OBJCOPY_ARGS) \ | ||
144 | --add-section=$1=$(word 2, $^) $< $@ | ||
145 | $(images)/miboot.image: $(obj)/dummy.o $(images)/vmlinux.gz | ||
146 | $(call cmd,gen-miboot,image) | ||
147 | |||
148 | $(images)/miboot.initrd.image: $(images)/miboot.image $(images)/ramdisk.image.gz | ||
149 | $(call cmd,gen-miboot,initrd) | ||
150 | |||
151 | # The targets used on the make command-line | 87 | # The targets used on the make command-line |
152 | 88 | ||
153 | .PHONY: zImage zImage.initrd | 89 | .PHONY: zImage zImage.initrd |
154 | zImage: $(images)/vmlinux.coff \ | 90 | zImage: $(images)/zImage.chrp \ |
155 | $(images)/vmlinux.elf-pmac \ | 91 | $(images)/zImage.chrp-rs6k |
156 | $(images)/zImage.chrp \ | ||
157 | $(images)/zImage.chrp-rs6k \ | ||
158 | $(images)/miboot.image | ||
159 | @echo ' kernel: $@ is ready ($<)' | 92 | @echo ' kernel: $@ is ready ($<)' |
160 | zImage.initrd: $(images)/vmlinux.initrd.coff \ | 93 | zImage.initrd: $(images)/zImage.initrd.chrp \ |
161 | $(images)/vmlinux.initrd.elf-pmac \ | 94 | $(images)/zImage.initrd.chrp-rs6k |
162 | $(images)/zImage.initrd.chrp \ | ||
163 | $(images)/zImage.initrd.chrp-rs6k \ | ||
164 | $(images)/miboot.initrd.image | ||
165 | @echo ' kernel: $@ is ready ($<)' | 95 | @echo ' kernel: $@ is ready ($<)' |
166 | 96 | ||
167 | TFTPIMAGE := /tftpboot/zImage | 97 | TFTPIMAGE := /tftpboot/zImage |
168 | 98 | ||
169 | .PHONY: znetboot znetboot.initrd | 99 | .PHONY: znetboot znetboot.initrd |
170 | znetboot: $(images)/vmlinux.coff \ | 100 | znetboot: $(images)/zImage.chrp |
171 | $(images)/vmlinux.elf-pmac \ | ||
172 | $(images)/zImage.chrp | ||
173 | cp $(images)/vmlinux.coff $(TFTPIMAGE).pmac$(END) | ||
174 | cp $(images)/vmlinux.elf-pmac $(TFTPIMAGE).pmac$(END).elf | ||
175 | cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END) | 101 | cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END) |
176 | @echo ' kernel: $@ is ready ($<)' | 102 | @echo ' kernel: $@ is ready ($<)' |
177 | znetboot.initrd:$(images)/vmlinux.initrd.coff \ | 103 | znetboot.initrd:$(images)/zImage.initrd.chrp |
178 | $(images)/vmlinux.initrd.elf-pmac \ | ||
179 | $(images)/zImage.initrd.chrp | ||
180 | cp $(images)/vmlinux.initrd.coff $(TFTPIMAGE).pmac$(END) | ||
181 | cp $(images)/vmlinux.initrd.elf-pmac $(TFTPIMAGE).pmac$(END).elf | ||
182 | cp $(images)/zImage.initrd.chrp $(TFTPIMAGE).chrp$(END) | 104 | cp $(images)/zImage.initrd.chrp $(TFTPIMAGE).chrp$(END) |
183 | @echo ' kernel: $@ is ready ($<)' | 105 | @echo ' kernel: $@ is ready ($<)' |
184 | 106 | ||