blob: 669e60a1e0ea006608180a263bea04d15276c455 [file] [log] [blame]
swissChili9b46c902022-07-10 15:48:46 -07001# -*- tcl -*-
2
swissChili14d0b842023-01-01 02:22:44 -05003cflags -DTEST_THREADS
swissChili9b46c902022-07-10 15:48:46 -07004ldflags -T[pwd]/link.ld -melf_i386
5asmflags -felf -Fdwarf
swissChili14d0b842023-01-01 02:22:44 -05006set qemuflags ""
7# "-drive file=hd0_ext2.img,format=raw"
swissChili9b46c902022-07-10 15:48:46 -07008
9depends sys $root/src/libsys libsys.a
10depends initrd $root/boot/initrd initrd.img
11depends ata_pio dri/ata_pio ata_pio.a
12depends pci dri/pci pci.a
13depends ide dri/ide ide.a
14depends ext2 dri/fs/ext2 ext2.a
15
16option FS ext2
17
18srcs boot.s \
19 main.c \
20 descriptor_tables.c \
21 io.c \
22 vga.c \
23 gdt_flush.s \
24 tss_flush.s \
25 idt.s \
26 log.c \
swissChili0db97752022-07-29 21:09:16 -070027 irq.s \
swissChili9b46c902022-07-10 15:48:46 -070028 pic.c \
29 timer.c \
30 paging.c \
31 switch_table.s \
32 kheap.c \
33 alloc.c \
34 vfs.c \
35 multiboot.c \
36 vfs_initrd.c \
37 syscall.c \
38 task.c \
39 task_api.s \
40 faults.c \
41 sync.c
42
43objs [lib ext2] \
44 [lib ide] \
45 [lib ata_pio] \
46 [lib pci] \
47 [lib sys]
48
49rule debug-wait kernel.elf {
swissChili14d0b842023-01-01 02:22:44 -050050 shell "qemu-system-i386 -s -S $::qemuflags -kernel kernel.elf"
swissChili9b46c902022-07-10 15:48:46 -070051}
52rule debug kernel.elf {
swissChili14d0b842023-01-01 02:22:44 -050053 shell "qemu-system-i386 -s -S $::qemuflags -kernel kernel.elf &"
swissChili9b46c902022-07-10 15:48:46 -070054 shell "echo run target remote localhost:1234 to connect to qemu"
55 shell "gdb $::first_src"
56 shell "pkill qemu-system-i386"
57}
58
swissChili14d0b842023-01-01 02:22:44 -050059rule qemu "kernel.elf" {
swissChili9b46c902022-07-10 15:48:46 -070060 shell "qemu-system-i386 $::qemuflags -d cpu_reset -monitor stdio -kernel kernel.elf -no-reboot"
61}