From f2116e278577b9dffedbcd7e1837be233007f7c4 Mon Sep 17 00:00:00 2001 From: WCIofQMandRA Date: Sat, 9 Jul 2022 20:38:03 +0800 Subject: [PATCH] update makefile --- Makefile | 21 +++++++--- makefiles/report.mk | 8 ++-- report/2_research/research-report.tex | 28 ++++++------- report/3_feasibility/feasibility-report.tex | 16 +++---- report/5_final/final-report.tex | 46 ++++++++++----------- 5 files changed, 65 insertions(+), 54 deletions(-) diff --git a/Makefile b/Makefile index c713248..958a2cf 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 $@ @@ -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' diff --git a/makefiles/report.mk b/makefiles/report.mk index a877177..f098ad4 100644 --- a/makefiles/report.mk +++ b/makefiles/report.mk @@ -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 diff --git a/report/2_research/research-report.tex b/report/2_research/research-report.tex index 4508249..fa76927 100644 --- a/report/2_research/research-report.tex +++ b/report/2_research/research-report.tex @@ -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} @@ -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} @@ -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} % @@ -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} @@ -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} @@ -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} @@ -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} @@ -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} 其具体细节可参考 @@ -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} \ No newline at end of file +\end{document} diff --git a/report/3_feasibility/feasibility-report.tex b/report/3_feasibility/feasibility-report.tex index 2fbc09f..2a25bd0 100644 --- a/report/3_feasibility/feasibility-report.tex +++ b/report/3_feasibility/feasibility-report.tex @@ -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} @@ -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} @@ -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} @@ -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} @@ -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} @@ -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} @@ -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} diff --git a/report/5_final/final-report.tex b/report/5_final/final-report.tex index 05a189b..599f863 100644 --- a/report/5_final/final-report.tex +++ b/report/5_final/final-report.tex @@ -20,7 +20,7 @@ pdftitle={2022春 操作系统原理与设计(H) x-runikraft小组 结题报告}, pdfauthor={吴骏东; 张子辰; 蓝俊玮; 郭耸霄; 陈建绿} } -%\renewcommand{\today}{2022年7月9日} +\renewcommand{\today}{2022年7月9日} \begin{document} \title{\bfseries Runikraft小组\quad 结题报告\thanks{作者按Unicode码位排序,按贡献度排序是张子辰、郭耸霄、陈建绿、吴骏东、蓝俊玮。}} @@ -200,11 +200,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} @@ -222,12 +222,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} @@ -324,7 +324,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} @@ -343,11 +343,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} @@ -428,7 +428,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} @@ -456,16 +456,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} @@ -1125,7 +1125,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} @@ -1179,7 +1179,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} @@ -1273,7 +1273,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} @@ -1292,7 +1292,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} @@ -1595,7 +1595,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} @@ -1604,7 +1604,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} @@ -1684,7 +1684,7 @@ \subsection{创新点} \section{概要设计}\sectionauthor{张子辰} \begin{figure}[!hbt] \centering -\includegraphics[width=\linewidth]{../assets/Runikraft-architecture-impl.pdf} +\includegraphics[width=\linewidth]{assets/Runikraft-architecture-impl.pdf} \caption{Runikraft的架构}\label{fig:runikraft-arch-impl} \end{figure} 平台层将不同的平台封装成通用的\texttt{rkplat} API,它提供与平台/架构密切相关的功能, @@ -1745,7 +1745,7 @@ \section{概要设计}\sectionauthor{张子辰} \begin{figure}[!htb] \centering -\includegraphics[width=\linewidth]{../assets/crates-dependency.pdf} +\includegraphics[width=\linewidth]{assets/crates-dependency.pdf} \caption{Runikraft的crates的依赖关系} \end{figure} @@ -2033,7 +2033,7 @@ \section{配置系统}\sectionauthor{陈建绿} \begin{figure}[H] \centering -\includegraphics[width=0.8\linewidth]{../assets/runikraft-menuconfig-1.png} +\includegraphics[width=0.8\linewidth]{assets/runikraft-menuconfig-1.png} \caption{} \label{fig:runikraft-menuconfig-1} \end{figure} @@ -2077,7 +2077,7 @@ \subsection{实现方法} \begin{figure}[H] \centering -\includegraphics[width=0.7\linewidth]{../assets/runikraft-menuconfig-2.png} +\includegraphics[width=0.7\linewidth]{assets/runikraft-menuconfig-2.png} \caption{} \label{fig:runikraft-menuconfig-2} \end{figure} @@ -2142,7 +2142,7 @@ \section{总结} \begin{figure}[tbh!] \centering -\includegraphics[width=0.6\linewidth]{../assets/sudoku} +\includegraphics[width=0.6\linewidth]{assets/sudoku} \caption{数独程序} \label{fig:sudoku} \end{figure}