Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
u8cat committed Jul 9, 2022
1 parent 4b140bb commit f2116e2
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 54 deletions.
21 changes: 16 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export KCONFIG_DIR := $(SCRIPTS_DIR)/kconfig
all: example

.PHONY: everything
everything: all report
everything: report build_test all doc

.PHONY: report
report: $(MAKE_ROOT_DIR)/report/makefile
Expand Down Expand Up @@ -122,6 +122,10 @@ $(CONFIG_DIR)/handle_config: $(SUPPORT_DIR)/handle_config.cpp
@mkdir -p $(CONFIG_DIR)
@g++ $(SUPPORT_DIR)/handle_config.cpp -o $(CONFIG_DIR)/handle_config

.PHONY: doc
doc:
cargo doc

.PHONY: clean
clean:
$(MAKE) -f $(SCRIPTS_DIR)/build.Makefile $@
Expand All @@ -131,7 +135,14 @@ clean:

.PHONY: help
help:
@echo "Configuration options:"
@echo "menuconfig - demos the menuconfig functionality"
@echo " configuration options will be written in $(CONFIG_DIR)/config.rs"
@echo "clean - cleans all output files"
@echo 'Makefile targets:'
@echo 'menuconfig - demos the menuconfig functionality'
@echo ' configuration options will be written in $(CONFIG_DIR)/config.rs'
@echo 'example - builds the example (a sudoku game)'
@echo 'run - runs the example'
@echo 'test - builds and then runs tests'
@echo 'build_test - builds tests without running them'
@echo 'report - builds project reports'
@echo 'doc - builds API documentation'
@echo 'everything - equals to `make example build_test report doc`'
@echo 'clean - cleans all output files'
8 changes: 4 additions & 4 deletions makefiles/report.mk
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,19 @@ TEX := latexmk
TEX_FLAGS := -xelatex -silent -latexoption=-interaction=nonstopmode

.PHONY: all
all: research-report.pdf feasibility-report.pdf
all: research-report.pdf feasibility-report.pdf final-report.pdf

../runikraft-report.cls: $(REPORT_ROOT_DIR)/runikraft-report.cls
cp $(REPORT_ROOT_DIR)/runikraft-report.cls ../runikraft-report.cls

research-report.pdf: $(REPORT_ROOT_DIR)/2_research/research-report.tex ../runikraft-report.cls
env TEXINPUTS=$(REPORT_ROOT_DIR)/2_research:$$TEXINPUTS $(TEX) $(TEX_FLAGS) $(REPORT_ROOT_DIR)/2_research/research-report.tex
env TEXINPUTS=$(REPORT_ROOT_DIR):$$TEXINPUTS $(TEX) $(TEX_FLAGS) $(REPORT_ROOT_DIR)/2_research/research-report.tex

feasibility-report.bib: $(REPORT_ROOT_DIR)/3_feasibility/feasibility-report.bib
cp $(REPORT_ROOT_DIR)/3_feasibility/feasibility-report.bib feasibility-report.bib

feasibility-report.pdf: $(REPORT_ROOT_DIR)/3_feasibility/feasibility-report.tex feasibility-report.bib ../runikraft-report.cls
env TEXINPUTS=$(REPORT_ROOT_DIR)/3_feasibility:$$TEXINPUTS $(TEX) $(TEX_FLAGS) $(REPORT_ROOT_DIR)/3_feasibility/feasibility-report.tex
env TEXINPUTS=$(REPORT_ROOT_DIR):$$TEXINPUTS $(TEX) $(TEX_FLAGS) $(REPORT_ROOT_DIR)/3_feasibility/feasibility-report.tex

final-report.pdf: $(REPORT_ROOT_DIR)/5_final/final-report.tex ../runikraft-report.cls
env TEXINPUTS=$(REPORT_ROOT_DIR)/5_final:$$TEXINPUTS $(TEX) $(TEX_FLAGS) $(REPORT_ROOT_DIR)/5_final/final-report.tex
env TEXINPUTS=$(REPORT_ROOT_DIR):$$TEXINPUTS $(TEX) $(TEX_FLAGS) $(REPORT_ROOT_DIR)/5_final/final-report.tex
28 changes: 14 additions & 14 deletions report/2_research/research-report.tex
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ \subsubsection{ClickOS}\sectionauthor{蓝俊玮}

\begin{figure}[!hbt]
\begin{minipage}{0.49\linewidth}
\includegraphics[width=\linewidth]{../assets/clickOS_arch.jpg}
\includegraphics[width=\linewidth]{assets/clickOS_arch.jpg}
\caption{ClickOS 的架构\cite{bib:13-clickos2}}
\end{minipage}
\begin{minipage}{0.49\linewidth}
\includegraphics[width=\linewidth]{../assets/ClickOS_networking.png}
\includegraphics[width=\linewidth]{assets/ClickOS_networking.png}
\caption{Basic ClickOS networking in Xen\cite{bib:12-clickos}}
\end{minipage}
\end{figure}
Expand All @@ -205,12 +205,12 @@ \subsubsection{MirageOS}\sectionauthor{蓝俊玮}
没必要为支持传统操作系统里面的成千上万个设备驱动程序而操心。\cite{bib:11-unikerel2}

\begin{figure}[!hbt]
\includegraphics[width=\linewidth]{../assets/figure1.png}
\includegraphics[width=\linewidth]{assets/figure1.png}
\caption{MirageOS 的架构}\label{fig:mirage-fig1}
\end{figure}

\begin{figure}[!hbt]
\includegraphics[width=\linewidth]{../assets/figure2.png}
\includegraphics[width=\linewidth]{assets/figure2.png}
\caption{MirageOS的逻辑工作流}\label{fig:mirage-fig2}
\end{figure}

Expand Down Expand Up @@ -280,7 +280,7 @@ \subsubsection{RustyHermit}\sectionauthor{陈建绿}
%将RustyHermit 和 Linux 分别作为客户端运行在基于 Linux 的主机系统上的虚拟机中,以信息的比特数作为自变量,吞吐量/Mbps作为因变量,
%进行测试并绘图,结果如下:\cite{bib:20-linux-kernel}
%\begin{figure}[H]
%\includegraphics[width=\linewidth]{../assets/RustyHermit-1.png}
%\includegraphics[width=\linewidth]{assets/RustyHermit-1.png}
%\caption{}
%\end{figure}
%
Expand Down Expand Up @@ -317,7 +317,7 @@ \subsubsection{Rumprun}\sectionauthor{陈建绿}
模块化驱动程序。因为开发者没有做会将错误引入到应用程序运行时(application runtime)、
libc 或驱动程序中的移植工作,所以程序可以很稳定地工作。\cite{bib:21-rump-kernel}
\begin{figure}[!hbt]
\includegraphics[width=\linewidth]{../assets/rumprun-1.png}
\includegraphics[width=\linewidth]{assets/rumprun-1.png}
\caption{Anykernel、
Rump kernel 和 Rumprun Unikernel 的关系}
\end{figure}
Expand All @@ -336,11 +336,11 @@ \subsubsection{Rumprun}\sectionauthor{陈建绿}

\begin{figure}[!hbt]
\begin{minipage}{0.49\linewidth}
\includegraphics[width=\linewidth]{../assets/rumprun-2-cut.png}
\includegraphics[width=\linewidth]{assets/rumprun-2-cut.png}
\caption{Rumprun 的架构}
\end{minipage}
\begin{minipage}{0.49\linewidth}
\includegraphics[width=\linewidth]{../assets/rumprun-3-cut.png}
\includegraphics[width=\linewidth]{assets/rumprun-3-cut.png}
\caption{Rumprun 的工作流程示例}
\end{minipage}
\end{figure}
Expand Down Expand Up @@ -423,7 +423,7 @@ \subsubsection{Unikraft}\sectionauthor{张子辰}
用户可用它选择要用哪些微型库,要为哪个平台和哪个CPU架构构建。
\end{description}
\begin{figure}[!hbt]
\includegraphics[width=\linewidth]{../assets/Unikraft-architecture.png}
\includegraphics[width=\linewidth]{assets/Unikraft-architecture.png}
\caption{Unikraft的架构(黑色框内的是APIs)允许用户程序接入不同层次的APIs,也
允许用户选择不同的API实现。}\label{fig:unikraft-arch}
\end{figure}
Expand Down Expand Up @@ -451,16 +451,16 @@ \subsubsection{Unikraft}\sectionauthor{张子辰}
\begin{figure}[H]
\centering
\begin{minipage}{0.32\linewidth}
\includegraphics[width=1\linewidth]{../assets/Unikraft-image-size.png}
\includegraphics[width=1\linewidth]{assets/Unikraft-image-size.png}
\caption{}
\label{fig:unikraft-image-size}
\end{minipage}
\begin{minipage}{0.32\linewidth}
\includegraphics[width=1\linewidth]{../assets/Unikraft-memory.png}
\includegraphics[width=1\linewidth]{assets/Unikraft-memory.png}
\caption{}
\end{minipage}
\begin{minipage}{0.32\linewidth}
\includegraphics[width=1\linewidth]{../assets/Unikraft-throughput.png}
\includegraphics[width=1\linewidth]{assets/Unikraft-throughput.png}
\caption{}
\end{minipage}
\end{figure}
Expand Down Expand Up @@ -995,7 +995,7 @@ \subsubsection{X-Doudou 小组}

\begin{figure}[!hbt]
\centering
\includegraphics[width=0.5\linewidth]{../assets/resp1.png}
\includegraphics[width=0.5\linewidth]{assets/resp1.png}
\caption{Cunik-engine 架构}
\end{figure}
其具体细节可参考
Expand Down Expand Up @@ -1224,4 +1224,4 @@ \section*{许可协议}\markboth{许可协议}
\bibitem{bib:ms-rtos} ScilogyHunter. \textit{MS-RTOS正式发布啦!!!}[Z/OL]. CSDN, 2020 (20200716) [2022-03-12]. \url{https://blog.csdn.net/ScilogyHunter/article/details/107390947}
\bibitem{bib:rust-os-comparison} flosse, wmanley, ticki, et al. \textit{Rust OS comparison}[G/OL]. GitHub, 2022 (20220408) [2022-04-10]. \url{https://github.com/flosse/rust-os-comparison/tree/f3eb1aae4f080fafd81b44254f54e387ac5f6b9d}
\end{thebibliography}
\end{document}
\end{document}
16 changes: 8 additions & 8 deletions report/3_feasibility/feasibility-report.tex
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ \subsubsection{监管者二进制接口}

\begin{figure}[tbh!]
\centering
\includegraphics[width=0.7\linewidth]{../assets/riscv-sbi-intro1.png}
\includegraphics[width=0.7\linewidth]{assets/riscv-sbi-intro1.png}
\caption{不含H拓展的RISC-V系统}
\label{fig:riscv-sbi}
\end{figure}
Expand Down Expand Up @@ -640,7 +640,7 @@ \subsubsection{KVM对RISC-V架构的支持}
多个隔离的虚拟环境,即虚拟客户机或虚拟机(VM)。
\begin{figure}[!hbt]
\centering
\includegraphics[width=0.9\linewidth]{../assets/riscv-sbi-intro2.png}
\includegraphics[width=0.9\linewidth]{assets/riscv-sbi-intro2.png}
\caption{虚拟化下的特权等级}
\label{fig:w4}
\end{figure}
Expand Down Expand Up @@ -734,7 +734,7 @@ \subsubsection{编译运行流程}
\begin{figure}[!hbt]
\centering
\vspace*{-3ex}
\includegraphics[width=0.9\linewidth]{../assets/unikraft-menuconfig}
\includegraphics[width=0.9\linewidth]{assets/unikraft-menuconfig}
\vspace*{-3ex}
\caption{配置Unikraft}
\label{fig:unikraft-menuconfig}
Expand All @@ -753,7 +753,7 @@ \subsubsection{编译运行流程}
\begin{figure}[tbh!]
\centering
\vspace*{-3ex}
\includegraphics[width=0.9\linewidth]{../assets/unikraft-run}
\includegraphics[width=0.9\linewidth]{assets/unikraft-run}
\vspace*{-3ex}
\caption{运行hello world}
\label{fig:unikraft-run}
Expand Down Expand Up @@ -1056,7 +1056,7 @@ \subsection{运行和调试}
\begin{figure}[tbh!]
\centering
\vspace*{-3ex}
\includegraphics[width=0.9\linewidth]{../assets/debug.png}
\includegraphics[width=0.9\linewidth]{assets/debug.png}
\vspace*{-3ex}
\caption{调试}
\label{fig:debug}
Expand All @@ -1065,7 +1065,7 @@ \subsection{运行和调试}
\begin{figure}[tbh!]
\centering
\vspace*{-3ex}
\includegraphics[width=0.9\linewidth]{../assets/run.png}
\includegraphics[width=0.9\linewidth]{assets/run.png}
\vspace*{-3ex}
\caption{运行结果}
\label{fig:run}
Expand Down Expand Up @@ -1118,12 +1118,12 @@ \subsection{架构}
\centering
\begin{minipage}{0.49\linewidth}
\centering
\includegraphics[width=\linewidth]{../assets/Unikraft-architecture.png}
\includegraphics[width=\linewidth]{assets/Unikraft-architecture.png}
\caption{Unikraft的架构}\label{fig:unikraft-arch}
\end{minipage}
\begin{minipage}{0.49\linewidth}
\centering
\includegraphics[width=\linewidth]{../assets/Runikraft-architecture.pdf}
\includegraphics[width=\linewidth]{assets/Runikraft-architecture.pdf}
\caption{Runikraft的架构}\label{fig:runikraft-arch}
\end{minipage}
\end{figure}
Expand Down
Loading

0 comments on commit f2116e2

Please sign in to comment.