diff options
author | Paul Mackerras <paulus@samba.org> | 2006-01-14 21:00:08 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-14 21:00:08 -0500 |
commit | 9216ad8cb7849d88b6d8e9f097718de4f25d4121 (patch) | |
tree | a147d159f8f02c41280318d4da1facac4985c752 /arch | |
parent | 7c7dce9209161eb260cdf9e9172f72c3a02379e6 (diff) |
powerpc/32: Generate miboot images with ARCH=powerpc
Miboot images are apparently still used on some old 32-bit powermacs,
so build them with ARCH=powerpc if we're 32-bit and powermac support
is enabled.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/boot/Makefile | 29 | ||||
-rw-r--r-- | arch/powerpc/boot/dummy.c | 4 |
2 files changed, 27 insertions, 6 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 788dec4c7ef..840ae595a61 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -27,6 +27,7 @@ BOOTCFLAGS := $(HOSTCFLAGS) -fno-builtin -nostdinc -isystem \ | |||
27 | BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc | 27 | BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc |
28 | OBJCOPYFLAGS := contents,alloc,load,readonly,data | 28 | OBJCOPYFLAGS := contents,alloc,load,readonly,data |
29 | OBJCOPY_COFF_ARGS := -O aixcoff-rs6000 --set-start 0x500000 | 29 | OBJCOPY_COFF_ARGS := -O aixcoff-rs6000 --set-start 0x500000 |
30 | OBJCOPY_MIB_ARGS := -O aixcoff-rs6000 -R .stab -R .stabstr -R .comment | ||
30 | 31 | ||
31 | zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c | 32 | zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c |
32 | zlibheader := infblock.h infcodes.h inffast.h inftrees.h infutil.h | 33 | zlibheader := infblock.h infcodes.h inffast.h inftrees.h infutil.h |
@@ -90,11 +91,11 @@ gz-sec = $(foreach section, $(1), $(patsubst %,$(obj)/kernel-%.gz, $(section))) | |||
90 | hostprogs-y := addnote addRamDisk hack-coff | 91 | hostprogs-y := addnote addRamDisk hack-coff |
91 | 92 | ||
92 | targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd \ | 93 | targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd \ |
93 | zImage.coff zImage.initrd.coff \ | 94 | zImage.coff zImage.initrd.coff miboot.image miboot.initrd.image \ |
94 | $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \ | 95 | $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \ |
95 | $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \ | 96 | $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \ |
96 | $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \ | 97 | $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \ |
97 | vmlinux.initrd | 98 | vmlinux.initrd dummy.o |
98 | extra-y := initrd.o | 99 | extra-y := initrd.o |
99 | 100 | ||
100 | quiet_cmd_ramdisk = RAMDISK $@ | 101 | quiet_cmd_ramdisk = RAMDISK $@ |
@@ -116,6 +117,10 @@ quiet_cmd_addsection = ADDSEC $@ | |||
116 | quiet_cmd_addnote = ADDNOTE $@ | 117 | quiet_cmd_addnote = ADDNOTE $@ |
117 | cmd_addnote = $(obj)/addnote $@ | 118 | cmd_addnote = $(obj)/addnote $@ |
118 | 119 | ||
120 | quiet_cmd_gen-miboot = GEN $@ | ||
121 | cmd_gen-miboot = $(OBJCOPY) $(OBJCOPY_MIB_ARGS) \ | ||
122 | --add-section=$1=$(word 2, $^) $< $@ | ||
123 | |||
119 | quiet_cmd_gencoff = COFF $@ | 124 | quiet_cmd_gencoff = COFF $@ |
120 | cmd_gencoff = $(OBJCOPY) $(OBJCOPY_COFF_ARGS) $@ && \ | 125 | cmd_gencoff = $(OBJCOPY) $(OBJCOPY_COFF_ARGS) $@ && \ |
121 | $(obj)/hack-coff $@ | 126 | $(obj)/hack-coff $@ |
@@ -141,19 +146,25 @@ $(obj)/zImage.initrd.vmode $(obj)/zImage.initrd.coff: obj-boot += $(call obj-sec | |||
141 | $(obj)/zImage.initrd.vmode: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(srctree)/$(src)/zImage.lds | 146 | $(obj)/zImage.initrd.vmode: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(srctree)/$(src)/zImage.lds |
142 | $(call cmd,bootld,$(obj-boot),zImage.lds) | 147 | $(call cmd,bootld,$(obj-boot),zImage.lds) |
143 | 148 | ||
144 | # For 32-bit powermacs, build the COFF images as well as the ELF images. | 149 | # For 32-bit powermacs, build the COFF and miboot images |
150 | # as well as the ELF images. | ||
145 | coffimage-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.coff | 151 | coffimage-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.coff |
146 | coffrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.initrd.coff | 152 | coffrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.initrd.coff |
153 | mibootimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/miboot.image | ||
154 | mibrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/miboot.initrd.image | ||
147 | 155 | ||
148 | $(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote $(coffimage-y-y) | 156 | $(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote $(coffimage-y-y) \ |
157 | $(mibootimg-y-y) | ||
149 | @cp -f $< $@ | 158 | @cp -f $< $@ |
150 | $(call if_changed,addnote) | 159 | $(call if_changed,addnote) |
151 | 160 | ||
152 | $(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote $(coffrdimg-y-y) | 161 | $(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote \ |
162 | $(coffrdimg-y-y) $(mibrdimg-y-y) | ||
153 | @cp -f $< $@ | 163 | @cp -f $< $@ |
154 | $(call if_changed,addnote) | 164 | $(call if_changed,addnote) |
155 | 165 | ||
156 | $(obj)/zImage.coff: $(call obj-sec, $(required)) $(obj-boot) $(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff | 166 | $(obj)/zImage.coff: $(call obj-sec, $(required)) $(obj-boot) \ |
167 | $(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff | ||
157 | $(call cmd,bootld,$(obj-boot),zImage.coff.lds) | 168 | $(call cmd,bootld,$(obj-boot),zImage.coff.lds) |
158 | $(call cmd,gencoff) | 169 | $(call cmd,gencoff) |
159 | 170 | ||
@@ -162,6 +173,12 @@ $(obj)/zImage.initrd.coff: $(call obj-sec, $(required) $(initrd)) $(obj-boot) \ | |||
162 | $(call cmd,bootld,$(obj-boot),zImage.coff.lds) | 173 | $(call cmd,bootld,$(obj-boot),zImage.coff.lds) |
163 | $(call cmd,gencoff) | 174 | $(call cmd,gencoff) |
164 | 175 | ||
176 | $(obj)/miboot.image: $(obj)/dummy.o $(obj)/vmlinux.gz | ||
177 | $(call cmd,gen-miboot,image) | ||
178 | |||
179 | $(obj)/miboot.initrd.image: $(obj)/miboot.image $(images)/ramdisk.image.gz | ||
180 | $(call cmd,gen-miboot,initrd) | ||
181 | |||
165 | #----------------------------------------------------------- | 182 | #----------------------------------------------------------- |
166 | # build u-boot images | 183 | # build u-boot images |
167 | #----------------------------------------------------------- | 184 | #----------------------------------------------------------- |
diff --git a/arch/powerpc/boot/dummy.c b/arch/powerpc/boot/dummy.c new file mode 100644 index 00000000000..31dbf45bf99 --- /dev/null +++ b/arch/powerpc/boot/dummy.c | |||
@@ -0,0 +1,4 @@ | |||
1 | int main(void) | ||
2 | { | ||
3 | return 0; | ||
4 | } | ||