Rev 3803 | Rev 3907 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3803 | Rev 3884 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | ## Include configuration |
30 | ## Include configuration |
31 | # |
31 | # |
32 | 32 | ||
33 | include ../version |
33 | include ../version |
34 | -include ../Makefile.config |
34 | -include ../Makefile.config |
- | 35 | -include ../config.defs |
|
35 | 36 | ||
36 | INCLUDES = generic/include |
37 | INCLUDES = generic/include |
37 | OPTIMIZATION = 3 |
38 | OPTIMIZATION = 3 |
38 | 39 | ||
- | 40 | ifndef CROSS_PREFIX |
|
- | 41 | CROSS_PREFIX = /usr/local |
|
- | 42 | endif |
|
- | 43 | ||
39 | ## Common compiler flags |
44 | ## Common compiler flags |
40 | # |
45 | # |
41 | 46 | ||
42 | DEFS = -D$(ARCH) -DARCH=\"$(ARCH)\" -DRELEASE=\"$(RELEASE)\" "-DNAME=\"$(NAME)\"" \ |
47 | DEFS = -DKERNEL -DRELEASE=$(RELEASE) "-DNAME=$(NAME)" |
43 | -DKERNEL |
- | |
44 | 48 | ||
45 | GCC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) \ |
49 | GCC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \ |
46 | -fno-builtin -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes -Werror \ |
50 | -fno-builtin -Wall -Wextra -Wno-unused-parameter -Wmissing-prototypes -Werror \ |
47 | -nostdlib -nostdinc -pipe |
51 | -nostdlib -nostdinc -pipe |
48 | 52 | ||
49 | ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) \ |
53 | ICC_CFLAGS = -I$(INCLUDES) -O$(OPTIMIZATION) -imacros ../config.h \ |
50 | -fno-builtin -Wall -Wmissing-prototypes -Werror \ |
54 | -fno-builtin -Wall -Wmissing-prototypes -Werror \ |
51 | -nostdlib -nostdinc \ |
55 | -nostdlib -nostdinc \ |
52 | -wd170 |
56 | -wd170 |
53 | 57 | ||
54 | SUNCC_CFLAGS = -I$(INCLUDES) -xO$(OPTIMIZATION) \ |
58 | SUNCC_CFLAGS = -I$(INCLUDES) -xO$(OPTIMIZATION) \ |
Line 56... | Line 60... | ||
56 | -erroff=E_ZERO_SIZED_STRUCT_UNION |
60 | -erroff=E_ZERO_SIZED_STRUCT_UNION |
57 | 61 | ||
58 | LFLAGS = -M |
62 | LFLAGS = -M |
59 | AFLAGS = |
63 | AFLAGS = |
60 | 64 | ||
61 | ifdef REVISION |
- | |
62 | DEFS += "-DREVISION=\"$(REVISION)\"" |
- | |
63 | endif |
- | |
64 | - | ||
65 | ifdef TIMESTAMP |
- | |
66 | DEFS += "-DTIMESTAMP=\"$(TIMESTAMP)\"" |
- | |
67 | endif |
- | |
68 | - | ||
69 | -include arch/$(ARCH)/Makefile.inc |
65 | -include arch/$(KARCH)/Makefile.inc |
70 | -include genarch/Makefile.inc |
66 | -include genarch/Makefile.inc |
71 | 67 | ||
72 | ## The at-sign |
68 | ## The at-sign |
73 | # |
69 | # |
74 | # The $(ATSIGN) variable holds the ASCII character representing the at-sign |
70 | # The $(ATSIGN) variable holds the ASCII character representing the at-sign |
Line 82... | Line 78... | ||
82 | 78 | ||
83 | ## Cross-platform assembly to start a symtab.data section |
79 | ## Cross-platform assembly to start a symtab.data section |
84 | # |
80 | # |
85 | SYMTAB_SECTION=".section symtab.data, \"a\", $(ATSIGN)progbits;" |
81 | SYMTAB_SECTION=".section symtab.data, \"a\", $(ATSIGN)progbits;" |
86 | 82 | ||
87 | ## Setup kernel configuration |
- | |
88 | # |
- | |
89 | ifeq ($(CONFIG_DEBUG),y) |
- | |
90 | DEFS += -DCONFIG_DEBUG |
- | |
91 | endif |
- | |
92 | - | ||
93 | ifeq ($(CONFIG_LOG),y) |
- | |
94 | DEFS += -DCONFIG_LOG |
- | |
95 | endif |
- | |
96 | - | ||
97 | ifeq ($(CONFIG_KCONSOLE),y) |
- | |
98 | DEFS += -DCONFIG_KCONSOLE |
- | |
99 | endif |
- | |
100 | - | ||
101 | ifeq ($(CONFIG_DEBUG_SPINLOCK),y) |
- | |
102 | DEFS += -DCONFIG_DEBUG_SPINLOCK |
- | |
103 | endif |
- | |
104 | - | ||
105 | ifeq ($(CONFIG_DEBUG_AS_WATCHPOINT),y) |
- | |
106 | DEFS += -DCONFIG_DEBUG_AS_WATCHPOINT |
- | |
107 | endif |
- | |
108 | - | ||
109 | ifeq ($(CONFIG_FPU_LAZY),y) |
- | |
110 | DEFS += -DCONFIG_FPU_LAZY |
- | |
111 | endif |
- | |
112 | - | ||
113 | ifeq ($(CONFIG_DEBUG_ALLREGS),y) |
- | |
114 | DEFS += -DCONFIG_DEBUG_ALLREGS |
- | |
115 | endif |
- | |
116 | - | ||
117 | ifeq ($(CONFIG_VHPT),y) |
- | |
118 | DEFS += -DCONFIG_VHPT |
- | |
119 | endif |
- | |
120 | - | ||
121 | ifeq ($(CONFIG_TSB),y) |
- | |
122 | DEFS += -DCONFIG_TSB |
- | |
123 | endif |
- | |
124 | - | ||
125 | ifeq ($(CONFIG_Z8530),y) |
- | |
126 | DEFS += -DCONFIG_Z8530 |
- | |
127 | endif |
- | |
128 | - | ||
129 | ifeq ($(CONFIG_NS16550),y) |
- | |
130 | DEFS += -DCONFIG_NS16550 |
- | |
131 | endif |
- | |
132 | - | ||
133 | ifeq ($(CONFIG_I8042_INTERRUPT_DRIVEN),y) |
- | |
134 | DEFS += -DCONFIG_I8042_INTERRUPT_DRIVEN |
- | |
135 | endif |
- | |
136 | - | ||
137 | ifeq ($(CONFIG_NS16550_INTERRUPT_DRIVEN),y) |
- | |
138 | DEFS += -DCONFIG_NS16550_INTERRUPT_DRIVEN |
- | |
139 | endif |
- | |
140 | - | ||
141 | ifeq ($(CONFIG_IOSAPIC),y) |
- | |
142 | DEFS += -DCONFIG_IOSAPIC |
- | |
143 | endif |
- | |
144 | - | ||
145 | ifeq ($(CONFIG_VIRT_IDX_DCACHE),y) |
- | |
146 | DEFS += -DCONFIG_VIRT_IDX_DCACHE |
- | |
147 | endif |
- | |
148 | - | ||
149 | ifeq ($(CONFIG_FB),y) |
- | |
150 | ifeq ($(ARCH),ia32) |
- | |
151 | DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH) |
- | |
152 | DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT) |
- | |
153 | DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP) |
- | |
154 | endif |
- | |
155 | - | ||
156 | ifeq ($(ARCH),amd64) |
- | |
157 | DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH) |
- | |
158 | DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT) |
- | |
159 | DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP) |
- | |
160 | endif |
- | |
161 | - | ||
162 | ifeq ($(ARCH),ia32xen) |
- | |
163 | DEFS += -DCONFIG_VESA_WIDTH=$(CONFIG_VESA_WIDTH) |
- | |
164 | DEFS += -DCONFIG_VESA_HEIGHT=$(CONFIG_VESA_HEIGHT) |
- | |
165 | DEFS += -DCONFIG_VESA_BPP=$(CONFIG_VESA_BPP) |
- | |
166 | endif |
- | |
167 | endif |
- | |
168 | - | ||
169 | ifeq ($(CONFIG_UDEBUG),y) |
- | |
170 | DEFS += -DCONFIG_UDEBUG |
- | |
171 | endif |
- | |
172 | - | ||
173 | ## Simple detection for the type of the host system |
83 | ## Simple detection for the type of the host system |
174 | # |
84 | # |
175 | HOST = $(shell uname) |
85 | HOST = $(shell uname) |
176 | 86 | ||
177 | ## On Solaris, some utilities have slightly different names |
87 | ## On Solaris, some utilities have slightly different names |
Line 192... | Line 102... | ||
192 | LD = $(BINUTILS_PREFIX)ld |
102 | LD = $(BINUTILS_PREFIX)ld |
193 | OBJCOPY = $(BINUTILS_PREFIX)objcopy |
103 | OBJCOPY = $(BINUTILS_PREFIX)objcopy |
194 | OBJDUMP = $(BINUTILS_PREFIX)objdump |
104 | OBJDUMP = $(BINUTILS_PREFIX)objdump |
195 | LIBDIR = /usr/lib |
105 | LIBDIR = /usr/lib |
196 | CFLAGS = $(GCC_CFLAGS) |
106 | CFLAGS = $(GCC_CFLAGS) |
- | 107 | DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) |
|
197 | endif |
108 | endif |
198 | 109 | ||
199 | ifeq ($(COMPILER),icc_native) |
110 | ifeq ($(COMPILER),icc_native) |
200 | CC = icc |
111 | CC = icc |
201 | GCC = gcc |
112 | GCC = gcc |
Line 203... | Line 114... | ||
203 | LD = ld |
114 | LD = ld |
204 | OBJCOPY = objcopy |
115 | OBJCOPY = objcopy |
205 | OBJDUMP = objdump |
116 | OBJDUMP = objdump |
206 | LIBDIR = /usr/lib |
117 | LIBDIR = /usr/lib |
207 | CFLAGS = $(ICC_CFLAGS) |
118 | CFLAGS = $(ICC_CFLAGS) |
- | 119 | DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) |
|
208 | endif |
120 | endif |
209 | 121 | ||
210 | ifeq ($(COMPILER),suncc_native) |
122 | ifeq ($(COMPILER),suncc_native) |
211 | CC = suncc |
123 | CC = suncc |
212 | GCC = gcc |
124 | GCC = gcc |
Line 214... | Line 126... | ||
214 | LD = $(BINUTILS_PREFIX)ld |
126 | LD = $(BINUTILS_PREFIX)ld |
215 | OBJCOPY = $(BINUTILS_PREFIX)objcopy |
127 | OBJCOPY = $(BINUTILS_PREFIX)objcopy |
216 | OBJDUMP = $(BINUTILS_PREFIX)objdump |
128 | OBJDUMP = $(BINUTILS_PREFIX)objdump |
217 | LIBDIR = /usr/lib |
129 | LIBDIR = /usr/lib |
218 | CFLAGS = $(SUNCC_CFLAGS) |
130 | CFLAGS = $(SUNCC_CFLAGS) |
- | 131 | DEFS += $(CONFIG_DEFS) |
|
- | 132 | DEPEND_DEFS = $(DEFS) |
|
219 | endif |
133 | endif |
220 | 134 | ||
221 | ifeq ($(COMPILER),gcc_cross) |
135 | ifeq ($(COMPILER),gcc_cross) |
222 | CC = $(TOOLCHAIN_DIR)/bin/$(TARGET)-gcc |
136 | CC = $(TOOLCHAIN_DIR)/bin/$(TARGET)-gcc |
223 | GCC = $(CC) |
137 | GCC = $(CC) |
Line 225... | Line 139... | ||
225 | LD = $(TOOLCHAIN_DIR)/bin/$(TARGET)-ld |
139 | LD = $(TOOLCHAIN_DIR)/bin/$(TARGET)-ld |
226 | OBJCOPY = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objcopy |
140 | OBJCOPY = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objcopy |
227 | OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump |
141 | OBJDUMP = $(TOOLCHAIN_DIR)/bin/$(TARGET)-objdump |
228 | LIBDIR = $(TOOLCHAIN_DIR)/lib |
142 | LIBDIR = $(TOOLCHAIN_DIR)/lib |
229 | CFLAGS = $(GCC_CFLAGS) |
143 | CFLAGS = $(GCC_CFLAGS) |
- | 144 | DEPEND_DEFS = $(DEFS) $(CONFIG_DEFS) |
|
230 | endif |
145 | endif |
231 | 146 | ||
232 | ## Generic kernel sources |
147 | ## Generic kernel sources |
233 | # |
148 | # |
234 | 149 | ||
Line 323... | Line 238... | ||
323 | 238 | ||
324 | ## Test sources |
239 | ## Test sources |
325 | # |
240 | # |
326 | 241 | ||
327 | ifeq ($(CONFIG_TEST),y) |
242 | ifeq ($(CONFIG_TEST),y) |
328 | DEFS += -DCONFIG_TEST |
- | |
329 | CFLAGS += -Itest/ |
243 | CFLAGS += -Itest/ |
330 | GENERIC_SOURCES += \ |
244 | GENERIC_SOURCES += \ |
331 | test/test.c \ |
245 | test/test.c \ |
332 | test/atomic/atomic1.c \ |
246 | test/atomic/atomic1.c \ |
333 | test/btree/btree1.c \ |
247 | test/btree/btree1.c \ |
334 | test/avltree/avltree1.c \ |
248 | test/avltree/avltree1.c \ |
335 | test/debug/mips1.c \ |
249 | test/debug/mips1.c \ |
336 | test/fault/fault1.c \ |
250 | test/fault/fault1.c \ |
337 | test/fpu/fpu1.c \ |
- | |
338 | test/fpu/sse1.c \ |
- | |
339 | test/fpu/mips2.c \ |
- | |
340 | test/mm/falloc1.c \ |
251 | test/mm/falloc1.c \ |
341 | test/mm/falloc2.c \ |
252 | test/mm/falloc2.c \ |
342 | test/mm/mapping1.c \ |
253 | test/mm/mapping1.c \ |
343 | test/mm/slab1.c \ |
254 | test/mm/slab1.c \ |
344 | test/mm/slab2.c \ |
255 | test/mm/slab2.c \ |
Line 351... | Line 262... | ||
351 | test/synch/semaphore1.c \ |
262 | test/synch/semaphore1.c \ |
352 | test/synch/semaphore2.c \ |
263 | test/synch/semaphore2.c \ |
353 | test/print/print1.c \ |
264 | test/print/print1.c \ |
354 | test/thread/thread1.c \ |
265 | test/thread/thread1.c \ |
355 | test/sysinfo/sysinfo1.c |
266 | test/sysinfo/sysinfo1.c |
- | 267 | ||
- | 268 | ifeq ($(CONFIG_FPU),y) |
|
- | 269 | ifeq ($(KARCH),ia32) |
|
- | 270 | TEST_FPU1 = y |
|
- | 271 | TEST_SSE1 = y |
|
- | 272 | endif |
|
- | 273 | ||
- | 274 | ifeq ($(KARCH),amd64) |
|
- | 275 | TEST_FPU1 = y |
|
- | 276 | TEST_SSE1 = y |
|
- | 277 | endif |
|
- | 278 | ||
- | 279 | ifeq ($(KARCH),ia64) |
|
- | 280 | TEST_FPU1 = y |
|
- | 281 | endif |
|
- | 282 | ||
- | 283 | ifeq ($(KARCH),mips32) |
|
- | 284 | TEST_MIPS2 = y |
|
- | 285 | endif |
|
- | 286 | endif |
|
- | 287 | ||
- | 288 | ifeq ($(TEST_FPU1),y) |
|
- | 289 | GENERIC_SOURCES += test/fpu/fpu1.c |
|
- | 290 | else |
|
- | 291 | GENERIC_SOURCES += test/fpu/fpu1_skip.c |
|
- | 292 | endif |
|
- | 293 | ||
- | 294 | ifeq ($(TEST_SSE1),y) |
|
- | 295 | GENERIC_SOURCES += test/fpu/sse1.c |
|
- | 296 | else |
|
- | 297 | GENERIC_SOURCES += test/fpu/sse1_skip.c |
|
- | 298 | endif |
|
- | 299 | ||
- | 300 | ifeq ($(TEST_MIPS2),y) |
|
- | 301 | GENERIC_SOURCES += test/fpu/mips2.c |
|
- | 302 | else |
|
- | 303 | GENERIC_SOURCES += test/fpu/mips2_skip.c |
|
- | 304 | endif |
|
- | 305 | ||
356 | endif |
306 | endif |
357 | 307 | ||
358 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
308 | GENERIC_OBJECTS := $(addsuffix .o,$(basename $(GENERIC_SOURCES))) |
359 | ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
309 | ARCH_OBJECTS := $(addsuffix .o,$(basename $(ARCH_SOURCES))) |
360 | GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) |
310 | GENARCH_OBJECTS := $(addsuffix .o,$(basename $(GENARCH_SOURCES))) |
361 | 311 | ||
362 | .PHONY: all build clean archlinks depend disasm |
312 | .PHONY: all build clean archlinks depend disasm |
363 | 313 | ||
364 | all: ../Makefile.config |
314 | all: ../Makefile.config ../config.h ../config.defs |
365 | -rm Makefile.depend |
315 | -rm Makefile.depend |
366 | $(MAKE) -C . build |
316 | $(MAKE) -C . build |
367 | 317 | ||
368 | build: kernel.bin disasm |
318 | build: kernel.bin disasm |
369 | 319 | ||
370 | -include Makefile.depend |
320 | -include Makefile.depend |
371 | 321 | ||
372 | clean: |
322 | clean: |
373 | -rm -f kernel.bin kernel.raw kernel.map kernel.map.pre kernel.objdump kernel.disasm generic/src/debug/real_map.bin Makefile.depend* generic/include/arch generic/include/genarch arch/$(ARCH)/_link.ld |
323 | -rm -f kernel.bin kernel.raw kernel.map kernel.map.pre kernel.objdump kernel.disasm generic/src/debug/real_map.bin Makefile.depend* generic/include/arch generic/include/genarch arch/$(KARCH)/_link.ld |
374 | find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \; |
324 | find generic/src/ arch/*/src/ genarch/src/ test/ -name '*.o' -follow -exec rm \{\} \; |
375 | for arch in arch/* ; do \ |
325 | for arch in arch/* ; do \ |
376 | [ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null ; \ |
326 | [ -e $$arch/_link.ld ] && rm $$arch/_link.ld 2>/dev/null ; \ |
377 | done ; exit 0 |
327 | done ; exit 0 |
378 | 328 | ||
379 | archlinks: |
329 | archlinks: |
380 | ln -sfn ../../arch/$(ARCH)/include/ generic/include/arch |
330 | ln -sfn ../../arch/$(KARCH)/include/ generic/include/arch |
381 | ln -sfn ../../genarch/include/ generic/include/genarch |
331 | ln -sfn ../../genarch/include/ generic/include/genarch |
382 | 332 | ||
383 | depend: archlinks |
333 | depend: archlinks |
384 | -makedepend -f - -- $(DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
334 | -makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > Makefile.depend 2> /dev/null |
385 | 335 | ||
386 | arch/$(ARCH)/_link.ld: arch/$(ARCH)/_link.ld.in |
336 | arch/$(KARCH)/_link.ld: arch/$(KARCH)/_link.ld.in |
387 | $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@ |
337 | $(GCC) $(DEFS) $(GCC_CFLAGS) -D__ASM__ -D__LINKER__ -E -x c $< | grep -v "^\#" > $@ |
388 | 338 | ||
389 | generic/src/debug/real_map.bin: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) |
339 | generic/src/debug/real_map.bin: depend arch/$(KARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) |
390 | echo $(SYMTAB_SECTION) | $(AS) $(AFLAGS) -o generic/src/debug/empty_map.o |
340 | echo $(SYMTAB_SECTION) | $(AS) $(AFLAGS) -o generic/src/debug/empty_map.o |
391 | $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/empty_map.o -o $@ -Map kernel.map.pre |
341 | $(LD) -T arch/$(KARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/empty_map.o -o $@ -Map kernel.map.pre |
392 | $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump |
342 | $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump |
393 | tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin |
343 | tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin |
394 | # Do it once again, this time to get correct even the symbols |
344 | # Do it once again, this time to get correct even the symbols |
395 | # on architectures, that have bss after symtab |
345 | # on architectures, that have bss after symtab |
396 | echo $(SYMTAB_SECTION)" .incbin \"$@\"" | $(AS) $(AFLAGS) -o generic/src/debug/sizeok_map.o |
346 | echo $(SYMTAB_SECTION)" .incbin \"$@\"" | $(AS) $(AFLAGS) -o generic/src/debug/sizeok_map.o |
397 | $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre |
347 | $(LD) -T arch/$(KARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/sizeok_map.o -o $@ -Map kernel.map.pre |
398 | $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump |
348 | $(OBJDUMP) -t $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) > kernel.objdump |
399 | tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin |
349 | tools/genmap.py kernel.map.pre kernel.objdump generic/src/debug/real_map.bin |
400 | 350 | ||
401 | generic/src/debug/real_map.o: generic/src/debug/real_map.bin |
351 | generic/src/debug/real_map.o: generic/src/debug/real_map.bin |
402 | echo $(SYMTAB_SECTION)" .incbin \"$<\"" | $(AS) $(AFLAGS) -o $@ |
352 | echo $(SYMTAB_SECTION)" .incbin \"$<\"" | $(AS) $(AFLAGS) -o $@ |
403 | 353 | ||
404 | kernel.raw: depend arch/$(ARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/real_map.o |
354 | kernel.raw: depend arch/$(KARCH)/_link.ld $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) generic/src/debug/real_map.o |
405 | $(LD) -T arch/$(ARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/real_map.o -o $@ -Map kernel.map |
355 | $(LD) -T arch/$(KARCH)/_link.ld $(LFLAGS) $(ARCH_OBJECTS) $(GENARCH_OBJECTS) $(GENERIC_OBJECTS) $(EXTRA_OBJECTS) generic/src/debug/real_map.o -o $@ -Map kernel.map |
406 | 356 | ||
407 | kernel.bin: kernel.raw |
357 | kernel.bin: kernel.raw |
408 | $(OBJCOPY) -O $(BFD) kernel.raw kernel.bin |
358 | $(OBJCOPY) -O $(BFD) kernel.raw kernel.bin |
409 | 359 | ||
410 | disasm: kernel.raw |
360 | disasm: kernel.raw |