aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/Makefile
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2007-07-03 19:07:18 -0400
committerPaul Mackerras <paulus@samba.org>2007-07-10 07:56:40 -0400
commitbafdb645779c63300763acb383f7b9dd2d427228 (patch)
tree57a25d02c09a426dda4c45db50f63089a2f5a19d /arch/powerpc/boot/Makefile
parent76a5b8bb3525b63db137c714cf9ad5b3b99e75f0 (diff)
[POWERPC] PS3: Bootwrapper support.
Add support to build the PS3 flash rom image and remove some unneeded lmb calls. The PS3's lv1 loader supports loading gzipped binary images from flash rom to addr zero. The loader enters the image at addr 0x100. In this implementation a bootwrapper overlay is use to arrange for the kernel to be loaded to addr zero and to have a suitable bootwrapper entry at 0x100. To construct the rom image, 0x100 bytes from offset 0x100 in the kernel is copied to the bootwrapper symbol __system_reset_kernel. The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is then copied to offset 0x100. At runtime the bootwrapper program copies the 0x100 bytes at __system_reset_kernel to addr 0x100. zImage.ps3 is a wrapped image that contains a flat device tree, an lv1 compatible entry point, and an optional initrd. otheros.bld is the gzip compresed rom image built from zImage.ps3. otheros.bld is suitable for programming into the PS3 boot flash memory. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/Makefile')
-rw-r--r--arch/powerpc/boot/Makefile21
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 5b2c59b1b2a6..396821cfaad0 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -46,7 +46,8 @@ src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
46 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \ 46 gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
47 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c 47 44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c
48src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \ 48src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
49 cuboot-ebony.c treeboot-ebony.c prpmc2800.c 49 cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
50 ps3-head.S ps3-hvcall.S ps3.c
50src-boot := $(src-wlib) $(src-plat) empty.c 51src-boot := $(src-wlib) $(src-plat) empty.c
51 52
52src-boot := $(addprefix $(obj)/, $(src-boot)) 53src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -75,11 +76,11 @@ $(addprefix $(obj)/,$(zliblinuxheader)): $(obj)/%: $(srctree)/include/linux/%
75$(obj)/empty.c: 76$(obj)/empty.c:
76 @touch $@ 77 @touch $@
77 78
78$(obj)/zImage.lds $(obj)/zImage.coff.lds: $(obj)/%: $(srctree)/$(src)/%.S 79$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds: $(obj)/%: $(srctree)/$(src)/%.S
79 @cp $< $@ 80 @cp $< $@
80 81
81clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ 82clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
82 empty.c zImage.coff.lds zImage.lds 83 empty.c zImage zImage.coff.lds zImage.ps3.lds zImage.lds
83 84
84quiet_cmd_bootcc = BOOTCC $@ 85quiet_cmd_bootcc = BOOTCC $@
85 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< 86 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
@@ -102,7 +103,7 @@ hostprogs-y := addnote addRamDisk hack-coff mktree
102 103
103targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) 104targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a)
104extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ 105extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \
105 $(obj)/zImage.lds $(obj)/zImage.coff.lds 106 $(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds
106 107
107wrapper :=$(srctree)/$(src)/wrapper 108wrapper :=$(srctree)/$(src)/wrapper
108wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ 109wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
@@ -179,11 +180,12 @@ $(obj)/zImage.%: vmlinux $(wrapperbits) $(dts)
179$(obj)/zImage.iseries: vmlinux 180$(obj)/zImage.iseries: vmlinux
180 $(STRIP) -s -R .comment $< -o $@ 181 $(STRIP) -s -R .comment $< -o $@
181 182
182$(obj)/zImage.ps3: vmlinux 183$(obj)/zImage.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts
183 $(STRIP) -s -R .comment $< -o $@ 184 $(STRIP) -s -R .comment $< -o vmlinux.strip
185 $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,)
184 186
185$(obj)/zImage.initrd.ps3: vmlinux 187$(obj)/zImage.initrd.ps3: vmlinux $(wrapper) $(wrapperbits) $(srctree)/$(src)/dts/ps3.dts $(obj)/ramdisk.image.gz
186 @echo " WARNING zImage.initrd.ps3 not supported (yet)" 188 $(call cmd,wrap,ps3,$(srctree)/$(src)/dts/ps3.dts,,$(obj)/ramdisk.image.gz)
187 189
188$(obj)/uImage: vmlinux $(wrapperbits) 190$(obj)/uImage: vmlinux $(wrapperbits)
189 $(call if_changed,wrap,uboot) 191 $(call if_changed,wrap,uboot)
@@ -206,7 +208,8 @@ install: $(CONFIGURE) $(addprefix $(obj)/, $(image-y))
206 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $< 208 sh -x $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" vmlinux System.map "$(INSTALL_PATH)" $<
207 209
208# anything not in $(targets) 210# anything not in $(targets)
209clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* 211clean-files += $(image-) $(initrd-) zImage zImage.initrd cuImage.* treeImage.* \
212 otheros.bld
210 213
211# clean up files cached by wrapper 214# clean up files cached by wrapper
212clean-kernel := vmlinux.strip vmlinux.bin 215clean-kernel := vmlinux.strip vmlinux.bin