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