File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1919 rm -f * ~ * .o * .bin * .dat * .img * .map
2020
2121run : fd.img
22- qemu -fda $<
22+ qemu-system-i386 -fda $<
2323
2424FORCE :
2525.PHONY : clean FORCE
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ KERNEL_PATH = ../kernel
22CFLAGS = -Wall -Wextra
33CFLAGS += -nostdinc -nostdlib -fno-builtin -c
44CFLAGS += -Iinclude -I$(KERNEL_PATH ) /include
5+ CFLAGS += -m32
56
67.c.o :
78 gcc $(CFLAGS ) -o $@ $<
@@ -11,11 +12,11 @@ apps.img: bin/shell bin/uptime
1112
1213bin/shell : shell.o
1314 [ -d bin ] || mkdir bin
14- ld -o $@ $< -Map shell.map -s -T app.ld -x
15+ ld -m elf_i386 - o $@ $< -Map shell.map -s -T app.ld -x
1516
1617bin/uptime : uptime.o
1718 [ -d bin ] || mkdir bin
18- ld -o $@ $< -Map uptime.map -s -T app.ld -x
19+ ld -m elf_i386 - o $@ $< -Map uptime.map -s -T app.ld -x
1920
2021shell.o : shell.c
2122
Original file line number Diff line number Diff line change 11.s.o :
2- as -o $@ $<
2+ as --32 - o $@ $<
33
44boot.bin : boot.o
5- ld -o $@ $< -T boot.ld -Map boot.map
5+ ld -m elf_i386 - o $@ $< -T boot.ld -Map boot.map
66
77boot.o : boot.s
88
Original file line number Diff line number Diff line change 11CFLAGS = -Wall -Wextra
22CFLAGS += -nostdinc -nostdlib -fno-builtin -c
33CFLAGS += -Iinclude
4+ CFLAGS += -m32
45
56.S.o :
67 gcc $(CFLAGS ) -o $@ $<
78.c.o :
89 gcc $(CFLAGS ) -o $@ $<
910
1011kernel.bin : sys.o cpu.o intr.o excp.o memory.o sched.o fs.o task.o syscall.o lock.o timer.o console_io.o queue.o common.o debug.o init.o kern_task_init.o
11- ld -o $@ $+ -Map System.map -s -T sys.ld -x
12+ ld -m elf_i386 - o $@ $+ -Map System.map -s -T sys.ld -x
1213
1314sys.o : sys.S
1415cpu.o : cpu.c
You can’t perform that action at this time.
0 commit comments