[bootlin/training-materials updates] master: Boot-time slides: remove mklibs (f3e14da1)

Michael Opdenacker michael.opdenacker at bootlin.com
Fri Apr 29 17:20:59 CEST 2022


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

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

commit f3e14da1115f516051113ea6208ffb4037ece258
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Fri Apr 29 17:20:59 2022 +0200

    Boot-time slides: remove mklibs
    
    No longer supported by Yocto
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


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

f3e14da1115f516051113ea6208ffb4037ece258
 labs/boot-time-kernel/boot-time-kernel.tex         |  18 +++-
 labs/boot-time-kernel/boot.svg                     | 110 +++++++--------------
 .../boot-time-init-scripts.tex                     |  16 +--
 3 files changed, 49 insertions(+), 95 deletions(-)

diff --git a/labs/boot-time-kernel/boot-time-kernel.tex b/labs/boot-time-kernel/boot-time-kernel.tex
index e8a50a07..87301f2a 100644
--- a/labs/boot-time-kernel/boot-time-kernel.tex
+++ b/labs/boot-time-kernel/boot-time-kernel.tex
@@ -93,11 +93,19 @@ drivers which could be compiled as modules and loaded later.
 Recompile and reboot the kernel, updating the boot graph until there is
 nothing left that you can do.
 
-When you are done exploiting data from the boot graphs, you can remove
-\code{dmesg} support from BusyBox and remove this command too
-from \code{playvideo}. Update your root filesystem and then kernel so
-that we get back to the original situation. We no longer need
-\code{initcall_debug}.
+When you are done exploiting data from the boot graphs, resume
+to using the root filesystem generated by the normal \code{buildroot}
+workspace. Also remove \code{initcall_debug} and \code{printk.time=1}
+from the kernel command line.
+
+{\bf Note}: unfortunately, in recent kernels, at least for the BeagleBone Black
+board, the boot graph no longer shows individual driver or device
+related elapsed time. We haven't managed yet to find why
+and how to get more useful bootgraphs again. So, our best solution is
+to remove unnecessary functionality from the kernel, and keep an eye
+on the timing of messages in the console, to detect what's taking most
+time in the kernel initialization. That's almost equivalent, but more
+manual.
 
 \section{Removing unnecessary functionality}
 
diff --git a/labs/boot-time-kernel/boot.svg b/labs/boot-time-kernel/boot.svg
index 9ebe4c01..de6b9b1d 100644
--- a/labs/boot-time-kernel/boot.svg
+++ b/labs/boot-time-kernel/boot.svg
@@ -1,78 +1,38 @@
 <?xml version="1.0" standalone="no"?> 
 <svg width="2000" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg">
-<rect x="7.23465259464901" width="428.962899797163" y="150" height="145" style="fill:rgb(0,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(13.234652594649,154) rotate(90)">tracer_init_tracefs</text>
-<rect x="437.861522488581" width="9.80860633808891" y="150" height="145" style="fill:rgb(0,255,0);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(438.861522488581,154) rotate(90)" font-size="3pt">chr_dev_init</text>
-<rect x="451.877531476246" width="16.6984825200243" y="150" height="145" style="fill:rgb(255,0,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(457.877531476246,154) rotate(90)">populate_rootfs</text>
-<rect x="482.445069103106" width="62.8759135343076" y="150" height="145" style="fill:rgb(255,255,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(488.445069103106,154) rotate(90)">sysc_init</text>
-<rect x="555.734360715836" width="2.46430354005224" y="150" height="145" style="fill:rgb(255,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(556.734360715836,154) rotate(90)" font-size="3pt">serial8250_init</text>
-<rect x="558.341096478846" width="766.232230029489" y="150" height="145" style="fill:rgb(0,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(564.341096478846,154) rotate(90)">omap8250_platform_driver_init</text>
-<rect x="1326.18868878298" width="165.592154575773" y="150" height="145" style="fill:rgb(0,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1332.18868878298,154) rotate(90)">tilcdc_drm_init</text>
-<rect x="1494.15584415584" width="7.4596050737639" y="150" height="145" style="fill:rgb(0,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1495.15584415584,154) rotate(90)" font-size="3pt">mtdoops_init</text>
-<rect x="1503.40828657572" width="4.99643194817963" y="150" height="145" style="fill:rgb(255,0,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1504.40828657572,154) rotate(90)" font-size="3pt">fixed_mdio_bus_init</text>
-<rect x="1510.27216322489" width="135.631649518182" y="150" height="145" style="fill:rgb(255,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1516.27216322489,154) rotate(90)">cpsw_driver_init</text>
-<rect x="1647.41404647221" width="94.7592536018192" y="150" height="145" style="fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1653.41404647221,154) rotate(90)">am335x_child_init</text>
-<rect x="1742.18912587658" width="4.0220146768379" y="150" height="145" style="fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1743.18912587658,154) rotate(90)" font-size="3pt">i2c_dev_init</text>
-<rect x="1746.22131428363" width="11.4544898033716" y="150" height="145" style="fill:rgb(0,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1747.22131428363,154) rotate(90)" font-size="3pt">uvc_init</text>
-<rect x="1760.01576203558" width="7.0334388193603" y="150" height="145" style="fill:rgb(0,255,0);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1761.01576203558,154) rotate(90)" font-size="3pt">ledtrig_cpu_init</text>
-<rect x="1768.72786633979" width="4.78278361374373" y="150" height="145" style="fill:rgb(255,0,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1769.72786633979,154) rotate(90)" font-size="3pt">oprofile_init</text>
-<rect x="1774.02837977984" width="4.87434718564487" y="150" height="145" style="fill:rgb(255,255,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1775.02837977984,154) rotate(90)" font-size="3pt">xfrm_user_init</text>
-<rect x="1778.91177028123" width="11.1888424034119" y="150" height="145" style="fill:rgb(255,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1779.91177028123,154) rotate(90)" font-size="3pt">inet6_init</text>
-<rect x="1790.17182879612" width="7.7286437171274" y="150" height="145" style="fill:rgb(0,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1791.17182879612,154) rotate(90)" font-size="3pt">sit_init</text>
-<rect x="1797.91516790133" width="5.14225541454061" y="150" height="145" style="fill:rgb(0,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1798.91516790133,154) rotate(90)" font-size="3pt">packet_init</text>
-<rect x="1803.06759704608" width="5.15016831581579" y="150" height="145" style="fill:rgb(0,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1804.06759704608,154) rotate(90)" font-size="3pt">ipsec_pfkey_init</text>
-<rect x="1808.31498100614" width="4.89921630393906" y="150" height="145" style="fill:rgb(255,0,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1809.31498100614,154) rotate(90)" font-size="3pt">init_dns_resolver</text>
-<rect x="1813.32836917134" width="4.90373796181029" y="150" height="145" style="fill:rgb(255,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1814.32836917134,154) rotate(90)" font-size="3pt">thumbee_init</text>
-<rect x="1818.24228086336" width="5.48024934044656" y="150" height="145" style="fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1819.24228086336,154) rotate(90)" font-size="3pt">swp_emulation_init</text>
-<rect x="1823.73496476295" width="13.3988026881834" y="150" height="145" style="fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1824.73496476295,154) rotate(90)" font-size="3pt">__omap2_common_pm_late_init</text>
-<rect x="1837.14620201028" width="4.72965413375164" y="150" height="145" style="fill:rgb(0,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1838.14620201028,154) rotate(90)" font-size="3pt">__sr_class3_init</text>
-<rect x="1843.1170512298" width="5.45424980768485" y="150" height="145" style="fill:rgb(0,255,0);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1844.1170512298,154) rotate(90)" font-size="3pt">load_system_certificate_list</text>
-<rect x="1849.45641556586" width="13.0585479333415" y="150" height="145" style="fill:rgb(255,0,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1850.45641556586,154) rotate(90)" font-size="3pt">clk_debug_init</text>
-<rect x="1862.5364413741" width="74.8379594337725" y="150" height="145" style="fill:rgb(255,255,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1868.5364413741,154) rotate(90)">deferred_probe_initcall</text>
-<rect x="1938.46977242728" width="5.91545891059354" y="150" height="145" style="fill:rgb(255,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1939.46977242728,154) rotate(90)" font-size="3pt">rtc_hctosys</text>
-<rect x="1945.9836373955" width="4.01636260449845" y="150" height="145" style="fill:rgb(0,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
-<text transform="translate(1946.9836373955,154) rotate(90)" font-size="3pt">regulator_init_complete</text>
-<text transform="translate(0,89) rotate(90)">0.23</text>
-<text transform="translate(130,89) rotate(90)">0.34</text>
-<text transform="translate(260,89) rotate(90)">0.46</text>
-<text transform="translate(390,89) rotate(90)">0.57</text>
-<text transform="translate(520,89) rotate(90)">0.69</text>
-<text transform="translate(650,89) rotate(90)">0.8</text>
-<text transform="translate(780,89) rotate(90)">0.92</text>
-<text transform="translate(910,89) rotate(90)">1.03</text>
-<text transform="translate(1040,89) rotate(90)">1.15</text>
-<text transform="translate(1170,89) rotate(90)">1.26</text>
-<text transform="translate(1300,89) rotate(90)">1.38</text>
-<text transform="translate(1430,89) rotate(90)">1.49</text>
-<text transform="translate(1560,89) rotate(90)">1.61</text>
-<text transform="translate(1690,89) rotate(90)">1.72</text>
-<text transform="translate(1820,89) rotate(90)">1.84</text>
+<rect x="12.3167033355513" width="46.387033994982" y="150" height="145" style="fill:rgb(0,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
+<text transform="translate(18.3167033355513,154) rotate(90)">tracer_init_tracefs</text>
+<rect x="60.6235902286823" width="689.827144466155" y="150" height="145" style="fill:rgb(0,255,0);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
+<text transform="translate(66.6235902286823,154) rotate(90)">chr_dev_init</text>
+<rect x="750.956578289326" width="2.0845461614706" y="150" height="145" style="fill:rgb(255,0,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
+<text transform="translate(751.956578289326,154) rotate(90)" font-size="3pt">inet_init</text>
+<rect x="757.478431516861" width="7.95350823798117" y="150" height="145" style="fill:rgb(255,255,20);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
+<text transform="translate(758.478431516861,154) rotate(90)" font-size="3pt">kswapd_init</text>
+<rect x="773.933641283594" width="2.40099250313858" y="150" height="145" style="fill:rgb(255,0,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
+<text transform="translate(774.933641283594,154) rotate(90)" font-size="3pt">pty_init</text>
+<rect x="776.46168287558" width="3.01035757742841" y="150" height="145" style="fill:rgb(0,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
+<text transform="translate(777.46168287558,154) rotate(90)" font-size="3pt">serial8250_init</text>
+<rect x="788.817206766058" width="2.0633713133293" y="150" height="145" style="fill:rgb(0,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
+<text transform="translate(789.817206766058,154) rotate(90)" font-size="3pt">inet6_init</text>
+<rect x="794.843803823176" width="2.09395720508905" y="150" height="145" style="fill:rgb(0,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
+<text transform="translate(795.843803823176,154) rotate(90)" font-size="3pt">ubifs_init</text>
+<rect x="797.303615348929" width="17.37043375862" y="150" height="145" style="fill:rgb(255,0,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
+<text transform="translate(803.303615348929,154) rotate(90)">clk_debug_init</text>
+<rect x="815.181069082489" width="1131.50859632475" y="150" height="145" style="fill:rgb(255,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"/>
+<text transform="translate(821.181069082489,154) rotate(90)">deferred_probe_initcall</text>
+<text transform="translate(0,89) rotate(90)">0.14</text>
+<text transform="translate(130,89) rotate(90)">0.25</text>
+<text transform="translate(260,89) rotate(90)">0.36</text>
+<text transform="translate(390,89) rotate(90)">0.47</text>
+<text transform="translate(520,89) rotate(90)">0.58</text>
+<text transform="translate(650,89) rotate(90)">0.69</text>
+<text transform="translate(780,89) rotate(90)">0.8</text>
+<text transform="translate(910,89) rotate(90)">0.91</text>
+<text transform="translate(1040,89) rotate(90)">1.02</text>
+<text transform="translate(1170,89) rotate(90)">1.13</text>
+<text transform="translate(1300,89) rotate(90)">1.24</text>
+<text transform="translate(1430,89) rotate(90)">1.36</text>
+<text transform="translate(1560,89) rotate(90)">1.47</text>
+<text transform="translate(1690,89) rotate(90)">1.58</text>
+<text transform="translate(1820,89) rotate(90)">1.69</text>
 </svg>
diff --git a/slides/boot-time-init-scripts/boot-time-init-scripts.tex b/slides/boot-time-init-scripts/boot-time-init-scripts.tex
index 34b67447..5f9efe4a 100644
--- a/slides/boot-time-init-scripts/boot-time-init-scripts.tex
+++ b/slides/boot-time-init-scripts/boot-time-init-scripts.tex
@@ -185,7 +185,7 @@ system (200 MHz)!
 
 
 \begin{frame}
-\frametitle{Reduce size (1)}
+\frametitle{Reduce size}
 \begin{itemize}
 	\item Strip your executables and libraries, removing ELF sections
 		only needed for development and debugging. The \code{strip}
@@ -201,20 +201,6 @@ system (200 MHz)!
 \end{itemize}
 \end{frame}
 
-\begin{frame}
-\frametitle{Reduce size (2)}
-You may try \code{mklibs}, available at \url{https://packages.debian.org/sid/mklibs}.
-\begin{itemize}
-	\item \code{mklibs} produces cut-down shared libraries that contain
-	only the routines required by a particular set of executables.
-	Really useful with big libraries like OpenGL and QT. It even
-	works without having the source code.
-	\item Available in Yocto, but not in Buildroot (2021.02 status).
-        \item Limitation: \code{mklibs} could remove \code{dlopen}ed libraries
-        (loaded "manually" by applications) because it doesn't see them.
-\end{itemize}
-\end{frame}
-
 \begin{frame}
 \frametitle{Quick splashscreen display (1)}
 Often the first sign of life that you are showing!




More information about the training-materials-updates mailing list