<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[onecolumn,letterpaper,11pt]{article}

%===================================================================
\input{common_latex/common_latex_packages}
\input{common_latex/common_latex_definitions}
\input{common_latex/common_latex_lab_format}
%===================================================================

\begin{document}

\begin{labcover}
\labtitle{The MTASC Boot Process}
\vspace{0.1in}
\labdate{Oct 2023}
\vspace{0.1in}
\labauth{Michael Benjamin, mikerb@mit.edu}
\labauth{Department of Mechanical Engineering}
\labauth{MIT, Cambridge MA 02139}
\labsrc{project-pavlab/mtasc/mt\_bootup} 
\labtoc{small}
\end{labcover}

\wikidoc{file=MT.Bootup}
\wikidoc{bugz=mt_bootup}
\wikidoc{auth=mikerb@mit.edu}




%===================================================================
\section{The MTASC Boot Process}
%===================================================================
\label{sec_mt_boot}

When the MTASC is powered on, it series of event unfolds, culminating
with hopefully all PABLO boxes booted and ready to run a mission. This
process is discussed here.

%===================================================================
\subsection{The PABLO Boot Codes}

PABLOs are normally configured to have a USB blinkstick LED inserted
in one of its two external USB ports. This blinkstick can be commanded
to display one of several colors in steady or blinking modes. As the
PABLO is booting, the boot process modifies the LED state to indicate
the current step in the boot process. If the LED reaches a steady green
color, then everything has succeeded. Since this is the most visual
part of the boot process, the reference codes are presented first:

\vspace{0.1in}
\begin{figure}[H]
  \centering
  \includegraphics[width=0.7\textwidth]{figures/boot_codes.png}
  \caption{{\bf Boot Codes}: The startup code blinks white and
    proceeds through the boot stages to one of a few terminal
    codes: green (success) or red (failure).}
  \label{fig_boot_codes}
\end{figure}
\vspace{0.1in}

\noindent
During the {\em startup} phase, the PABLO will boot and look to confirm
an Internet connection. If if does not succeed within 20 seconds of trying,
it will abort the remainder of the steps and show a solid red light on the
LED.

\vspace{0.1in}
\noindent
If an Internet connection is established, the code update phase begins. The
three codebases, \var{moos-ivp}, \var{moos-ivps-swarm}, \var{moos-ivp-pavlab}
are all available with anonymous read-only access. Each codebase first pulls
any available updates from the version control system and then proceeds to
build the codebase if required. In this way each PABLO automatically has the
most recent code changes upon reboot. This phase may be quite quick if no
code changes have been made recently, or quite long if say a full rebuild of
the MOOS-IvP tree is needed. At least the LED status light will give the user
some indication of what is happening.

\vspace{0.1in}
\noindent
Once the code update phase is complete, if all updates and builds were successful
the LED will show a steady green. A blinking red indicates one of the updates
or builds failed. More detail can be gleened from examining the \var{.rebootlog}
on the PABLO as discussed in Section \ref{sec_reboot_log}.

\vspace{0.1in}
\noindent
The boot process is executed by a BASH script on the PABLO called
\var{upon\_reboot.sh}, discussed next.



%===================================================================
\subsection{Cache Files Example Snippets}


%===================================================================
\subsection{Aliases}
\label{sec_cf_aliases}

\vspace{0.1in}
\begin{fileverb}
  pup='find_pablo_init.sh -v'

  PABLO_FILES="  ${HOME}/.pablo_names"
  PABLO_FILES+=" ${HOME}/.pablo_ips"
  PABLO_FILES+=" ${HOME}/.pablos_byname"
  PABLO_FILES+=" ${HOME}/.pablos_byip"
  alias  hhp='head -n 50 ${PABLO_FILES}'
  alias  hp='head -n 5 ${PABLO_FILES}'
\end{fileverb}
\vspace{0.1in}



\end{document}


</pre></body></html>