|
|
1.1 root 1: # *****************************************************************************
2: # * Copyright (c) 2004, 2008 IBM Corporation
3: # * All rights reserved.
4: # * This program and the accompanying materials
5: # * are made available under the terms of the BSD License
6: # * which accompanies this distribution, and is available at
7: # * http://www.opensource.org/licenses/bsd-license.php
8: # *
9: # * Contributors:
10: # * IBM Corporation - initial implementation
11: # ****************************************************************************/
12:
13: include $(TOPCMNDIR)/make.rules
14:
15: SNKDIR = $(TOPCMNDIR)/clients/net-snk
16:
17: CFLAGS += -fno-builtin -I$(LIBCMNDIR)/libc/include
18: CFLAGS += -I$(SNKDIR)/include -I. $(CPUARCHDEF)
19: CFLAGS += -I$(INCLBRDDIR) -I.. -I$(INCLCMNDIR)/$(CPUARCH)
20: CFLAGS += -O2 -msoft-float -Wa,-mregnames $(RELEASE)
21:
22: OBJS = $(SNKDIR)/kernel/kernel.o
23: OBJS += $(SNKDIR)/oflib/oflib.o
24: OBJS += $(SNKDIR)/libc/time/timer.o
25: OBJS += $(LIBCMNDIR)/libc.a entry.o main.o of.elf takeover.o
26:
27: %.o: %.S
28: $(CC) $(CFLAGS) -c $^
29:
30: all: takeover.elf
31:
32: takeover.elf: ppc32wrap.o takeover.elf32
33: @echo " ====== Building $@ ======"
34: $(LD) -N -melf32ppclinux -static -nostdlib \
35: -Ttext=0x400000 -Tdata=0x400100 \
36: $(LDFLAGS) $^ -o $@
37:
38: takeover.elf64: entry.o main.o takeover.o $(SNKDIR)/libc/time/timer.o of.elf
39: make -C $(LIBCMNDIR) libc
40: make -C $(CLIENTSDIR)
41: $(LD) $(LDFLAGS) -o $@ -Tclient.lds $(OBJS)
42:
43: of.elf: ../../boot_rom.bin
44: $(OBJCOPY) --input-target=binary --binary-architecture=powerpc -O elf64-powerpc $< $@
45:
46: takeover.elf32: takeover.elf64
47: $(OBJCOPY) -O binary $^ takeover.tmp
48: $(OBJCOPY) --input-target=binary --binary-architecture=powerpc -O elf32-powerpc takeover.tmp $@
49:
50: ppc32wrap.o: ppc32wrap.S
51: $(CROSS)gcc -m32 -a32 $(CFLAGS) -c $< -o $@
52:
53: clean distclean:
54: make -C $(LIBCMNDIR) $@
55: make -C $(CLIENTSDIR) $@
56: $(RM) *.o *.bin *.elf
57: $(RM) takeover.elf32 takeover.elf64 takeover.tmp
58: %.o: %.oco
59: cp -f $< $@
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.