2 echo "CROSS_COMPILE = powerpc-linux-" >>include/config.mk
4 # patch the examples/Makefile to ignore return value from OBJCOPY
5 sed -e 's/$(OBJCOPY)/-&/' < examples/Makefile > examples/makefile
7 # add a built target for mkimage on the target architecture
8 sed -e 's/^all:.*$/all: .depend envcrc mkimage mkimage.ppc/' < tools/Makefile > tools/makefile
10 cat <<EOF >>tools/makefile
11 mkimage.ppc : mkimage.o.ppc crc32.o.ppc
12 powerpc-linux-gcc -msoft-float -Wall -Wstrict-prototypes -o \$@ \$^
13 powerpc-linux-strip $@
15 XFLAGS="-D__KERNEL__ -I../include -DCONFIG_4xx -Wall -Wstict-prototypes"
16 mkimage.o.ppc: mkimage.c
17 powerpc-linux-gcc -msoft-float -Wall -I../include -c -o \$@ \$^
20 powerpc-linux-gcc -msoft-float -Wall -I../include -c -o \$@ \$^
24 # make an image by default out of the u-boot image
25 sed -e 's/^all:.*$/all: u-boot.image /' < Makefile > makefile
27 u-boot.image: u-boot.bin
28 tools/mkimage -A ppc -O linux -T firmware -C none -a 0 -e 0 -n U-Boot -d \$^ \$@