[bootlin/training-materials updates] master: Embedded Linux labs: updates to the "thirdparty" lab (a1d8c5a6)

Michael Opdenacker michael.opdenacker at bootlin.com
Fri May 8 11:42:20 CEST 2020


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

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

commit a1d8c5a65df04d89c26fcf60d173884efd277e7b
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Fri May 8 11:42:20 2020 +0200

    Embedded Linux labs: updates to the "thirdparty" lab
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


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

a1d8c5a65df04d89c26fcf60d173884efd277e7b
 labs/sysdev-thirdparty/sysdev-thirdparty.tex | 175 +++++++++++++++++----------
 labs/sysdev-toolchain/sysdev-toolchain.tex   |   9 +-
 2 files changed, 116 insertions(+), 68 deletions(-)

diff --git a/labs/sysdev-thirdparty/sysdev-thirdparty.tex b/labs/sysdev-thirdparty/sysdev-thirdparty.tex
index 486c6382..5c4770f8 100644
--- a/labs/sysdev-thirdparty/sysdev-thirdparty.tex
+++ b/labs/sysdev-thirdparty/sysdev-thirdparty.tex
@@ -121,15 +121,19 @@ Make your board boot from this new directory through NFS.
 
 \code{alsa-lib} is a library supposed to handle the interaction with
 the ALSA subsystem. It is available at
-\url{http://alsa-project.org}. Download version 1.1.6, and extract it
+\url{http://alsa-project.org}. Download version 1.2.2, and extract it
 in \code{$HOME/__SESSION_NAME__-labs/thirdparty/}.
 
-By looking at the \code{configure} script, we see that it has
-been generated by \code{autoconf} (the header contains a
-sentence like {\em Generated by GNU Autoconf 2.69}). Most of the time,
-\code{autoconf} comes with \code{automake}, that generates Makefiles
-from \code{Makefile.am} files. So alsa-lib uses a rather common build
-system. Let's try to configure and build it:
+{\bf Tip}: if the website for any of the source packages that we
+need to download in the next sections is down, a great mirror
+that you can use is \url{http://sources.buildroot.net/}.
+
+Back to \code{alsa-lib} sources, look at the \code{configure} script
+and see see that it has been generated by \code{autoconf} (the header
+contains a sentence like {\em Generated by GNU Autoconf 2.69}). Most of
+the time, \code{autoconf} comes with \code{automake}, that generates
+Makefiles from \code{Makefile.am} files. So alsa-lib uses a rather
+common build system. Let's try to configure and build it:
 
 \begin{verbatim}
 ./configure
@@ -349,7 +353,7 @@ And we're done with alsa-lib!
 \section{Alsa-utils}
 
 Download alsa-utils from the ALSA offical webpage. We tested the lab
-with version 1.1.6.
+with version 1.2.2
 
 Once uncompressed, we quickly discover that the alsa-utils build
 system is based on the {\em autotools}, so we will work once again
@@ -473,61 +477,101 @@ Now, let's see what has been installed in \code{/tmp/alsa-utils/} (run
 \code{tree /tmp/alsa-utils}):
 
 \begin{verbatim}
-./lib/udev/rules.d/90-alsa-restore.rules
-./usr/bin/aseqnet
-./usr/bin/aseqdump
-./usr/bin/arecordmidi
-./usr/bin/aplaymidi
-./usr/bin/aconnect
-./usr/bin/alsaloop
-./usr/bin/speaker-test
-./usr/bin/iecset
-./usr/bin/aplay
-./usr/bin/amidi
-./usr/bin/amixer
-./usr/bin/alsaucm
-./usr/sbin/alsaconf
-./usr/sbin/alsactl
-./usr/share/sounds/alsa/Side_Left.wav
-./usr/share/sounds/alsa/Rear_Left.wav
-./usr/share/sounds/alsa/Noise.wav
-./usr/share/sounds/alsa/Front_Right.wav
-./usr/share/sounds/alsa/Front_Center.wav
-./usr/share/sounds/alsa/Side_Right.wav
-./usr/share/sounds/alsa/Rear_Right.wav
-./usr/share/sounds/alsa/Rear_Center.wav
-./usr/share/sounds/alsa/Front_Left.wav
-./usr/share/locale/ru/LC_MESSAGES/alsaconf.mo
-./usr/share/locale/ja/LC_MESSAGES/alsaconf.mo
-./usr/share/locale/ja/LC_MESSAGES/alsa-utils.mo
-./usr/share/locale/fr/LC_MESSAGES/alsa-utils.mo
-./usr/share/locale/de/LC_MESSAGES/alsa-utils.mo
-./usr/share/man/fr/man8/alsaconf.8
-./usr/share/man/man8/alsaconf.8
-./usr/share/man/man1/aseqnet.1
-./usr/share/man/man1/aseqdump.1
-./usr/share/man/man1/arecordmidi.1
-./usr/share/man/man1/aplaymidi.1
-./usr/share/man/man1/aconnect.1
-./usr/share/man/man1/alsaloop.1
-./usr/share/man/man1/speaker-test.1
-./usr/share/man/man1/iecset.1
-./usr/share/man/man1/aplay.1
-./usr/share/man/man1/amidi.1
-./usr/share/man/man1/amixer.1
-./usr/share/man/man1/alsactl.1
-./usr/share/alsa/speaker-test/sample_map.csv
-./usr/share/alsa/init/ca0106
-./usr/share/alsa/init/hda
-./usr/share/alsa/init/test
-./usr/share/alsa/init/info
-./usr/share/alsa/init/help
-./usr/share/alsa/init/default
-./usr/share/alsa/init/00main
+/tmp/alsa-utils/
+|-- lib
+|   |-- systemd
+|   |   `-- system
+|   |       |-- alsa-restore.service
+|   |       |-- alsa-state.service
+|   |       `-- sound.target.wants
+|   |           |-- alsa-restore.service -> ../alsa-restore.service
+|   |           `-- alsa-state.service -> ../alsa-state.service
+|   `-- udev
+|       `-- rules.d
+|           |-- 89-alsa-ucm.rules
+|           `-- 90-alsa-restore.rules
+|-- usr
+|   |-- bin
+|   |   |-- aconnect
+|   |   |-- alsabat
+|   |   |-- alsaloop
+|   |   |-- alsatplg
+|   |   |-- alsaucm
+|   |   |-- amidi
+|   |   |-- amixer
+|   |   |-- aplay
+|   |   |-- aplaymidi
+|   |   |-- arecord -> aplay
+|   |   |-- arecordmidi
+|   |   |-- aseqdump
+|   |   |-- aseqnet
+|   |   |-- axfer
+|   |   |-- iecset
+|   |   `-- speaker-test
+|   |-- sbin
+|   |   |-- alsabat-test.sh
+|   |   |-- alsaconf
+|   |   |-- alsactl
+|   |   `-- alsa-info.sh
+|   `-- share
+|       |-- alsa
+|       |   |-- init
+|       |   |   |-- 00main
+|       |   |   |-- ca0106
+|       |   |   |-- default
+|       |   |   |-- hda
+|       |   |   |-- help
+|       |   |   |-- info
+|       |   |   `-- test
+|       |   `-- speaker-test
+|       |       `-- sample_map.csv
+|       |-- man
+|       |   |-- fr
+|       |   |   `-- man8
+|       |   |       `-- alsaconf.8
+|       |   |-- man1
+|       |   |   |-- aconnect.1
+|       |   |   |-- alsabat.1
+|       |   |   |-- alsactl.1
+|       |   |   |-- alsa-info.sh.1
+|       |   |   |-- alsaloop.1
+|       |   |   |-- amidi.1
+|       |   |   |-- amixer.1
+|       |   |   |-- aplay.1
+|       |   |   |-- aplaymidi.1
+|       |   |   |-- arecord.1 -> aplay.1
+|       |   |   |-- arecordmidi.1
+|       |   |   |-- aseqdump.1
+|       |   |   |-- aseqnet.1
+|       |   |   |-- axfer.1
+|       |   |   |-- axfer-list.1
+|       |   |   |-- axfer-transfer.1
+|       |   |   |-- iecset.1
+|       |   |   `-- speaker-test.1
+|       |   |-- man7
+|       |   `-- man8
+|       |       `-- alsaconf.8
+|       `-- sounds
+|           `-- alsa
+|               |-- Front_Center.wav
+|               |-- Front_Left.wav
+|               |-- Front_Right.wav
+|               |-- Noise.wav
+|               |-- Rear_Center.wav
+|               |-- Rear_Left.wav
+|               |-- Rear_Right.wav
+|               |-- Side_Left.wav
+|               `-- Side_Right.wav
+`-- var
+    `-- lib
+        `-- alsa
+
+24 directories, 63 files
 \end{verbatim}
 
 So, we have:
 \begin{itemize}
+\item The systemd service definitions in \code{lib/systemd}
 \item The udev rules in \code{lib/udev}
 \item The alsa-utils binaries in \code{/usr/bin} and \code{/usr/sbin}
 \item Some sound samples in \code{/usr/share/sounds}
@@ -571,13 +615,15 @@ will tell you that it cannot find this file, but it won't work if you
 copy this file from the staging area.
 
 The sound you get will be mainly noise (as what you would get by
-running \code{speaker-test} on your PCs). At least, sound output is
+running \code{speaker-test} on your PCs). This is a way to test
+all possible frequencies, but is not really meant for a human
+to listen to. At least, sound output is
 showing some signs of life! It will get much better when we play
 samples with \code{ogg123}.
 
 \section{libogg}
 
-Now, let's work on {\em libogg}. Download the 1.3.3 version from
+Now, let's work on {\em libogg}. Download the 1.3.4 version from
 \url{http://xiph.org} and extract it.
 
 Configuring {\em libogg} is very similar to the configuration of the
@@ -606,7 +652,7 @@ needed at runtime:
 \begin{verbatim}
 cd ..
 cp -a staging/usr/lib/libogg.so.0* target/usr/lib/
-arm-linux-strip target/usr/lib/libogg.so.0.8.3
+arm-linux-strip target/usr/lib/libogg.so.0.8.4
 \end{verbatim}
 
 Done with {\em libogg}!
@@ -903,8 +949,9 @@ ERROR: Failed to load plugin /usr/lib/ao/plugins-4/libalsa.so => dlopen() failed
 \end{verbatim}
 
 This error message is unfortunately not sufficient to figure out what's going wrong.
-It's a good opportunity to use the \code{strace} utility to get more details about
-what's going on. To do so, you can used the one built by Crosstool-ng inside the
+It's a good opportunity to use the \code{strace} utility (covered in
+upcoming lectures) to get more details about what's going on. To do so,
+you can used the one built by Crosstool-ng inside the
 toolchain \code{target/usr/bin} directory.
 
 You can now run \code{ogg123} through \code{strace}:
diff --git a/labs/sysdev-toolchain/sysdev-toolchain.tex b/labs/sysdev-toolchain/sysdev-toolchain.tex
index 7855857e..6f558299 100644
--- a/labs/sysdev-toolchain/sysdev-toolchain.tex
+++ b/labs/sysdev-toolchain/sysdev-toolchain.tex
@@ -98,10 +98,11 @@ In \code{Toolchain options}:
   to type.
 \end{itemize}
 
-In \code{Debug facilities}, disable every option. Some of these
-options will be useful in a real toolchain, but in our labs, we will
-do debugging work with another toolchain anyway.  Hence, not compiling
-debugging features here will reduce toolchain building time.
+In \code{Debug facilities}, disable every option, except \code{strace}
+(with default settings). Some of these options will be useful in a real
+toolchain, but in our labs, we will do debugging work with another
+toolchain anyway. \code{strace} is an exception as we will use it earlier.
+Hence, not compiling debugging features here will reduce toolchain building time.
 
 Explore the different other available options by traveling through the
 menus and looking at the help for some of the options. Don't hesitate




More information about the training-materials-updates mailing list