[bootlin/training-materials updates] master: Boot time: remove the hardware lab with Arduino (805ff9f4)

Michael Opdenacker michael.opdenacker at bootlin.com
Mon Jun 12 18:53:47 CEST 2023


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/805ff9f4eb07b458f030138e712519c366a72328

>---------------------------------------------------------------

commit 805ff9f4eb07b458f030138e712519c366a72328
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Mon Jun 12 18:53:47 2023 +0200

    Boot time: remove the hardware lab with Arduino
    
    Quite out of topic, quite time consuming
    (at least one hour) and complicates hardware
    procurement for relatively little added value.
    
    This part was already optional.
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


>---------------------------------------------------------------

805ff9f4eb07b458f030138e712519c366a72328
 agenda/boot-time-agenda.tex                        |  14 --
 agenda/boot-time-fr-agenda.tex                     |  15 +-
 agenda/boot-time-online-agenda.tex                 |  14 --
 agenda/boot-time-online-fr-agenda.tex              |  15 --
 lab-data/boot-time/arduino/stopwatch/stopwatch.ino | 100 ---------
 .../arduino/test-7segment/test-7segment.ino        |  61 ------
 ...fmpeg-first-frame-completion-log-and-gpio.patch |  81 -------
 .../boot-time-hardware-measurement.tex             | 239 ---------------------
 .../nano-7segment.png                              | Bin 182899 -> 0 bytes
 .../nano-7segments.fzz                             | Bin 4627 -> 0 bytes
 labs/boot-time-hardware-measurement/nano-final.fzz | Bin 60383 -> 0 bytes
 labs/boot-time-hardware-measurement/nano-final.png | Bin 225874 -> 0 bytes
 mk/boot-time.mk                                    |   1 -
 slides/boot-time-measuring/boot-time-measuring.tex |  13 +-
 .../boot-time-shopping-list.tex                    |  18 +-
 15 files changed, 3 insertions(+), 568 deletions(-)

diff --git a/agenda/boot-time-agenda.tex b/agenda/boot-time-agenda.tex
index 9c3076f1..29f4d3f1 100644
--- a/agenda/boot-time-agenda.tex
+++ b/agenda/boot-time-agenda.tex
@@ -48,8 +48,6 @@
   \item A USB webcam
   \item An LCD and touchscreen cape connected to the
     BeagleBone Black board, to display the video captured by the webcam.
-  \item We will also use an Arduino board as a way to measure boot time with accurary,
-    demonstrating a hardware boot time measurement technique.
   \end{itemize}
 }
 
@@ -96,16 +94,6 @@
 }
 
 \feagendatwocolumn
-{Lab - Measuring time - Hardware solution}
-{
-  \begin{itemize}
-  \item Measure total boot time by toggling a GPIO
-  \item Setting up an Arduino board
-  \item Preparing a test circuit with a 7-segment display
-  \item Modifying the DTS to configuring Bone Black pins as GPIOs
-  \item Making the application drive the custom GPIOs
-  \end{itemize}
-}
 {Lecture - Toolchain optimizations}
 {
   \begin{itemize}
@@ -115,8 +103,6 @@
   \item Measuring executable performance with \code{time}
   \end{itemize}
 }
-
-\feagendaonecolumn
 {Lab - Toolchain optimizations}
 {
   \begin{itemize}
diff --git a/agenda/boot-time-fr-agenda.tex b/agenda/boot-time-fr-agenda.tex
index 9598c0bf..ee1c2200 100644
--- a/agenda/boot-time-fr-agenda.tex
+++ b/agenda/boot-time-fr-agenda.tex
@@ -49,9 +49,6 @@
   \item Une webcam USB
   \item Une carte d'extension d'écran tactile LCD connectée à la carte
     BeagleBone Black, pour afficher la vidéo capturée par la webcam.
-  \item Nous utiliserons également une carte Arduino comme moyen pour mesurer
-    précisément le temps de démarrage, pour montrer comment mettre en place
-    des techniques de mesure matérielles.
   \end{itemize}
 }
 
@@ -97,17 +94,7 @@
  \end{itemize}
 }
 
-\feagendatwocolumn
-{TP - Mesure du temps - Solution matérielle}
-{
-  \begin{itemize}
-  \item Mesure du temps total de démarrage en positionnant une GPIO
-  \item Mise en oeuvre d'une carte Arduino
-  \item Préparation d'un circuit de test avec un afficheur à 7 segments
-  \item Modification du DTS pour configurer les broches de la Bone Black en tant que GPIOs
-  \item Modification de l'application pour piloter les GPIOs personnalisées
-  \end{itemize}
-}
+\feagendaonecolumn
 {Cours - Optimisations des chaînes de compilation}
 {
   \begin{itemize}
diff --git a/agenda/boot-time-online-agenda.tex b/agenda/boot-time-online-agenda.tex
index 5ad0d29a..b6b23a1f 100644
--- a/agenda/boot-time-online-agenda.tex
+++ b/agenda/boot-time-online-agenda.tex
@@ -48,8 +48,6 @@
   \item A USB webcam
   \item An LCD and touchscreen cape connected to the
     BeagleBone Black board, to display the video captured by the webcam.
-  \item We will also use an Arduino board as a way to measure boot time with accurary,
-    demonstrating a hardware boot time measurement technique.
   \end{itemize}
 }
 
@@ -93,18 +91,6 @@
  \end{itemize}
 }
 
-\feagendaonecolumn
-{Demo - Measuring time - Hardware solution}
-{
-  \begin{itemize}
-  \item Measure total boot time by toggling a GPIO
-  \item Setting up an Arduino board
-  \item Preparing a test circuit with a 7-segment display
-  \item Modifying the DTS to configuring Bone Black pins as GPIOs
-  \item Making the application drive the custom GPIOs
-  \end{itemize}
-}
-
 \section{Half day 2}
 
 \feagendaonecolumn
diff --git a/agenda/boot-time-online-fr-agenda.tex b/agenda/boot-time-online-fr-agenda.tex
index 43cbefa3..7af531b9 100644
--- a/agenda/boot-time-online-fr-agenda.tex
+++ b/agenda/boot-time-online-fr-agenda.tex
@@ -49,9 +49,6 @@
   \item Une webcam USB
   \item Une carte d'extension d'écran tactile LCD connectée à la carte
     BeagleBone Black, pour afficher la vidéo capturée par la webcam.
-  \item Nous utiliserons également une carte Arduino comme moyen pour mesurer
-    précisément le temps de démarrage, pour montrer comment mettre en place
-    des techniques de mesure matérielles.
   \end{itemize}
 }
 
@@ -95,18 +92,6 @@
  \end{itemize}
 }
 
-\feagendaonecolumn
-{Démo - Mesure du temps - Solution matérielle}
-{
-  \begin{itemize}
-  \item Mesure du temps total de démarrage en positionnant une GPIO
-  \item Mise en oeuvre d'une carte Arduino
-  \item Préparation d'un circuit de test avec un afficheur à 7 segments
-  \item Modification du DTS pour configurer les broches de la Bone Black en tant que GPIOs
-  \item Modification de l'application pour piloter les GPIOs personnalisées
-  \end{itemize}
-}
-
 \section{2\textsuperscript{ème} demi-journée}
 
 \feagendaonecolumn
diff --git a/lab-data/boot-time/arduino/stopwatch/stopwatch.ino b/lab-data/boot-time/arduino/stopwatch/stopwatch.ino
deleted file mode 100644
index 6f28b57e..00000000
--- a/lab-data/boot-time/arduino/stopwatch/stopwatch.ino
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * TM1637.cpp
- * A library for the 4 digit display
- *
- * Copyright (c) 2012 seeed technology inc.
- * Website    : www.seeed.cc
- * Author     : Frankie.Chu
- * Create Time: 9 April,2012
- * Change Log :
- *
- * Modified by Michael Opdenacker, Bootlin, https://bootlin.com
- * to display the number of seconds since the Arduino was started.
- *
- * The MIT License (MIT)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#include "TM1637.h"
-#define CLK 2//pins definitions for TM1637 and can be changed to other ports
-#define DIO 3
-TM1637 tm1637(CLK,DIO);
-
-int reset = A0;
-int videoready = A1;
-
-void setup()
-{
-  tm1637.init();
-  tm1637.set(BRIGHTEST);//BRIGHT_TYPICAL = 2,BRIGHT_DARKEST = 0,BRIGHTEST = 7;
-  tm1637.clearDisplay();
-  tm1637.point(false);
-
-  Serial.begin(9600);
-  pinMode(reset, INPUT); // Actually pulled up with an external resistor
-  pinMode(videoready, INPUT); // Actually pulled down with an external resistor
-}
-
-void loop() {
-
-  int resetvalue, videovalue, start_time, elapsed;
-
-  while (true) {
-
-    resetvalue=1024;
-
-    // Waiting for the Beaglebone Black to be resetted (reset taken low)
-    while (resetvalue>100) {
-      resetvalue = analogRead(reset);
-      Serial.print("resetvalue=");
-      Serial.println(resetvalue);
-    }
-
-    // Waiting reset to be released
-    while (resetvalue<100) {
-      resetvalue = analogRead(reset);
-      Serial.print("resetvalue=");
-      Serial.println(resetvalue);
-    }
-
-    start_time=millis();
-    videovalue=0;
-
-    while (videovalue<700) {
-      elapsed = millis() - start_time;
-      if (elapsed > 9999) {
-        tm1637.point(true);
-        tm1637.displayNum(((float) elapsed)/100, 1, false);
-      }
-      else
-        tm1637.displayNum((float) elapsed, 0, false);
-      videovalue = analogRead(videoready);
-      Serial.print("videovalue=");
-      Serial.println(videovalue);
-      delay(10); // Sufficient delay is needed to write to the 7-segment matrix
-
-      // Check a possible reset, meaning we should start over
-      resetvalue = analogRead(reset);
-      if (resetvalue<100 && elapsed>1000) {
-         break;
-      }
-    }
-  }
-}
diff --git a/lab-data/boot-time/arduino/test-7segment/test-7segment.ino b/lab-data/boot-time/arduino/test-7segment/test-7segment.ino
deleted file mode 100644
index b289ff08..00000000
--- a/lab-data/boot-time/arduino/test-7segment/test-7segment.ino
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * TM1637.cpp
- * A library for the 4 digit display
- *
- * Copyright (c) 2012 seeed technology inc.
- * Website    : www.seeed.cc
- * Author     : Frankie.Chu
- * Create Time: 9 April,2012
- * Change Log :
- *
- * Modified by Michael Opdenacker, Bootlin, https://bootlin.com
- * to display the number of seconds since the Arduino was started.
- *
- * The MIT License (MIT)
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-#include "TM1637.h"
-#define CLK 2//pins definitions for TM1637 and can be changed to other ports
-#define DIO 3
-TM1637 tm1637(CLK,DIO);
-
-void setup()
-{
-  tm1637.init();
-  tm1637.set(BRIGHTEST);//BRIGHT_TYPICAL = 2,BRIGHT_DARKEST = 0,BRIGHTEST = 7;
-  tm1637.clearDisplay();
-  tm1637.point(false);
-}
-
-void loop()
-{
-  float m;
-  while(1)
-  {
-    m=(float) millis();
-    if (m>9999) {
-        tm1637.point(true);
-        tm1637.displayNum(m/100, 1, false);
-    } else {
-        tm1637.displayNum(m, 0, false);
-    }
-  }
-}
diff --git a/lab-data/boot-time/rootfs/data/0001-ffmpeg-first-frame-completion-log-and-gpio.patch b/lab-data/boot-time/rootfs/data/0001-ffmpeg-first-frame-completion-log-and-gpio.patch
deleted file mode 100644
index e0deee72..00000000
--- a/lab-data/boot-time/rootfs/data/0001-ffmpeg-first-frame-completion-log-and-gpio.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 294c68c0d0a696ff997363e03dfc7fc430e04ed4 Mon Sep 17 00:00:00 2001
-From: Michael Opdenacker <michael.opdenacker at bootlin.com>
-Date: Fri, 17 May 2019 19:41:49 +0200
-Subject: [PATCH] ffmpeg: first frame completion log and gpio
-
-This writes to the application log  and toggles a GPIO
-after the first frame has been decoded and displayed.
-
-Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>
----
- fftools/ffmpeg.c | 40 ++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 40 insertions(+)
-
-diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
-index 01f04103cf..6e093b843e 100644
---- a/fftools/ffmpeg.c
-+++ b/fftools/ffmpeg.c
-@@ -4648,6 +4648,37 @@ static int transcode_step(void)
-     return reap_filters(0);
- }
- 
-+// Bootlin hack
-+
-+static int writefile(const char *filename, const char *s)
-+{
-+   FILE *f;
-+   int r;
-+
-+   f=fopen(filename, "w");
-+
-+   if (f==NULL) {
-+       av_log(NULL, AV_LOG_ERROR, "Cannot open file: %s\n", filename);
-+       return 0;
-+   }
-+
-+   r=fputs(s, f);
-+
-+   if (r==EOF) {
-+       av_log(NULL, AV_LOG_ERROR, "Error writing to file: %s\n", filename);
-+       return 0;
-+   }
-+
-+   r=fclose(f);
-+
-+   if (r==EOF) {
-+       av_log(NULL, AV_LOG_ERROR, "Error closing file: %s\n", filename);
-+       return 0;
-+  }
-+
-+  return 1;
-+}
-+
- /*
-  * The following code is the main loop of the file converter
-  */
-@@ -4659,6 +4690,7 @@ static int transcode(void)
-     InputStream *ist;
-     int64_t timer_start;
-     int64_t total_packets_written = 0;
-+    static int framecounter=0;
- 
-     ret = transcode_init();
-     if (ret < 0)
-@@ -4696,6 +4728,14 @@ static int transcode(void)
-         }
- 
-         /* dump report by using the output first video and audio streams */
-+	// Bootlin hack to signal when the first frame has been decoded
-+	if (framecounter++==0) {
-+                // Toggle GPIO pin
-+                if (writefile("/sys/class/gpio/export", "127\n") && writefile("/sys/class/gpio/gpio127/direction", "out\n"))
-+                    writefile("/sys/class/gpio/gpio127/value", "1\n");
-+		// Log on console
-+		av_log(NULL, AV_LOG_INFO, "First frame decoded!\n");
-+	}
-         print_report(0, timer_start, cur_time);
-     }
- #if HAVE_THREADS
--- 
-2.17.1
-
diff --git a/labs/boot-time-hardware-measurement/boot-time-hardware-measurement.tex b/labs/boot-time-hardware-measurement/boot-time-hardware-measurement.tex
deleted file mode 100644
index 6619d7c0..00000000
--- a/labs/boot-time-hardware-measurement/boot-time-hardware-measurement.tex
+++ /dev/null
@@ -1,239 +0,0 @@
-\subchapter{Measure boot time - Hardware solution}{Objective: measure
-boot time with hardware}
-
-During this lab, we will use a hardware technique to measure boot time,
-from cold boot (or reset) to the instant when the first frame has been
-decoded.
-
-\section{Arduino setup}
-
-Take the Arduino Nano board provided by your instructor. Connect it in
-the middle of the breadboard provided too, so that you can connect
-wires to both sides of the Arduino.
-
-Download the 1.8.13 version of the Arduino IDE from
-\url{https://www.arduino.cc/} (don't use the Arduino
-package in Ubuntu 20.04, as it has issues connecting to the serial port,
-even with root privileges, while the official version works without any problem).
-Extract the archive in \code{/usr/local/}.
-
-Use the provided USB cable to connect the Arduino to your PC, and start the IDE:
-
-\begin{verbatim}
-/usr/local/arduino-1.8.13/arduino
-\end{verbatim}
-
-Now, configure the IDE for your Arduino:
-\begin{itemize}
-\item In \code{Tools}, \code{Board}, select \code{Arduino Nano}
-\item In \code{Tools}, \code{Processor}, select \code{ATmega328p} (or
-      \code{ATmega328p old bootloader} if you have a Nano clone)
-\item In \code{Tools}, \code{Port}, select \code{ttyUSB1} (or
-      \code{ttyUSB0} if the serial line for your Bone Black board is no longer
-      connected.
-\end{itemize}
-
-Now are now ready to use your Arduino board:
-\begin{itemize}
-\item Go to \code{Files}, \code{Examples}, \code{01. Basics} and select \code{Blink}.
-      This program allows to blink the LED on the Nano.
-\item Press the \code{Upload} butter and you should see the {\em sketch} work
-(that's how the Arduino community call their programs).
-\item You can now unplug the Arduino and plug it back. The same program
-will be started automatically. Loading a program is just necessary once.
-\end{itemize}
-
-\section{7-segment display setup}
-
-We are going to use a 7-segment display to display time elapsed since
-the last time the Beagle Bone Black board was last reset.
-
-Take the TM1637 module provided by your instructor, and insert its pins
-into the breadboard at a convenient location.
-
-Now, using breadboard wires, connect the \code{GND} pin of the Arduino to one
-of the blue rails of the breadboard, then to the \code{GND} pin of the 7-segment
-module. Please use blue or black wires!
-
-Similarly, connect the \code{5V} pin of the Arduino to the red rail of
-the breadboard, then to the \code{5V} pin of the module. Using red or
-orange wires is recommended too.
-
-Then, you can connect the Arduino \code{D2} pin to the \code{CLK} pin of
-the module, and the \code{D3} pin to the \code{DIO} pin of the module:
-
-\begin{center}
-\includegraphics[width=0.6\textwidth]{labs/boot-time-hardware-measurement/nano-7segment.png}
-\end{center}
-
-Now, let's test your wiring by loading the sketch in
-\code{~/boot-time-labs/arduino/test-7segment/}. Upload and try to run it.
-
-Oops, a library is missing. You could have retrieved it through the
-IDE's library manager (\code{Tools}, \code{Manage Libraries}), but in
-this case, we absolutely need its latest version. So, go to
-\url{https://github.com/Seeed-Studio/Grove_4Digital_Display},
-download a zip file and extract this archive into
-\code{~/Arduino/libraries/}. Rename \code{Grove_4Digital_Display-master}
-to \code{Grove_4Digital_Display} (removing the \code{-master} suffix
-added by GitHub, and you should be ready to go.
-
-\section{Configuring Bone Black pins as GPIOs}
-
-Our goal is to measure boot time with the Arduino system, in a way that
-is as accurate as hardware can be, and without having to rely on a slow
-device which is the serial console.
-
-\subsection{Finding a good start signal}
-
-A first possibility would be to watch the 3.3V VDD pins of the Bone
-Black board and start counting when they go high when the board is
-powered on. However, it would be cumbersome to have to power off the
-board each time we wish to make a measurement.
-
-A second possibility is to watch the state of the \code{RESET} signal.
-When this pin goes from high to low, and back to high, it means that the
-board starts booting. That's a good time to start counting, and doing
-it after each reset is a convenient solution.
-
-Look at the Bone Black System Reference and find which pin on the P8 or
-P9 headers is used to expose the \code{SYS_RESET} line.
-
-\subsection{Finding a free pin for the stop signal}
-
-Unfortunately, the schematics for the 4.3" LCD cape from Element 14
-are currently unavailable. The community is looking for them.
-This would have been useful to find pins that are not used by
-this cape.
-
-Fortunately, by reading the Board's Reference Manual about the
-\code{P8} and \code{P9} headers, you can guess what GPIOs could be
-available from the set of possible signals.
-
-If you look for \code{Bootlin} in the Device Tree Source we provided,
-you can see in the pin definitions sections that we selected pin 13 from
-the P9 headers:
-
-\begin{verbatim}
-/* Bootlin boot time labs: use idle pin as custom GPIO on P9_13 */
-AM33XX_PADCONF(AM335X_PIN_GPMC_WPN, PIN_OUTPUT, MUX_MODE7)
-\end{verbatim}
-
-If you look at the \code{Expansion Header P9 Pinout} table in the
-Board's Reference Manual, you will see that \code{MODE7} allows to get
-GPIO bank 0 / number 31 on P9's pin 13.
-
-Back to the pin for \code{SYS_RESET}, there is nothing to configure to
-get it. It's the only line connected to the pin.
-
-\subsection{Pull up or pull down?}
-
-We need to control the state of the pins we watch when they are not
-driven. That's particularly important for the \code{SYS_RESET} signal,
-as if it's left floating, it can reset the board or prevent it from
-booting at any time.
-
-The ATmega328p CPU pins could be configured as pull-up (with internal
-pull-up resistors), but we are not allowed to have a 5V level
-connected to our board, as the Beagle Bone Black is {\bf not 5V tolerant},
-as explicited in its manual.
-
-So, we will use a pull-up resistor to keep it at 3.3V when not driven,
-connected to a 3.3V voltage rail from the Beagle Bone Black.
-
-For our custom GPIO pin, we will keep it low by default, using
-a pull-down resistor (the ATmega328p CPU pins don't have internal
-pull-down resistors), and drive it high, after displaying the first
-video frame.
-
-Then which Arduino pins to connect to? As the Beagle Bone Black board
-has a 3.3V voltage level, it's best to use the Arduino's Analog pins to
-measure the voltage driven by the Bone Black with precision. We will measure a
-small integer value for 0V, and about 700 (out of a 1024 maximum) for
-3.3V.
-
-So, let's use Arduino pin \code{A0} for reset, and pin \code{A1} for the
-custom GPIO, and connect two 1 Kohm resistors provided by your instructor:
-
-\begin{center}
-\includegraphics[width=0.7\textwidth]{labs/boot-time-hardware-measurement/nano-final.png}
-\end{center}
-
-Last but not least, don't forget to connect the ground level
-on the Arduino board to the one on the Beagle Bone Black (pins \code{1}
-or \code{2} on either \code{P8} or \code{P9} connectors).
-
-\section{Making ffmpeg drive the custom GPIO}
-
-Once we know how to modify \code{ffmpeg} to write to its output after
-processing the first frame, it's easy to add code that configures our
-custom GPIO line and drives it.
-
-We are going to use the GPIO Sysfs interface (documented on
-\kdochtml{admin-guide/gpio/sysfs}). This interface is now
-deprecated for several reasons, but it's convenient to use for
-simple needs.
-
-The first thing to do is to find which number Linux will use to
-represent our custom GPIO. To do this, check that your kernel was
-compiled with \kconfig{CONFIG_DEBUG_FS}. Then mount the DebugFS filesystem and
-access GPIO information as follows:
-
-\begin{verbatim}
-mount -t debugfs none /sys/kernel/debug
-cat /sys/kernel/debug/gpio
-\end{verbatim}
-
-Here's what you should get:
-
-\begin{verbatim}
-...
- gpio-124 ([ethernet]          )
- gpio-125 ([ethernet]          )
- gpio-126 (P9_11 [uart4_rxd]   )
- gpio-127 (P9_13 [uart4_txd]   )
-\end{verbatim}
-
-So, our custom GPIO in number \code{127}. Such descriptions actually
-come from the \kfile{arch/arm/boot/dts/am335x-boneblack.dts} file.
-
-Here's example shell code to drive this GPIO to a high level,
-using the legacy interface:
-
-\begin{verbatim}
-cd /sys/class/gpio
-echo 127 > export
-\end{verbatim}
-
-A \code{gpio127} file appears. You can then configure the directory and
-write a value:
-
-\begin{verbatim}
-echo out > gpio127/direction
-echo 1 > gpio127/value
-\end{verbatim}
-
-If you have a multimeter, you could even check by yourself that this
-works.
-
-Now, modify your Buildroot customizations so that you use the patch in
-\code{boot-time-labs/rootfs/data/0001-ffmpeg-first-frame-completion-log-and-gpio.patch}
-instead of the previously used one (see how this page does the same
-thing as above).
-
-Rebuild and reflash your root filesystem.
-
-\section{Final version of the Arduino program}
-
-We should now be able to test our full system.  Loading the sketch in
-\code{~/boot-time-labs/arduino/stopwatch/}. Upload and run it, and then
-press the \code{RESET} button on your board.
-
-If things don't work as expected, you can also open the Arduino Serial
-Monitor (in the \code{Tools} menu), and read the pins values that
-displayed there by the program.
-
-Once the system works, is it in line with the software measurements?
-Is it slightly more pessimistic as it's supposed to start counting
-time a few cycles earlier?
-
diff --git a/labs/boot-time-hardware-measurement/nano-7segment.png b/labs/boot-time-hardware-measurement/nano-7segment.png
deleted file mode 100644
index f91e8946..00000000
Binary files a/labs/boot-time-hardware-measurement/nano-7segment.png and /dev/null differ
diff --git a/labs/boot-time-hardware-measurement/nano-7segments.fzz b/labs/boot-time-hardware-measurement/nano-7segments.fzz
deleted file mode 100644
index 23e6e3bf..00000000
Binary files a/labs/boot-time-hardware-measurement/nano-7segments.fzz and /dev/null differ
diff --git a/labs/boot-time-hardware-measurement/nano-final.fzz b/labs/boot-time-hardware-measurement/nano-final.fzz
deleted file mode 100644
index 23c96cfa..00000000
Binary files a/labs/boot-time-hardware-measurement/nano-final.fzz and /dev/null differ
diff --git a/labs/boot-time-hardware-measurement/nano-final.png b/labs/boot-time-hardware-measurement/nano-final.png
deleted file mode 100644
index 2c5e519f..00000000
Binary files a/labs/boot-time-hardware-measurement/nano-final.png and /dev/null differ
diff --git a/mk/boot-time.mk b/mk/boot-time.mk
index 0c850baf..a860ba89 100644
--- a/mk/boot-time.mk
+++ b/mk/boot-time.mk
@@ -36,7 +36,6 @@ BOOT_TIME_LABS = boot-time-goals \
 		boot-time-build-bootloader \
 		boot-time-build-kernel-and-start-system \
 		boot-time-software-measurement \
-		boot-time-hardware-measurement \
 		boot-time-toolchain \
 		boot-time-application \
 		boot-time-init-scripts \
diff --git a/slides/boot-time-measuring/boot-time-measuring.tex b/slides/boot-time-measuring/boot-time-measuring.tex
index b9012555..e0db27a4 100644
--- a/slides/boot-time-measuring/boot-time-measuring.tex
+++ b/slides/boot-time-measuring/boot-time-measuring.tex
@@ -25,13 +25,11 @@
   \url{https://arduino.cc}
   \begin{itemize}
   \item If you don't have an oscilloscope, an Arduino (or any general
-        purpose MCU or MPU board) is a great solution too.
+        purpose MCU or MPU board) is a good solution too.
   \item The main strength of Arduino is its great ease of use and
         programming, plus all the hardware support libraries that are available.
   \item You can easily connect board pins to the Arduino analog pins, and
         watch their voltage.
-  \item In our labs, we will use Arduino Nano boards for measuring the
-        whole boot time.
   \item Arduino boards are Open Source Hardware. This project is
       definitely worth supporting!
   \end{itemize}
@@ -145,13 +143,4 @@ Measuring time with software
 \item Time the various components of boot time through messages
       written to the serial console.
 \end{itemize}
-
-Measuring time with hardware
-\begin{itemize}
-\item Setting up an Arduino system
-\item Timing reset on Beagle Bone Black
-\item Modifying the video player to toggle a GPIO
-      after the first frame is processed.
-\item Display the live total time through a 7-segment display
-\end{itemize}
 }
diff --git a/slides/boot-time-shopping-list/boot-time-shopping-list.tex b/slides/boot-time-shopping-list/boot-time-shopping-list.tex
index f7b8defe..2b0cdd2b 100644
--- a/slides/boot-time-shopping-list/boot-time-shopping-list.tex
+++ b/slides/boot-time-shopping-list/boot-time-shopping-list.tex
@@ -1,5 +1,5 @@
 \begin{frame}
-\frametitle{Shopping list: basic hardware for this course}
+\frametitle{Shopping list: hardware for this course}
   \begin{columns}
     \column{0.85\textwidth}
     \begin{itemize}
@@ -20,19 +20,3 @@
     \includegraphics[height=0.20\textheight]{common/sd-card.pdf} \\
   \end{columns}
 \end{frame}
-
-\begin{frame}
-\frametitle{Shopping list: optional hardware for this course}
-  If you are interested in doing the optional hardware measurement lab
-    \begin{itemize}
-      \item A handful of breadboard wires (at least 10 to have sufficient different colors)
-	    \footnote{\tiny \url{https://www.olimex.com/Products/Breadboarding/JUMPER-WIRES/JW-110x10/}}
-      \item Arduino Nano board (or a clone), with its USB power cable\\
-            \url{https://store.arduino.cc/arduino-nano}
-      \item A breadboard large enough to plugin the Arduino Nano\\
-            \url{https://www.olimex.com/Products/Breadboarding/BREADBOARD-1/}
-      \item A four digit display based on the TM1637 chip\\
-            \url{https://www.seeedstudio.com/Grove-4-Digit-Display.html}
-      \item A 1,000 to 10,000 Ohm resistor for use as a pull-down resistor
-    \end{itemize}
-\end{frame}




More information about the training-materials-updates mailing list