diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c21152d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +**.o diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..fac23c9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM docker.io/library/ubuntu:22.04 + +RUN dpkg --add-architecture i386 && \ + apt-get update && apt-get -y dist-upgrade && apt-get -y install \ + build-essential ed \ + gcc-multilib g++-multilib \ + lib32ncurses5-dev lib32z1 \ + zlib1g:i386 libncurses5:i386 \ + libgcc1:i386 libstdc++5:i386 + +WORKDIR / +COPY mips-decstation.linux-xgcc.gz / +RUN tar -zxvf /mips-decstation.linux-xgcc.gz + +WORKDIR /work + +COPY . . + +ENTRYPOINT ["make"] +CMD ["-C", "code"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f2326dc --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +.PHONY: all clean docker + +docker: + docker build . -t afs2026 + docker run afs2026 -C code diff --git a/code/Makefile b/code/Makefile new file mode 100644 index 0000000..c04f980 --- /dev/null +++ b/code/Makefile @@ -0,0 +1,13 @@ +.PHONY: all clean run + +all: + make -C build.linux depend + make -C build.linux -j 16 + make -C test -j 16 + +clean: + make -C build.linux distclean + make -C test distclean + +run: + make -C test run diff --git a/code/build.linux/.gitignore b/code/build.linux/.gitignore new file mode 100644 index 0000000..7463e77 --- /dev/null +++ b/code/build.linux/.gitignore @@ -0,0 +1 @@ +nachos diff --git a/code/build.linux/Makefile b/code/build.linux/Makefile index f17c497..34161e5 100755 --- a/code/build.linux/Makefile +++ b/code/build.linux/Makefile @@ -200,7 +200,7 @@ DEFINES = -DFILESYS_STUB -DRDATA -DSIM_FIX # break the thread system. You might want to use -fno-inline if # you need to call some inline functions from the debugger. -CFLAGS = -g -Wall $(INCPATH) $(DEFINES) $(HOSTCFLAGS) -DCHANGED -m32 +CFLAGS = -g -Wall $(INCPATH) $(DEFINES) $(HOSTCFLAGS) -DCHANGED -m32 -w LDFLAGS = -m32 CPP_AS_FLAGS= -m32 @@ -211,7 +211,7 @@ LD = g++ -m32 -Wno-deprecated AS = as --32 RM = /bin/rm -INCPATH = -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -I- +INCPATH = -iquote../network -iquote../filesys -iquote../userprog -iquote../threads -iquote../machine -iquote../lib PROGRAM = nachos diff --git a/code/build.linux/nachos b/code/build.linux/nachos index b17c6d5..9faa8ff 100755 Binary files a/code/build.linux/nachos and b/code/build.linux/nachos differ