Skip to content

Commit 5fd5343

Browse files
authored
Merge pull request #3 from sebastianene07/sene/fix_compilation_error_and_clean
Fix compilation error and update the clean rules
2 parents 34541d9 + 4229bb3 commit 5fd5343

5 files changed

Lines changed: 20 additions & 14 deletions

File tree

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ todo
33
*.out
44
t
55
*.bak
6+
*.a
7+
*.img
8+
*.inc
9+
qemu.log
10+
userapps/appsbin/

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ image:
1616

1717
.PHONY: net
1818
net:
19-
/usr/sbin/tunctl -t tap100
20-
/usr/sbin/tunctl -t tap200
21-
/sbin/ifconfig tap100 0.0.0.0 promisc up
22-
/sbin/ifconfig tap200 0.0.0.0 promisc up
23-
-/usr/local/bin/ovs-vsctl del-port br0 tap100 > /dev/null 2>&1
24-
/usr/local/bin/ovs-vsctl add-port br0 tap100
19+
sudo tunctl -t tap100
20+
sudo tunctl -t tap200
21+
sudo ifconfig tap100 0.0.0.0 promisc up
22+
sudo ifconfig tap200 0.0.0.0 promisc up
2523
run: net
26-
qemu-system-x86_64 --enable-kvm -cpu host -smp 4 -option-rom sgabios.bin \
24+
sudo qemu-system-x86_64 --enable-kvm -cpu host -smp 4 -option-rom sgabios.bin \
2725
-m 8192 -rtc base=localtime \
2826
-monitor stdio -curses \
2927
-drive file=image/disk.img,if=ide \
@@ -33,7 +31,7 @@ run: net
3331
# -net nic,model=rtl8139,macaddr=52:54:00:12:34:61 -net tap,vlan=1,ifname=tap1,script=no \
3432
3533
test: net
36-
qemu-system-x86_64 --enable-kvm -cpu host -smp 4 -option-rom sgabios.bin \
34+
sudo qemu-system-x86_64 --enable-kvm -cpu host -smp 4 -option-rom sgabios.bin \
3735
-m 8192 -rtc base=localtime \
3836
-monitor telnet:127.0.0.1:2048,server,nowait,ipv4 -curses \
3937
-drive file=image/disk.img,if=ide \
@@ -43,7 +41,7 @@ test: net
4341
# -net nic,model=rtl8139,macaddr=52:54:00:12:34:61 -net tap,vlan=1,ifname=tap1,script=no \
4442
4543
server: net
46-
qemu-system-x86_64 --enable-kvm -cpu host -smp 4 -option-rom sgabios.bin \
44+
sudo qemu-system-x86_64 --enable-kvm -cpu host -smp 4 -option-rom sgabios.bin \
4745
-m 4096 -rtc base=localtime \
4846
--daemonize \
4947
-drive file=image/disk.img,if=ide \
@@ -62,6 +60,8 @@ server: net
6260
clean:
6361
cd kernel && make clean
6462
cd userapps && make clean
63+
-rm -f sizekernel.inc
64+
-rm -f image/*
6565

6666
disasm:
6767
#objdump -D -b binary -mi386 -M x86-64 kernel/kernel.o

kernel/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ OBJC=printf.o pci.o rtl8139.o netcard.o arp.o arpcache.o ip.o icmp.o ip_routing.
33
SOURCEC=$(OBJC:.o=.c)
44
OBJASM=boot.o kernelmain.o interrupts.o scheduler.o helpers.o mutex.o mmu.o hardware.o apic.o intA0.o heap.o cmos.o vmx.o guest.o video_s.o timer.o
55
SOURCEASM=$(OBJASM:.o=.S)
6-
CFLAGS=-fno-zero-initialized-in-bss -Wno-pointer-to-int-cast -ffreestanding -mcmodel=large -mno-red-zone -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -Wimplicit-function-declaration -Werror=implicit-function-declaration
6+
CFLAGS=-fno-zero-initialized-in-bss -Wno-pointer-to-int-cast -ffreestanding -mcmodel=large -mno-red-zone -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -Wimplicit-function-declaration -Werror=implicit-function-declaration -fno-pie
77
PFLAGS=-DPCID
88

99
.c.o:
@@ -21,5 +21,5 @@ kernel: $(OBJASM) $(OBJC)
2121
wc -c < kernel.o >> ../sizekernel.inc
2222

2323
clean:
24-
rm *.o
24+
-rm -f *.o
2525

userapps/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ apps: systemlib $(BINS)
1616

1717
clean:
1818
cd systemlib && make clean
19-
rm -Rf appsbin
19+
-rm -Rf appsbin
20+
-rm -f disk.img

userapps/systemlib/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ $(TARGET).a: $(OBJECTS)
1212
ar rcs systemlib.a $(OBJECTS)
1313

1414
clean:
15-
-rm *.o
16-
-rm *.a
15+
-rm -f *.o
16+
-rm -f *.a

0 commit comments

Comments
 (0)