-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
161220002 bjy Linux Debian 4.9.0-3-686-pae #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) i686 GNU/Linux 23:23:53 up 1 day, 22:27, 1 user, load average: 0.06, 0.64, 1.06 410e7914c5379e68ba71961f2f4c8ca106e0b14
- Loading branch information
0 parents
commit 4579022
Showing
444 changed files
with
190,832 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.o | ||
*.d | ||
testcase/bin | ||
game/src/nemu-pal/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
,bjy161220002,161220002,23.11.2017 22:28,file:///home/bjy161220002/.config/libreoffice/4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.PHONY: nemu clean run test testkernel testgame do_not_call_me_testcase do_not_call_me_kernel do_not_call_me_game | ||
|
||
include Makefile.git | ||
|
||
nemu: | ||
$(call git_commit, "nemu") | ||
cd nemu && make | ||
|
||
run: nemu do_not_call_me_testcase | ||
$(call git_commit, "run") | ||
./nemu/nemu -run hello-inline | ||
test: nemu do_not_call_me_testcase | ||
$(call git_commit, "test") | ||
./nemu/nemu -autorun | ||
|
||
testkernel: nemu do_not_call_me_testcase do_not_call_me_kernel | ||
$(call git_commit, "testkernel") | ||
./nemu/nemu -kernel-test | ||
|
||
testgame: nemu do_not_call_me_kernel do_not_call_me_game | ||
$(call git_commit, "testgame") | ||
./nemu/nemu -game | ||
|
||
clean: | ||
cd nemu && make clean | ||
cd testcase && make clean | ||
cd kernel && make clean | ||
cd game && make clean | ||
|
||
submit: clean | ||
cd .. && tar cvj $(shell pwd | grep -o '[^/]*$$') > $(STU_ID).tar.bz2 | ||
|
||
|
||
#### do not use the following targets directly #### | ||
|
||
do_not_call_me_game: | ||
cd game && make | ||
|
||
do_not_call_me_testcase: | ||
cd testcase && make | ||
|
||
do_not_call_me_kernel: | ||
cd testcase && make | ||
cd kernel && make | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
STU_ID = 161220002 | ||
|
||
# DO NOT modify the following code!!! | ||
|
||
GITFLAGS = -q --author='tracer-pa2017 <[email protected]>' --no-verify --allow-empty | ||
|
||
# prototype: git_commit(msg) | ||
define git_commit | ||
-@git add . -A --ignore-errors | ||
-@while (test -e .git/index.lock); do sleep 0.1; done | ||
-@(echo "> $(1)" && echo $(STU_ID) && id -un && uname -a && uptime && (head -c 20 /dev/urandom | hexdump -v -e '"%02x"') && echo) | git commit -F - $(GITFLAGS) | ||
endef |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# PA 2017 | ||
|
||
This is the code for the 'Programming Assignment' for the course 'Introduction to Computer Systems' in Fall, 2017. | ||
|
||
# OS setup | ||
|
||
Debian 32-bit with desktop environment (tested with MATE) | ||
|
||
# Get the code: | ||
|
||
git clone https://github.com/ics-pa/pa2017.git | ||
|
||
# Guide book | ||
|
||
https://cs.nju.edu.cn/wangliang/pa2017.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
LIB_COMMON_DIR = ../include | ||
NEWLIBC_DIR = $(LIB_COMMON_DIR)/newlib | ||
|
||
#GAME = typing | ||
GAME = nemu-pal | ||
|
||
CC = gcc | ||
CFLAGS = -m32 -MMD -Wall -Werror -Wno-format\ | ||
-fno-builtin -fno-omit-frame-pointer -fno-stack-protector \ | ||
-I./include -I$(LIB_COMMON_DIR) -I$(NEWLIBC_DIR)/include | ||
LDFLAGS = -melf_i386 -Ttext=0x800000 | ||
|
||
CFLAGS += -I./src/$(GAME)/include | ||
|
||
COMMON_FILES = $(shell find src/common -name "*.c") | ||
GAME_FILES = $(shell find src/$(GAME) -name "*.c") | ||
|
||
CFILES = $(COMMON_FILES) $(GAME_FILES) | ||
OBJS = $(CFILES:.c=.o) | ||
|
||
NEWLIBC = $(NEWLIBC_DIR)/libc.a | ||
#FLOAT = $(LIB_COMMON_DIR)/FLOAT.o | ||
|
||
#game: $(OBJS) $(FLOAT) | ||
game: $(OBJS) | ||
ld $(LDFLAGS) -e game_init -o game $(OBJS) $(NEWLIBC) #$(FLOAT) | ||
ifeq ($(GAME),nemu-pal) | ||
dd if=/dev/null of=game seek=2048 | ||
cat `find src/nemu-pal/data -type f | sort` >> game | ||
endif | ||
|
||
-include $(OBJS:.o=.d) | ||
|
||
.PHONY: clean | ||
|
||
clean: | ||
-rm -f game $(OBJS) $(OBJS:.o=.d) |
Oops, something went wrong.