\chapter{系统安装}

电脑需要安装瑞芯微的 USB 驱动程序。接上 USB 线，运行 \\
RKDevTool.exe 程序，然后上电进入 maskrom 模式，按下面步骤进行操作：
\begin{enumerate}[(1)]
    \item  运行 RKDevTooL.exe 出现如下界面：

 \begin{figure}[H] 
    \centering
    \begin{tikzpicture}
        \node [anchor=south west, inner sep=0pt] (image) at (0, 0) {
            \includegraphics[width=\textwidth]{burn.png}
        };
        \begin{scope} [
            x = {($0.1*(image.south east)$)},
            y = {($0.1*(image.north west)$)}
            ]
        % grid for debugging
        % \draw [lightgray, step=1] (image.south west) grid (image.north east);
        % \foreach \x in {0, 1, ..., 10} {\node [below] at (\x, 0) {\x};}
        % \foreach \y in {0, 1, ..., 10} {\node [left] at (0, \y) {\y};}
        \draw [red, thick, rounded corners] (0.75, 8.7) rectangle (1.4, 9.2);
        \draw [red, thick, arrow] (2, 10) node [anchor=south west, inner sep=0, font=\fontsize{6}{6}] {点击这里}  to (1.5, 9.4);
        \end{scope}
    \end{tikzpicture}
    \caption{RKDevTooL 界面}\label{fig:rkdevtool}
 \end{figure}
        \item 点击上图中的``升级固件'':
\begin{figure}[H]
    \centering
    \includegraphics[width=\textwidth]{fme01.png}
\end{figure}
    点击``固件''按钮。
        \item 在弹出的对话框中选择正确的``update.img'' 文件, 等待``打开'' 执行完成。
\begin{figure}[H]
    \centering
    \includegraphics[width=\textwidth]{fme02.png}
\end{figure}
    \item 点击``升级''按钮：等待升级完成。
\begin{figure}[H]
    \centering
    \begin{tikzpicture}
        \node [anchor=south west, inner sep=0pt] (image) at (0, 0) {
            \includegraphics[width=\textwidth]{fme03.png}
        };
        \begin{scope} [
            x = {($0.1*(image.south east)$)},
            y = {($0.1*(image.north west)$)}
            ]
        % grid for debugging
        % \draw [lightgray, step=1] (image.south west) grid (image.north east);
        % \foreach \x in {0, 1, ..., 10} {\node [below] at (\x, 0) {\x};}
        % \foreach \y in {0, 1, ..., 10} {\node [left] at (0, \y) {\y};}
        \draw [red, thick, rounded corners] (1.1, 7.8) rectangle (1.6, 8.4);
        \draw [red, thick, arrow] (2.0, 8.75) node [anchor=south west, inner sep=0, font=\fontsize{6}{6}] {点击这里} .. controls (1.7, 8.7) .. (1.61, 8.4);
        \end{scope}
    \end{tikzpicture}
    \caption{升级 update.img}\label{fig:updateimg}
\end{figure}
    等待升级完成。
\end{enumerate}

\chapter{配置系统}
在调试串口上按住 \zhsquote{CTRL-C}并上电开机，将调试串口停止在 U-Boot 的命令行上，
用 \zhsquote{\textcolor{blue!80}{\tt setsn}}，将板卡的编号设置进去，例如：

\begin{figure}[H]
    \centering
\begin{tikzpicture}
    \node [anchor=south west, inner sep=0] (image) at (0,0) {
\begin{tcolorbox}[colframe=gray!20]
    \begin{footnotesize}
\begin{Verbatim}
=> setsn A2246002
Generate  ethaddr: 72:a2:24:60:02:01
Generate eth1addr: 72:a2:24:60:02:02
Generate eth2addr: 72:a2:24:60:02:03
Generate eth3addr: 72:a2:24:60:02:04
Writing to MMC(0)... done
\end{Verbatim}
\end{footnotesize}
\end{tcolorbox}
    };
    \begin{scope}[
        x={($0.1*(image.south east)$)},
        y={($0.1*(image.north west)$)}
        ]
        % grid for debugging
        %\draw [lightgray, step=1] (image.south west) grid (image.north east);
        %\foreach \x in {0, 1, ..., 10} {\node [below] at (\x, 0) {\x};}
        %\foreach \y in {0, 1, ..., 10} {\node [left] at (0, \y) {\y};}
        \draw [red,thick, rounded corners] (0.8, 8.0) rectangle (3.0, 9.0);
    \end{scope}
\end{tikzpicture}
\caption{设置板卡编号}
\end{figure}
根据编号自动生成一组 mac 地址，并保存在环境变量里面。

将板卡名称设置为项目名并保存，例如：
\begin{figure}[H]
    \centering
\begin{tikzpicture}
    \node [anchor=south west, inner sep=0] (image) at (0,0) {
\begin{tcolorbox}[colframe=gray!20]
    \begin{footnotesize}
\begin{Verbatim}
=> setenv board_name SY-3588J01A
=> saveenv
Saving Environment to MMC...
Writing to MMC(0)... done
\end{Verbatim}
\end{footnotesize}
\end{tcolorbox}
    };
    \begin{scope}[
        x={($0.1*(image.south east)$)},
        y={($0.1*(image.north west)$)}
        ]
        % grid for debugging
        %\draw [lightgray, step=1] (image.south west) grid (image.north east);
        %\foreach \x in {0, 1, ..., 10} {\node [below] at (\x, 0) {\x};}
        %\foreach \y in {0, 1, ..., 10} {\node [left] at (0, \y) {\y};}
        \draw [red,thick, rounded corners] (0.8, 5.0) rectangle (5.5, 9.0);
    \end{scope}
\end{tikzpicture}
\caption{设置板卡名称}
\end{figure}