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>

+27 -6
+23 -6
arch/powerpc/boot/Makefile
··· 27 27 BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc 28 28 OBJCOPYFLAGS := contents,alloc,load,readonly,data 29 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 32 zlib := infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c 32 33 zlibheader := infblock.h infcodes.h inffast.h inftrees.h infutil.h ··· 91 90 hostprogs-y := addnote addRamDisk hack-coff 92 91 93 92 targets += zImage.vmode zImage.initrd.vmode zImage zImage.initrd \ 94 - zImage.coff zImage.initrd.coff \ 93 + zImage.coff zImage.initrd.coff miboot.image miboot.initrd.image \ 95 94 $(patsubst $(obj)/%,%, $(call obj-sec, $(required) $(initrd))) \ 96 95 $(patsubst $(obj)/%,%, $(call src-sec, $(required) $(initrd))) \ 97 96 $(patsubst $(obj)/%,%, $(call gz-sec, $(required) $(initrd))) \ 98 - vmlinux.initrd 97 + vmlinux.initrd dummy.o 99 98 extra-y := initrd.o 100 99 101 100 quiet_cmd_ramdisk = RAMDISK $@ ··· 116 115 117 116 quiet_cmd_addnote = ADDNOTE $@ 118 117 cmd_addnote = $(obj)/addnote $@ 118 + 119 + quiet_cmd_gen-miboot = GEN $@ 120 + cmd_gen-miboot = $(OBJCOPY) $(OBJCOPY_MIB_ARGS) \ 121 + --add-section=$1=$(word 2, $^) $< $@ 119 122 120 123 quiet_cmd_gencoff = COFF $@ 121 124 cmd_gencoff = $(OBJCOPY) $(OBJCOPY_COFF_ARGS) $@ && \ ··· 146 141 $(obj)/zImage.initrd.vmode: $(call obj-sec, $(required) $(initrd)) $(obj-boot) $(srctree)/$(src)/zImage.lds 147 142 $(call cmd,bootld,$(obj-boot),zImage.lds) 148 143 149 - # For 32-bit powermacs, build the COFF images as well as the ELF images. 144 + # For 32-bit powermacs, build the COFF and miboot images 145 + # as well as the ELF images. 150 146 coffimage-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.coff 151 147 coffrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/zImage.initrd.coff 148 + mibootimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/miboot.image 149 + mibrdimg-$(CONFIG_PPC_PMAC)-$(CONFIG_PPC32) := $(obj)/miboot.initrd.image 152 150 153 - $(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote $(coffimage-y-y) 151 + $(obj)/zImage: $(obj)/zImage.vmode $(obj)/addnote $(coffimage-y-y) \ 152 + $(mibootimg-y-y) 154 153 @cp -f $< $@ 155 154 $(call if_changed,addnote) 156 155 157 - $(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote $(coffrdimg-y-y) 156 + $(obj)/zImage.initrd: $(obj)/zImage.initrd.vmode $(obj)/addnote \ 157 + $(coffrdimg-y-y) $(mibrdimg-y-y) 158 158 @cp -f $< $@ 159 159 $(call if_changed,addnote) 160 160 161 - $(obj)/zImage.coff: $(call obj-sec, $(required)) $(obj-boot) $(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff 161 + $(obj)/zImage.coff: $(call obj-sec, $(required)) $(obj-boot) \ 162 + $(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff 162 163 $(call cmd,bootld,$(obj-boot),zImage.coff.lds) 163 164 $(call cmd,gencoff) 164 165 ··· 172 161 $(srctree)/$(src)/zImage.coff.lds $(obj)/hack-coff 173 162 $(call cmd,bootld,$(obj-boot),zImage.coff.lds) 174 163 $(call cmd,gencoff) 164 + 165 + $(obj)/miboot.image: $(obj)/dummy.o $(obj)/vmlinux.gz 166 + $(call cmd,gen-miboot,image) 167 + 168 + $(obj)/miboot.initrd.image: $(obj)/miboot.image $(images)/ramdisk.image.gz 169 + $(call cmd,gen-miboot,initrd) 175 170 176 171 #----------------------------------------------------------- 177 172 # build u-boot images
+4
arch/powerpc/boot/dummy.c
··· 1 + int main(void) 2 + { 3 + return 0; 4 + }