Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / t1_fpga / src / xilinx / prom / Makefile
CommitLineData
920dae64
AT
1# ========== Copyright Header Begin ==========================================
2#
3# OpenSPARC T2 Processor File: Makefile
4# Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
5# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
6#
7# The above named program is free software; you can redistribute it and/or
8# modify it under the terms of the GNU General Public
9# License version 2 as published by the Free Software Foundation.
10#
11# The above named program is distributed in the hope that it will be
12# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14# General Public License for more details.
15#
16# You should have received a copy of the GNU General Public
17# License along with this work; if not, write to the Free Software
18# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19#
20# ========== Copyright Header End ============================================
21#
22# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23# Use is subject to license terms.
24#
25
26TOP = ../..
27
28include $(TOP)/Makefile.common
29
30
31CONFIGS = 1c1t 1c4t 2c1t 2c4t
32
33XILINX_CONFIGS = $(XILINX_TOP)/configs
34XILINX_RESET = $(XILINX_TOP)/reset
35
36
37PROM_BINS = $(CONFIGS:%=%_prom.bin)
38OBP_PROM_BINS = $(CONFIGS:%=%_obp_prom.bin)
39RESET_BINS = $(CONFIGS:%=../%_reset.bin)
40HV_BINS = $(CONFIGS:%=../configs/%-hv.md)
41OBP_HV_BINS = $(CONFIGS:%=../configs/%-obp-hv.md)
42GUEST_BINS = $(CONFIGS:%=../configs/%-guest.md)
43
44
45MAKE_PROM = $(XILINX_TOOLS)/make_prom/make_prom
46
47
48all install :: $(PROM_BINS) $(OBP_PROM_BINS)
49
50
51$(PROM_BINS) $(OBP_PROM_BINS) : q.bin openboot.bin $(MAKE_PROM) nvram.bin $(RESET_BINS) $(HV_BINS) $(OBP_HV_BINS) $(GUEST_BINS)
52
53
54$(MAKE_PROM):
55 @cd $(XILINX_TOOLS)/make_prom ; make $(TARGET)
56
57$(RESET_BINS):
58 @cd $(XILINX_TOP)/reset ; make $(TARGET)
59
60$(HV_BINS) $(OBP_HV_BINS) $(GUEST_BINS):
61 @cd $(XILINX_TOP)/configs ; make $(TARGET)
62
63
64q.bin:
65 ln -fs $(SIM_ROOT)/hypervisor/src/greatlakes/ontario/t1_fpga/q.bin
66
67openboot.bin:
68 ln -fs $(SIM_ROOT)/obp/obp/arch/sun4v/niagara/t1_fpga/openboot.bin
69
70
71
721c1t_prom.bin: $(XILINX_RESET)/1c1t_reset.bin $(XILINX_CONFIGS)/1c1t-guest.md $(XILINX_CONFIGS)/1c1t-hv.md
73 $(MAKE_PROM) -g $(XILINX_CONFIGS)/1c1t-guest.md \
74 -H $(XILINX_CONFIGS)/1c1t-hv.md \
75 -r $(XILINX_RESET)/1c1t_reset.bin \
76 -p $@
77
781c4t_prom.bin: $(XILINX_RESET)/1c4t_reset.bin $(XILINX_CONFIGS)/1c4t-guest.md $(XILINX_CONFIGS)/1c4t-hv.md
79 $(MAKE_PROM) -g $(XILINX_CONFIGS)/1c4t-guest.md \
80 -H $(XILINX_CONFIGS)/1c4t-hv.md \
81 -r $(XILINX_RESET)/1c4t_reset.bin \
82 -p $@
83
842c1t_prom.bin: $(XILINX_RESET)/2c1t_reset.bin $(XILINX_CONFIGS)/2c1t-guest.md $(XILINX_CONFIGS)/2c1t-hv.md
85 $(MAKE_PROM) -g $(XILINX_CONFIGS)/2c1t-guest.md \
86 -H $(XILINX_CONFIGS)/2c1t-hv.md \
87 -r $(XILINX_RESET)/2c1t_reset.bin \
88 -p $@
89
902c4t_prom.bin: $(XILINX_RESET)/2c4t_reset.bin $(XILINX_CONFIGS)/2c4t-guest.md $(XILINX_CONFIGS)/2c4t-hv.md
91 $(MAKE_PROM) -g $(XILINX_CONFIGS)/2c4t-guest.md \
92 -H $(XILINX_CONFIGS)/2c4t-hv.md \
93 -r $(XILINX_RESET)/2c4t_reset.bin \
94 -p $@
95
961c1t_obp_prom.bin: $(XILINX_RESET)/1c1t_reset.bin $(XILINX_CONFIGS)/1c1t-guest.md $(XILINX_CONFIGS)/1c1t-obp-hv.md
97 $(MAKE_PROM) -g $(XILINX_CONFIGS)/1c1t-guest.md \
98 -H $(XILINX_CONFIGS)/1c1t-obp-hv.md \
99 -r $(XILINX_RESET)/1c1t_reset.bin \
100 -p $@
101
1021c4t_obp_prom.bin: $(XILINX_RESET)/1c4t_reset.bin $(XILINX_CONFIGS)/1c4t-guest.md $(XILINX_CONFIGS)/1c4t-obp-hv.md
103 $(MAKE_PROM) -g $(XILINX_CONFIGS)/1c4t-guest.md \
104 -H $(XILINX_CONFIGS)/1c4t-obp-hv.md \
105 -r $(XILINX_RESET)/1c4t_reset.bin \
106 -p $@
107
1082c1t_obp_prom.bin: $(XILINX_RESET)/2c1t_reset.bin $(XILINX_CONFIGS)/2c1t-guest.md $(XILINX_CONFIGS)/2c1t-obp-hv.md
109 $(MAKE_PROM) -g $(XILINX_CONFIGS)/2c1t-guest.md \
110 -H $(XILINX_CONFIGS)/2c1t-obp-hv.md \
111 -r $(XILINX_RESET)/2c1t_reset.bin \
112 -p $@
113
1142c4t_obp_prom.bin: $(XILINX_RESET)/2c4t_reset.bin $(XILINX_CONFIGS)/2c4t-guest.md $(XILINX_CONFIGS)/2c4t-obp-hv.md
115 $(MAKE_PROM) -g $(XILINX_CONFIGS)/2c4t-guest.md \
116 -H $(XILINX_CONFIGS)/2c4t-obp-hv.md \
117 -r $(XILINX_RESET)/2c4t_reset.bin \
118 -p $@
119
120
121clobber:: clean
122 $(RM) $(PROM_BINS) $(OBP_PROM_BINS)
123
124clean::
125 $(RM) openboot.bin q.bin 1c1t_reset.bin 1c4t_reset.bin 2c1t_reset.bin
126
127
128.KEEP_STATE: