annotate src/old_makefiles/Makefile.osx @ 231:08cd784ddbc0

rename inode.h
author menikon
date Sat, 25 Jan 2020 20:37:53 +0900
parents ed85941a7514
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
1 # specify path to QEMU, installed with MacPorts
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
2 QEMU = qemu-system-arm
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
3
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
4 include makefile-osx.inc
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
5
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
6 # link the libgcc.a for __aeabi_idiv. ARM has no native support for div
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
7 LIBS = $(LIBGCC)
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
8
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
9 OBJS = \
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
10 lib/string.o \
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
11 \
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
12 arm.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
13 asm.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
14 bio.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
15 buddy.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
16 console.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
17 exec.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
18 file.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
19 fs.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
20 log.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
21 main.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
22 memide.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
23 pipe.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
24 proc.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
25 spinlock.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
26 start.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
27 swtch.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
28 syscall.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
29 sysfile.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
30 sysproc.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
31 trap_asm.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
32 trap.o\
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
33 vm.o \
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
34 \
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
35 device/picirq.o \
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
36 device/timer.o \
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
37 device/uart.o
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
38
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
39 KERN_OBJS = $(OBJS) entry-osx.o
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
40 kernel.elf: $(addprefix build/,$(KERN_OBJS)) kernel.ld build/initcode build/fs.img
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
41 cp -f build/initcode initcode
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
42 cp -f build/fs.img fs.img
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
43 $(call LINK_BIN, kernel.ld, kernel.elf, \
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
44 $(addprefix build/,$(KERN_OBJS)), \
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
45 initcode fs.img)
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
46 $(OBJDUMP) -S kernel.elf > kernel.asm
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
47 $(OBJDUMP) -t kernel.elf | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > kernel.sym
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
48 rm -f initcode fs.img
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
49
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
50 qemu: kernel.elf
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
51 @clear
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
52 @echo "Press Ctrl-A and then X to terminate QEMU session\n"
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
53 $(QEMU) -M versatilepb -m 128 -cpu arm1176 -nographic -kernel kernel.elf
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
54
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
55 INITCODE_OBJ = initcode.o
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
56 $(addprefix build/,$(INITCODE_OBJ)): initcode.S
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
57 $(call build-directory)
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
58 $(call AS_WITH, -nostdinc -I.)
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
59
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
60 #initcode is linked into the kernel, it will be used to craft the first process
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
61 build/initcode: $(addprefix build/,$(INITCODE_OBJ))
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
62 $(call LINK_INIT, -e start )
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
63 $(call OBJCOPY_INIT)
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
64 $(OBJDUMP) -S $< > initcode.asm
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
65
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
66 build/fs.img:
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
67 make -C tools
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
68 make -C usr
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
69
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
70 clean:
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
71 rm -rf build
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
72 rm -f *.o *.d *.asm *.sym vectors.S bootblock entryother \
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
73 initcode initcode.out kernel xv6.img fs.img kernel.elf memfs
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
74 make -C tools clean
0bbeb1a284e2 fix entry asmcode
tobaru
parents:
diff changeset
75 make -C usr clean