<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Academic OSS ELC</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/</link><atom:link href="https://academic-oss-elc.netlify.app/talk/2020-oss-elc/index.xml" rel="self" type="application/rss+xml"/><description>Academic OSS ELC</description><generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><image><url>https://academic-oss-elc.netlify.app/images/icon_hu0b7a4cb9992c9ac0e91bd28ffd38dd00_9727_512x512_fill_lanczos_center_2.png</url><title>Academic OSS ELC</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/</link></image><item><title>Managing the Wind: Remote Management for Zephyr Devices With LwM2M</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/managing-the-wind-remote-management-for-zephyr-devices-with-lwm2m-frederic-desbiens-eclipse-foundation/</link><pubDate>Wed, 01 Jul 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/managing-the-wind-remote-management-for-zephyr-devices-with-lwm2m-frederic-desbiens-eclipse-foundation/</guid><description>&lt;blockquote>
&lt;p>LightweightM2M (LwM2M) by OMA SpecWorks is a device management protocol designed for sensor networks and the demands of a machine-to-machine (M2M) environment. It is designed for the remote management of devices and is based on the Contrained Application Protocol (CoAP, RFC 7252), which itself provides an interaction model similar to the client/server model of HTTP.&lt;/p>
&lt;p>The Zephyr RTOS from the Linux Foundation possesses built-in support for LwM2M. In this presentation, you will discover how to leverage LwM2M to manage Zephyr-based devices. You will understand the pros and cons of using Zephyr&amp;rsquo;s built-in LwM2M client. You will also learn about various LwM2m servers, including the Eclipse Leshan open source project, which you can use to build your own LwM2M management server.&lt;/p>
&lt;/blockquote>
&lt;h2 id="lwm2m-features">LwM2M features&lt;/h2>
&lt;ul>
&lt;li>bootstrapping&lt;/li>
&lt;li>Device Configuration&lt;/li>
&lt;li>Firmware Update&lt;/li>
&lt;li>Fault management&lt;/li>
&lt;li>Configuration and Control&lt;/li>
&lt;li>Reporting&lt;/li>
&lt;/ul>
&lt;h2 id="lwm2m-in-the-zephyr-arch">LwM2M in the Zephyr Arch&lt;/h2>
&lt;ul>
&lt;li>IPSP
&lt;ul>
&lt;li>Bluetooth profile leveraging 6LoWPAN (IPv6 over BLE)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>LwM2M Client
&lt;ul>
&lt;li>Runs on QEMU&lt;/li>
&lt;li>Runs on actual board&lt;/li>
&lt;li>requires server&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="a-server-eclipse-leshan">A Server: Eclipse Leshan&lt;/h2>
&lt;ul>
&lt;li>Java library for implementing clients and servers&lt;/li>
&lt;li>Simple (no framework, few dpenecneies)&lt;/li>
&lt;li>Web UI for discovering&lt;/li>
&lt;li>build using &lt;code>mvn install&lt;/code>&lt;/li>
&lt;li>based on Eclipse Californium (an implementation of CoAP)&lt;/li>
&lt;/ul>
&lt;h2 id="lwm2m-sample">LwM2m sample&lt;/h2>
&lt;ul>
&lt;li>lwm2m is lightweight. &lt;code>net/lwm2m.h&lt;/code>.&lt;/li>
&lt;li>Includes&lt;/li>
&lt;li>main&lt;/li>
&lt;li>Setup&lt;/li>
&lt;li>Event processing&lt;/li>
&lt;/ul>
&lt;h2 id="demo">Demo&lt;/h2>
&lt;h3 id="deploy">Deploy&lt;/h3>
&lt;pre>&lt;code class="language-sh">west build -b nrf52_adafruit_feather samples/net/lwm2m_client -- - DCONF_FILE=&amp;quot;prj.conf overlay-bt.conf&amp;quot;
west flash --runner jlink
sudo minicom -D /dev/ttyUSB0 -b 115200
&lt;/code>&lt;/pre>
&lt;h3 id="6lowpan-and-assign-ipv6-address">6lowpan and assign IPv6 address&lt;/h3>
&lt;pre>&lt;code class="language-sh">sudo su
modprobe bluetooth_6lowpan
echo 1 &amp;gt; /sys/kernel/debug/bluetooth/6lowpan_enable
hcitool lescan
echo &amp;quot;connect C2:FA:8D:93:21:DD 2&amp;quot; &amp;gt; /sys/kernel/debug/bluetooth/6lowpan_control
ip address add 2001:db8::2/64 dev bt0
ping6 2001:db8::1
&lt;/code>&lt;/pre>
&lt;h3 id="getting-and-starting-leshan-demo-server">Getting and starting Leshan Demo Server&lt;/h3>
&lt;pre>&lt;code class="language-sh">wget
https://ci.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/le
shan-server-demo.jar
java -Djava.net.preferIPv6Addresses=true
-jar leshan-server-demo.jar
&lt;/code>&lt;/pre>
&lt;ul>
&lt;li>you can read, write and modify values&lt;/li>
&lt;li>Some are built into sample
&lt;ul>
&lt;li>temperature sensor&lt;/li>
&lt;li>lights&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul></description></item><item><title>Reproducible Builds and Hash Equivalence in the Yocto Project</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/reproducible-builds-and-hash-equivalence-in-the-yocto-project-joshua-watt-garmin/</link><pubDate>Wed, 01 Jul 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/reproducible-builds-and-hash-equivalence-in-the-yocto-project-joshua-watt-garmin/</guid><description>&lt;blockquote>
&lt;p>As embedded Linux devices get more complex, many questions arise about the process of constructing these systems and how it can be improved. Can these complex systems be built more efficiently to reduce development time? How can developers be assured that these systems can be built reproducibly to ensure software supply chain integrity? Joshua will highlight two new features in the latest release of the Yocto project specifically designed to address these questions. The first feature is hash equivalence which reduces build times by collectively detecting when tasks have rebuilt unnecessarily and preventing rebuilds of downstream tasks. Joshua will explain how this feature works, how to apply it to your own projects, and what to expect when you do. The second feature is build reproducibility testing, which ensures that the project has binary identical outputs from one build to the next. Joshua will describe how these tests work, what they currently cover within the project, and how to enable them for your own projects. Taken together, these features improve the Yocto project’s unique ability to effectively construct complex Linux embedded systems that are cost effective and secure.&lt;/p>
&lt;/blockquote>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://reproducible-builds.org/">reproducible-builds&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="runqueue">RunQueue&lt;/h3>
&lt;p>MIA&lt;/p>
&lt;h3 id="runqueue-with-hash-equivalence">RunQueue with Hash Equivalence&lt;/h3>
&lt;ul>
&lt;li>Now each task also has &lt;code>unihash&lt;/code>&lt;/li>
&lt;li>breaks task hash from it&amp;rsquo;s upstream&lt;/li>
&lt;li>&lt;code>unihash&lt;/code> is &lt;code>tashhash&lt;/code> by default.&lt;/li>
&lt;li>&lt;code>outhash&lt;/code> is calculated. Then stored in &lt;code>hashserver&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Trickle down effect&lt;/p>
&lt;ul>
&lt;li>all downstream tasks will still have &lt;code>taskhash&lt;/code> updated.&lt;/li>
&lt;li>if it&amp;rsquo;s a trivial task we would like not to have to rebuild the downstream tasks.&lt;/li>
&lt;li>if the &lt;code>outhash&lt;/code> is the same even if the &lt;code>taskhash&lt;/code> changed, then the hashserver will set &lt;code>unihash&lt;/code> to a certain value
&lt;ul>
&lt;li>Now this &lt;code>unihash&lt;/code> propagates down to downstream tasks.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="recipe-updates">Recipe Updates&lt;/h3>
&lt;p>Which updates work well with this hash equivalence server?&lt;/p>
&lt;ul>
&lt;li>Library updates &amp;amp; CVE Fixes&lt;/li>
&lt;li>Native tool updates&lt;/li>
&lt;/ul>
&lt;p>Output Hash Calc&lt;/p>
&lt;ul>
&lt;li>Checksum of all files and metadata that goes into an sstate object&lt;/li>
&lt;li>signature files can be found in depsig&lt;/li>
&lt;/ul>
&lt;p>Hash Equivalence Server&lt;/p>
&lt;ul>
&lt;li>Reference impl in bitbake
&lt;ul>
&lt;li>&lt;code>BB_HASHSERVE = &amp;quot;auto&amp;quot;&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>can be shared between multiple clients
&lt;ul>
&lt;li>Specify server with BB_HASHSERVER&lt;/li>
&lt;li>Only makes sense if you are sharing SSTATE_CACHE&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Debugging Hash Equiv.&lt;/p>
&lt;ul>
&lt;li>Can configure logging in &lt;code>local.conf&lt;/code>
&lt;ul>
&lt;li>&lt;code>BB_LOGCONFG = &amp;quot;logconfig.json&amp;quot;&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Future Improvements&lt;/p>
&lt;ul>
&lt;li>Read-only hash server for CI centered workflows
&lt;ul>
&lt;li>&amp;ldquo;read-only&amp;rdquo; flag for the client&lt;/li>
&lt;li>&amp;ldquo;read-mostly&amp;rdquo; flag for the client&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>better hash equivalence database introspection tools&lt;/li>
&lt;/ul>
&lt;h2 id="reproducable-builds">Reproducable Builds&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://reproducible-builds.org/">https://reproducible-builds.org/&lt;/a>&lt;/li>
&lt;/ul>
&lt;ol>
&lt;li>Imrpove Hash Equiv. effectiveness&lt;/li>
&lt;li>Code archival&lt;/li>
&lt;li>Software supply chain
&lt;ol>
&lt;li>verify toolchain is not comprising your target&lt;/li>
&lt;/ol>
&lt;/li>
&lt;/ol>
&lt;h3 id="build-flow">Build FLow&lt;/h3>
&lt;ul>
&lt;li>tool builds almost all the tools it needs&lt;/li>
&lt;li>compile native tools from source&lt;/li>
&lt;/ul>
&lt;h3 id="reproducibility-qa-test">Reproducibility QA Test&lt;/h3>
&lt;ul>
&lt;li>reproducible build
&lt;ul>
&lt;li>available since 3.0 (zeus) release&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>QA Test&lt;/p>
&lt;ul>
&lt;li>Does an &amp;lsquo;A&amp;rsquo; and &amp;lsquo;B&amp;rsquo; build
&lt;ul>
&lt;li>A uses sstate&lt;/li>
&lt;li>B from scratch&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>test images
&lt;ul>
&lt;li>core-image-minimal&lt;/li>
&lt;li>core-image-full-cmdline&lt;/li>
&lt;li>core-image-sato&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>test packages formats
&lt;ul>
&lt;li>deb&lt;/li>
&lt;li>ipk&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>What causes reproducibility issues?&lt;/p>
&lt;ul>
&lt;li>build path differences&lt;/li>
&lt;li>timestamp differences&lt;/li>
&lt;li>host differences
&lt;ul>
&lt;li>consider using docker container to reduce issues&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>diffoscope&lt;/p>
&lt;ul>
&lt;li>report non-reproducible packages in browsable HTML&lt;/li>
&lt;li>supports diff inside of archive files
&lt;ul>
&lt;li>packages (deb, ipks)&lt;/li>
&lt;li>archives (tar, tar.xz, etc)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="future-imrpovements">Future Imrpovements&lt;/h3>
&lt;p>NOTE: exttool-sdk provides all the tools required to rebuild&lt;/p>
&lt;ul>
&lt;li>test more packages
&lt;ul>
&lt;li>SDK images&lt;/li>
&lt;li>sato images&lt;/li>
&lt;li>world images&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>test rpm packages&lt;/li>
&lt;li>test final rootfs images&lt;/li>
&lt;li>test other deployed objectstest native tools&lt;/li>
&lt;li>test more architectures
&lt;ul>
&lt;li>Currently only tests x86-64&lt;/li>
&lt;li>AArch64 would be the highest priority&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>reproducible-builds.org recomended these things
&lt;ul>
&lt;li>Use DisorderFS to test for file system ordering non-reproducibility&lt;/li>
&lt;li>Use libfaketime to do proper timestamp testing
&lt;ul>
&lt;li>psuedo library needs adjustments&lt;/li>
&lt;li>provides fake timestamps&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="conclusions">Conclusions&lt;/h2>
&lt;h3 id="community">Community&lt;/h3>
&lt;ul>
&lt;li>Freenode IRC
&lt;ul>
&lt;li>#yocto&lt;/li>
&lt;li>#oe&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Monthly virtual planning meeting
&lt;ul>
&lt;li>First Tuesday of each month at 8:00 AM Pacific Time&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Bug triage
&lt;ul>
&lt;li>Thursday at 7:30&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="contact">Contact&lt;/h3>
&lt;ul>
&lt;li>JPEWhacker@gmail&lt;/li>
&lt;li>&lt;a href="mailto:Joshua.Watt@Garmin.com">Joshua.Watt@Garmin.com&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="questions">Questions&lt;/h3>
&lt;p>QA with Speaker&lt;/p>
&lt;ul>
&lt;li>restoring from sstate is called set-scene?
&lt;ul>
&lt;li>Yes, bitbake actually executes a task called do_populate_sysroot_setscene in place of of do_populate_sysroot to do the actual restoring from setsecene&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Is the hash server part of the sstate cache?
&lt;ul>
&lt;li>No. It depends on the sstate cache contents (as I&amp;rsquo;ll cover in a bit), but it&amp;rsquo;s a separate entity.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Will the uni-hash always stay as the first &amp;lsquo;equivalent&amp;rsquo; task-hask?
&lt;ul>
&lt;li>The hash equivalence server currently uses the oldest reported hash as the &amp;ldquo;canonical&amp;rdquo; unihash, but the decision is internal to the server, so other things could be done.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>What if a recipe doesn&amp;rsquo;t change it all but only a referenced file (using SRC_URI) which is copied by the recipe into the roots?
&lt;ul>
&lt;li>hash equivalence is based on the output of sstate tasks, so if the file changes sstate output, then it won&amp;rsquo;t be equivalent, but if the state output is the same, than it will be equivalent.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>This is true for any of the things that go into a tasks hash (files, variables, etc).
&lt;ul>
&lt;li>how does hash equivalence work in a multiconfig scenario when building for both arm32 and aarch64?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Can you elaborate?
&lt;ul>
&lt;li>Can the path for your own tests be in a location outside of the poky repo?&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Yes. In fact, OE&amp;rsquo;s QA test core will look in those paths in any layer, so you can simply drop the file in that path relative to your own layer root and it will find it.
&lt;ul>
&lt;li>Can you restate the reproducobilty project that recommend DisorderFS and Libfaketime?
reproducible-builds.org, and it&amp;rsquo;s on my references slide&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>My Questions&lt;/p>
&lt;ul>
&lt;li>Can you comment on &amp;lsquo;universal/&amp;rsquo; and on &amp;lsquo;uninative&amp;rsquo; with respect to sstate?
&lt;ul>
&lt;li>uninative provides consistent native tools. allows you to use the same tools&lt;/li>
&lt;li>really &amp;ldquo;light&amp;rdquo; container&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Notes&lt;/p>
&lt;ul>
&lt;li>Paths encoded in dwarf symbols in debug symbols becomes problems&lt;/li>
&lt;/ul></description></item><item><title>Software Update (OTA) for Zephyr</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/software-update-ota-for-zephyr-parthiban-nallathambi-linumiz/</link><pubDate>Wed, 01 Jul 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/software-update-ota-for-zephyr-parthiban-nallathambi-linumiz/</guid><description>&lt;blockquote>
&lt;p>Zephyr devices can be connected in two possible (direct and in-direct) ways to the internet. Directly using Modem/WiFi/Ethernet medium or in-directly via local radio through Gateways like Linux. Upgrading such Zephyr system in the field is a complex task and must be robust, secure.&lt;/p>
&lt;p>This talk will details various possible update solutions available like UpdateHub, Hawkbit, SWUpdate for Zephyr. Using a NXP FRDM-K64F board as an example, we will discuss and demo different possible ways for updating Zephyr system.&lt;/p>
&lt;/blockquote>
&lt;h2 id="agenda">Agenda&lt;/h2>
&lt;ul>
&lt;li>McuBoot&lt;/li>
&lt;li>Updatehub&lt;/li>
&lt;li>mcumgr&lt;/li>
&lt;li>ZUpdate&lt;/li>
&lt;li>ZUpdate -Hawkbit&lt;/li>
&lt;li>Future work&lt;/li>
&lt;/ul>
&lt;h3 id="linux-vs-zephyra">Linux vs Zephyra&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>on linux it handles both download and install&lt;/p>
&lt;/li>
&lt;li>
&lt;p>for zephyr this is split into two&lt;/p>
&lt;ul>
&lt;li>download handled by application&lt;/li>
&lt;li>install is handled by MCUBoot&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>First we focus on download.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Then we look at install&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="mcuboot">MCUBoot&lt;/h2>
&lt;ul>
&lt;li>Bootloader for Zephyr and mynewt&lt;/li>
&lt;li>integrity and security check&lt;/li>
&lt;li>multi image boot support&lt;/li>
&lt;li>softwre update heavy lifting&lt;/li>
&lt;/ul>
&lt;p>MCUBoot Memory Layout&lt;/p>
&lt;ul>
&lt;li>NXP Freedom kit&lt;/li>
&lt;/ul>
&lt;pre>&lt;code class="language-javascript">chosen {
zephyr,code-partition = &amp;amp;slot0_partition;
};
&amp;amp;flash0 {
partitions {
compatible = &amp;quot;fixed-partitions&amp;quot;;
#address-cells = &amp;lt;1&amp;gt;;
#size-cells = &amp;lt;1&amp;gt;;
boot_partition: partition@0 {
label = &amp;quot;mcuboot&amp;quot;;
reg = &amp;lt;0x00000000 0x00010000&amp;gt;;
read-only;
};
slot0_partition: partition@20000 {
label = &amp;quot;image-0&amp;quot;;
reg = &amp;lt;0x00020000 0x00060000&amp;gt;;
};
slot1_partition: partition@80000 {
label = &amp;quot;image-1&amp;quot;;
reg = &amp;lt;0x00080000 0x00060000&amp;gt;;
};
scratch_partition: partition@e0000 {
label = &amp;quot;image-scratch&amp;quot;;
reg = &amp;lt;0x000e0000 0x00020000&amp;gt;;
};
};
};
&lt;/code>&lt;/pre>
&lt;p>Paritions&lt;/p>
&lt;ul>
&lt;li>Mcuboot&lt;/li>
&lt;li>slot0&lt;/li>
&lt;li>slot1&lt;/li>
&lt;li>scratch&lt;/li>
&lt;/ul>
&lt;p>MCUBoot operation&lt;/p>
&lt;ul>
&lt;li>conditions: Interrupt swap, request swap, valid image&lt;/li>
&lt;li>Video from Youtube&lt;/li>
&lt;/ul>
&lt;p>MCUBoot swap&lt;/p>
&lt;ul>
&lt;li>swap status
&lt;ul>
&lt;li>three stage operation&lt;/li>
&lt;li>slot1 to slot0&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>API&lt;/p>
&lt;ul>
&lt;li>image confirmed&lt;/li>
&lt;li>write image&lt;/li>
&lt;li>request upgrade&lt;/li>
&lt;li>erase&lt;/li>
&lt;/ul>
&lt;p>Live share&lt;/p>
&lt;pre>&lt;code class="language-sh">west flash -d ./frdm_mcuboot/
&lt;/code>&lt;/pre>
&lt;h2 id="software-update">Software Update&lt;/h2>
&lt;h3 id="updatehub">Updatehub&lt;/h3>
&lt;ul>
&lt;li>What is it?&lt;/li>
&lt;li>Polling Mode&lt;/li>
&lt;li>Manual mode&lt;/li>
&lt;li>Community vs Enterprise&lt;/li>
&lt;/ul>
&lt;p>Live Share&lt;/p>
&lt;pre>&lt;code class="language-sh">~/work/west/native/zephyr/samples/net/updatehub
west flash
~/work/west/native/zephyr/samples/net/updatehub
west flash -bin-file ./build/zephyr/zephyr-signed.bin
&lt;/code>&lt;/pre>
&lt;p>Web UI&lt;/p>
&lt;ul>
&lt;li>Overview&lt;/li>
&lt;li>Devices&lt;/li>
&lt;li>Pakcages&lt;/li>
&lt;li>Rollouts&lt;/li>
&lt;/ul>
&lt;p>Each rollout has&lt;/p>
&lt;ul>
&lt;li>UID, version, hardware&lt;/li>
&lt;/ul>
&lt;h3 id="mcumgr">MCUmgr&lt;/h3>
&lt;ul>
&lt;li>Management library for Zephyr and mynewt&lt;/li>
&lt;li>OS and hwardware agnostic&lt;/li>
&lt;/ul>
&lt;p>Layered modular design&lt;/p>
&lt;ul>
&lt;li>1: img_mgmt,fs_mgmt,log_mgmt,os_mgmt&lt;/li>
&lt;li>2: mgmt&lt;/li>
&lt;li>3: SMP&lt;/li>
&lt;li>4: BLuetooth, Shell, UDP&lt;/li>
&lt;/ul>
&lt;p>Reference Screenshots&lt;/p>
&lt;ul>
&lt;li>STM32 target initial slot list&lt;/li>
&lt;li>Uploading the OTA image via the Bluetooth interface&lt;/li>
&lt;li>STM32 target initial slot list after OTA push&lt;/li>
&lt;/ul>
&lt;h3 id="zupdate-architecture">ZUpdate architecture&lt;/h3>
&lt;ul>
&lt;li>Configuration Manager&lt;/li>
&lt;li>ZUpdate Core&lt;/li>
&lt;li>Download Handler
&lt;ul>
&lt;li>Hawkbit&lt;/li>
&lt;li>updatehub&lt;/li>
&lt;li>SWUpdate&lt;/li>
&lt;li>Custom&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>StorageHandler
&lt;ul>
&lt;li>SPI NOR&lt;/li>
&lt;li>FLash&lt;/li>
&lt;li>MMC&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Low-Level Comm
&lt;ul>
&lt;li>BLE&lt;/li>
&lt;li>WiFI&lt;/li>
&lt;li>LoRa&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul></description></item><item><title>A Disciplined Approach to Debugging</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/a-disciplined-approach-to-debugging-lev-iserovich-d-e-shaw-research/</link><pubDate>Tue, 30 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/a-disciplined-approach-to-debugging-lev-iserovich-d-e-shaw-research/</guid><description>&lt;h2 id="a-disciplined-approach-to-debugging">A Disciplined Approach to Debugging&lt;/h2>
&lt;blockquote>
&lt;p>A large fraction of the time spent on software development and system design projects is used for debugging. However, effective debugging techniques are not as well-studied or formalized as those for writing code. Instead, debugging is typically tackled with ad-hoc and idiosyncratic approaches. This talk will present a systematic approach to debugging software and hardware in order to locate bugs more effectively. It will also describe a taxonomy to classify such “insects,” which should enable better code-writing practices.&lt;/p>
&lt;p>Debugging faulty hardware, single executables, multi-threaded programs, and distributed applications will be covered. Tips and tricks for software and hardware debugging using tools like GDB, Wireshark, gperftools, and hardware protocol analyzers will also be presented, along with examples of both common and unusual bugs caught in the wild.&lt;/p>
&lt;/blockquote>
&lt;h2 id="observe">Observe&lt;/h2>
&lt;ul>
&lt;li>C++ glog&lt;/li>
&lt;li>Python logging module&lt;/li>
&lt;li>Shell logger, file redirect&lt;/li>
&lt;/ul>
&lt;p>Logging aggregators&lt;/p>
&lt;ul>
&lt;li>splunlk&lt;/li>
&lt;li>ElasticStack&lt;/li>
&lt;li>Graphana&lt;/li>
&lt;/ul>
&lt;p>Check and print all return codes&lt;/p>
&lt;ul>
&lt;li>assert is friend&lt;/li>
&lt;/ul>
&lt;p>strace - trace system calls&lt;/p>
&lt;p>gdb&lt;/p>
&lt;ul>
&lt;li>attach to running&lt;/li>
&lt;li>don&amp;rsquo;t forget debug symbols
&lt;ul>
&lt;li>debug symbolts don&amp;rsquo;t use too much space&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>set &lt;code>ulimit -c unlimited&lt;/code>&lt;/li>
&lt;li>compile with `-O0 for straightforward flow
&lt;ul>
&lt;li>avoids jumping around codes.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="bisect">Bisect&lt;/h2>
&lt;ul>
&lt;li>with or without hypothesis&lt;/li>
&lt;li>disable parts of prgram / workflow&lt;/li>
&lt;li>switch compiler optimzation&lt;/li>
&lt;li>Only switch one variable at a time.&lt;/li>
&lt;li>trust stack
&lt;ul>
&lt;li>your code &amp;lt; library &amp;lt; compiler &amp;lt; OS &amp;lt; hardware&lt;/li>
&lt;li>trust but verify&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="classifying">Classifying&lt;/h2>
&lt;p>Hard error (easy)&lt;/p>
&lt;ul>
&lt;li>crash&lt;/li>
&lt;li>unrecoverable&lt;/li>
&lt;li>wrong data output&lt;/li>
&lt;li>resouce exhaustion&lt;/li>
&lt;/ul>
&lt;p>Soft error&lt;/p>
&lt;ul>
&lt;li>only something happens&lt;/li>
&lt;li>want to turn this into hard error&lt;/li>
&lt;/ul>
&lt;p>Turning soft to hard&lt;/p>
&lt;ul>
&lt;li>tracking and exceptions&lt;/li>
&lt;/ul>
&lt;h2 id="other">Other&lt;/h2>
&lt;h3 id="ex-disk-io-errors">EX: Disk I/O Errors&lt;/h3>
&lt;ol>
&lt;li>IO error log in program&lt;/li>
&lt;li>&amp;ldquo;soft error&amp;rdquo; - intermittent - EIO is unpredicatable&lt;/li>
&lt;li>Trying other errors (&lt;code>ENOENT, EPERM&lt;/code>)&lt;/li>
&lt;li>Look at &lt;code>errorno.h&lt;/code> and &lt;code>errno-base.h&lt;/code>&lt;/li>
&lt;li>How about &lt;code>ELOOP&lt;/code>? Try recursive symbolic links&lt;/li>
&lt;/ol>
&lt;h3 id="start-up-program">Start up program&lt;/h3>
&lt;p>MIA&lt;/p>
&lt;h3 id="more-gdb-features">More GDB Features&lt;/h3>
&lt;ul>
&lt;li>Remote debugging with gdb-server and target command&lt;/li>
&lt;li>Watchpoints
&lt;ul>
&lt;li>&lt;code>watch &amp;lt;extpression&amp;gt; (write), rwatch (read), awatch (r,w)&lt;/code>&lt;/li>
&lt;li>prefer HW watchpoints. HW watchpoints are free but limited in number (4 on x86)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Conditional breakpoints&lt;/li>
&lt;li>Observe values at each break
&lt;ul>
&lt;li>&lt;code>command &amp;lt;breakpoint&amp;gt; &lt;/code>&lt;/li>
&lt;li>can run command at breakpoint&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>catch
&lt;ul>
&lt;li>great for C++&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="ex-debugging-hang-with-gdb">EX: Debugging Hang with GDB&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>App hang periodically (one every 10,0000)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Stuck in &lt;code>read()&lt;/code>, why?&lt;/p>
&lt;ul>
&lt;li>&lt;code>read()&lt;/code> is a blocking call&lt;/li>
&lt;li>libpthread is not compiled with debug info. This is why we don&amp;rsquo;t see any of the code.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>it&amp;rsquo;s reading input from stdin. it is meant to read from network.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;pre>&lt;code>(gdb) info registers
&lt;/code>&lt;/pre>
&lt;ul>
&lt;li>race between close() and read()&lt;/li>
&lt;li>object is cleaned up, and memory used for something else that sets &lt;code>m_socket = 0&lt;/code>.&lt;/li>
&lt;li>To fix we added a flash, and then a &lt;code>wait()&lt;/code> for the thread&lt;/li>
&lt;/ul>
&lt;h3 id="wireshark">Wireshark&lt;/h3>
&lt;ul>
&lt;li>wireshark is the best GUI for network capture/debug&lt;/li>
&lt;li>tcpdump to cpature output to file, then visualize with wireshark&lt;/li>
&lt;li>&lt;code>man 7 pcap-filter &lt;/code> for capture
&lt;ul>
&lt;li>&lt;code>tcpdump -i eth0 tcp port 80 and host 142..&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>MIA&lt;/li>
&lt;/ul>
&lt;h3 id="packet-loss">Packet Loss&lt;/h3>
&lt;ul>
&lt;li>In wireshark look for RED, which indicates errors.&lt;/li>
&lt;/ul>
&lt;h3 id="hardware-debugging">Hardware Debugging&lt;/h3>
&lt;ul>
&lt;li>Observability is key&lt;/li>
&lt;li>get analyzer for any interface&lt;/li>
&lt;li>I2C/SpI
&lt;ul>
&lt;li>SAleae&lt;/li>
&lt;li>Beagle&lt;/li>
&lt;li>Easyi2c (win only)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>USB
&lt;ul>
&lt;li>TCpdump and wireshark support&lt;/li>
&lt;li>modprobe usbmod&lt;/li>
&lt;li>tcpdump -i usbmodn&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>MIA&lt;/li>
&lt;/ul>
&lt;h3 id="i2c-example">I2C Example&lt;/h3>
&lt;ul>
&lt;li>Preioidc loss of I2C bus connected to Xilinx FPGA&lt;/li>
&lt;li>Step 1 repoduce
&lt;ul>
&lt;li>increase activity on i2c&lt;/li>
&lt;li>poll temp volt sensors&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Step 2 observe
&lt;ul>
&lt;li>IP block was encrypted&lt;/li>
&lt;li>use logic analyzer to watch probes&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>I2C ANlayzer Example&lt;/p>
&lt;ul>
&lt;li>yellow - SCL CLock&lt;/li>
&lt;li>green SDA data&lt;/li>
&lt;li>zoomed region shows glitched on rise&lt;/li>
&lt;li>causes &amp;ldquo;extra clock&amp;rdquo;&lt;/li>
&lt;li>solution was to put stronger pull up
&lt;ul>
&lt;li>faster rise time&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>sly770.pdf from ti.com has more info&lt;/li>
&lt;/ul>
&lt;h3 id="questions">Questions&lt;/h3>
&lt;ul>
&lt;li>Surge?&lt;/li>
&lt;li>you can create your own version of &lt;code>assert&lt;/code> if you need to avoid it being compiled out&lt;/li>
&lt;li>&lt;code>-Wall&lt;/code> is a good starting point.&lt;/li>
&lt;li>Use static analysis tools&lt;/li>
&lt;li>gcore will work hen process is hung&lt;/li>
&lt;li>can attach to hung process directly with gbd&lt;/li>
&lt;li>docker containers are great from debugging.
&lt;ul>
&lt;li>drop packets&lt;/li>
&lt;li>set up docker container for other aritecture.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>How to analyze core dump
&lt;ul>
&lt;li>gdb will load up application.&lt;/li>
&lt;li>can&amp;rsquo;t step, but you can examin all information.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>gdb has great thread support&lt;/li>
&lt;li>valgrind and halgring
&lt;ul>
&lt;li>halgrind is subset tool of valgrint&lt;/li>
&lt;li>halgrind slows down your code because it&amp;rsquo;s emulating the CPU&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>gdb is hard to find documentation
&lt;ul>
&lt;li>Use &lt;code>gdb help&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>release debugging
&lt;ul>
&lt;li>include &lt;code>-g&lt;/code>. symbols are worth the minor space they add, minimal performance impact.&lt;/li>
&lt;li>don&amp;rsquo;t includee &lt;code>-O0&lt;/code> because it will slow down program&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul></description></item><item><title>Building Bare Metal Toolchains, Crosstool-ng and Yocto Project</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/building-bare-metal-toolchains-crosstool-ng-and-yocto-project-mark-hatle-xilinx/</link><pubDate>Tue, 30 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/building-bare-metal-toolchains-crosstool-ng-and-yocto-project-mark-hatle-xilinx/</guid><description>&lt;blockquote>
&lt;p>Recently I was tasked to create a bare metal toolchain to create software for a variety of embedded processor architectures and configurations. Crosstool-ng is often used to create these toolchains, but Yocto Project SDK builder is capable of doing this as well. This presentation will compare both crosstool-ng and the Yocto Project for this task, include my experiences working with both tools, include Yocto Project configuration information and give the audience an understanding when they may want to use one tool vs the other.&lt;/p>
&lt;/blockquote>
&lt;h2 id="agenda">Agenda&lt;/h2>
&lt;ul>
&lt;li>crosstool-ng&lt;/li>
&lt;li>Yocto Project SDK builder&lt;/li>
&lt;li>Experience&lt;/li>
&lt;li>Yocto Project Configuration&lt;/li>
&lt;li>Recommendation&lt;/li>
&lt;li>Questions&lt;/li>
&lt;/ul>
&lt;h2 id="crosstool-ng">crosstool-ng&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>crosstool-ng is versatile cross toolchain generator&lt;/p>
&lt;/li>
&lt;li>
&lt;p>good at reproducable toolchain&lt;/p>
&lt;/li>
&lt;li>
&lt;p>`ct-ng list-samples&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Runtime relocatable&lt;/p>
&lt;ul>
&lt;li>can install in one location and mount/run from many&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>binaries are very specific to the host environments they were built for&lt;/p>
&lt;ul>
&lt;li>determine which operating system the user is using&lt;/li>
&lt;li>builds on the oldest distro&lt;/li>
&lt;li>Can build from Cygwin&lt;/li>
&lt;li>expects you to have cygwin cross compiler&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Configuration is similar to kernel config&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Config process will create ctx files&lt;/p>
&lt;/li>
&lt;li>
&lt;p>xilinx typically distributed &amp;ldquo;multilib&amp;rdquo; versions&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="yocto-project-sdk-builder">Yocto Project SDK builder&lt;/h2>
&lt;h3 id="yocto-project">Yocto Project&lt;/h3>
&lt;ul>
&lt;li>yocto project is not linux specific
&lt;ul>
&lt;li>FreeRTOS&lt;/li>
&lt;li>OpenAMP&lt;/li>
&lt;li>Bare Metal&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Outputs include
&lt;ul>
&lt;li>Run-time images&lt;/li>
&lt;li>SDK / eSDK&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>This talk is focusing on SDK&lt;/p>
&lt;h3 id="yocto-project-sdk">Yocto Project SDK&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>target SDK&lt;/p>
&lt;ul>
&lt;li>matches operating system runtime environment&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>defined SDK&lt;/p>
&lt;ul>
&lt;li>SDK where each component is define to be include in SDK&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>SDK can be multilib enabled&lt;/p>
&lt;ul>
&lt;li>multilib are built independently of each other&lt;/li>
&lt;li>slower, but safer approach foor complex configuration&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>self extracting installation file&lt;/p>
&lt;/li>
&lt;li>
&lt;p>built to isolate sdk environment from the host system&lt;/p>
&lt;ul>
&lt;li>SDK includes its own glibc, and some runtime components&lt;/li>
&lt;li>Don&amp;rsquo;t need your own cygwin and other environment&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>installation and runtime locations must be the same&lt;/p>
&lt;/li>
&lt;li>
&lt;p>automatic runtime relocation is not supported&lt;/p>
&lt;ul>
&lt;li>note - this is supported by the plain &amp;lsquo;sdk&amp;rsquo;&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>example&lt;/p>
&lt;pre>&lt;code class="language-bash">oe-init-build-env build-baremeta-tc
DISTRO=xilinx-standalone MACHINE=microblaze-tc bitbake meta-toolchain
&lt;/code>&lt;/pre>
&lt;ul>
&lt;li>slower than crosstool-ng
&lt;ul>
&lt;li>more steps to prevent multilib contamination&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="sdk---distro-conf---xilinx-standaloneconf">SDK - distro conf - xilinx-standalone.conf&lt;/h3>
&lt;p>How to create SDK config (and distro) ?&lt;/p>
&lt;ul>
&lt;li>LIBC_DEPENDENCIES
&lt;ul>
&lt;li>newlib-static dev&lt;/li>
&lt;li>libgloss-staticdev&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>install static library
&lt;ul>
&lt;li>clear defaults for distro feature backfill&lt;/li>
&lt;li>virtual runtime init manager&lt;/li>
&lt;li>preffered virtual kernel&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;pre>&lt;code># xilinx-standalone.conf
SDK_VERSION = &amp;quot;&amp;quot;xilinx-standalone
&lt;/code>&lt;/pre>
&lt;h3 id="sdk---machine-conf---microblaze-tcconf">SDK - machine conf - microblaze-tc.conf&lt;/h3>
&lt;ul>
&lt;li>multilib
&lt;ul>
&lt;li>MULTILIB_GLOBAL_VARIANTS&lt;/li>
&lt;li>MULTILIBS += &amp;ldquo;multilib:libmble&amp;rdquo;&lt;/li>
&lt;li>tons more&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>default tune
&lt;ul>
&lt;li>&lt;code>DEFAULTTUNE = &amp;quot;microblaze&amp;quot;&lt;/code>&lt;/li>
&lt;li>AVAILTUNES&lt;/li>
&lt;li>BASE_LIB&lt;/li>
&lt;li>TUNE_FEATURES&lt;/li>
&lt;li>PACKAGES_EXTRA_ARCH&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="experience---part-1">Experience - part 1&lt;/h2>
&lt;h4 id="changes-from-crosstool-ng">Changes from crosstool-NG&lt;/h4>
&lt;ul>
&lt;li>binutils
&lt;ul>
&lt;li>set diffferent defaults to match prior toolchain&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>GCC
&lt;ul>
&lt;li>different default to match prior toolchain&lt;/li>
&lt;li>restore some previously disabled newlib options (sysroots)&lt;/li>
&lt;li>only build SDK GCC once, create symlinks for other multilibs (gnu-toolchain-canadian.bb)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>newlib/libgloss
&lt;ul>
&lt;li>adjust defaults&lt;/li>
&lt;li>workaround issues with multilibs conflicted&lt;/li>
&lt;li>workaround issues where libgloss and newlib dependency wasn&amp;rsquo;t multilib aware&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="compare">Compare&lt;/h3>
&lt;ul>
&lt;li>cross
&lt;ul>
&lt;li>MIA&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>yocto
&lt;ul>
&lt;li>linux sample confs&lt;/li>
&lt;li>no baremetal confs&lt;/li>
&lt;li>not relocatable&lt;/li>
&lt;li>full feature toolchain&lt;/li>
&lt;li>support mingw&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="experience---part-2">Experience - part 2&lt;/h2>
&lt;h3 id="xilinx-bare-meta-toolchain">Xilinx Bare Meta Toolchain&lt;/h3>
&lt;ul>
&lt;li>transitions from crosstool-ng to Yocto Project SDK to unify toolchain source and testing&lt;/li>
&lt;li>transition was not painless from development perspective
&lt;ul>
&lt;li>2-3 weeks for first few weeks&lt;/li>
&lt;li>took 3 months to iterate the get it stable&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>lots of questions about multilib configuration&lt;/li>
&lt;li>why was this transition and maintence was hard
&lt;ul>
&lt;li>people didn&amp;rsquo;t understand &lt;strong>why&lt;/strong> certain settings were set&lt;/li>
&lt;li>old version of crosstool-ng, people were not keeping up on configuration&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>initial goals was compatability with fromer crosstool-ng and custom ARM toolchain
&lt;ul>
&lt;li>pseudo runtime relocation capable&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="bare-metal-multilibs">Bare Metal Multilibs&lt;/h3>
&lt;ul>
&lt;li>aarch32-tc.conf&lt;/li>
&lt;li>aarch32
&lt;ul>
&lt;li>standard ARM (A profile) 32bit instruction set&lt;/li>
&lt;li>multilib config based on GNU/ARM defaults&lt;/li>
&lt;li>17 multilibs defined
&lt;ul>
&lt;li>custom defined to match GNU/ARM settings&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>first we got it working&lt;/li>
&lt;li>Now we can focus on fine tuning&lt;/li>
&lt;li>Custom &lt;code>arm-rm-tc.conf&lt;/code>&lt;/li>
&lt;li>ARM R/M
&lt;ul>
&lt;li>readltime&lt;/li>
&lt;li>microcontroller&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>aarch64
&lt;ul>
&lt;li>&lt;code>aarch64-tc.conf&lt;/code>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Microblaze (microblaze-tc.conf)
&lt;ul>
&lt;li>common microblaze isntruction set permulation&lt;/li>
&lt;li>custom config&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="bare-meta-toolchain-configuration">Bare Meta Toolchain COnfiguration&lt;/h3>
&lt;ul>
&lt;li>binutils
&lt;ul>
&lt;li>disable: gold as LD, gprof, shared&lt;/li>
&lt;li>enable: enable-lto, static, multilib&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>gcc&lt;/li>
&lt;li>newlib/libgloss
&lt;ul>
&lt;li>&lt;code>recipes-core&lt;/code>&lt;/li>
&lt;li>xilinx baaremeta implements device specific items using libxil, but we use libgloss to provide the framework&lt;/li>
&lt;li>flags
&lt;ul>
&lt;li>enable-newlib-io-c99-format&lt;/li>
&lt;li>long-long&lt;/li>
&lt;li>io-flow&lt;/li>
&lt;li>long-double&lt;/li>
&lt;li>disable-newlib-supplied-syscall&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>libgloss multilib
&lt;ul>
&lt;li>&amp;ldquo;${MLPREFIX}newlib&amp;rdquo;&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>This was one of the major issues:&lt;/p>
&lt;ul>
&lt;li>disable &amp;lsquo;disable-initfini-array&amp;rsquo;&lt;/li>
&lt;/ul>
&lt;h3 id="lessons">Lessons&lt;/h3>
&lt;ul>
&lt;li>more multilib - longer initial project parse time&lt;/li>
&lt;li>microblaze parse time is nearly an hour (48 multilibs)
&lt;ul>
&lt;li>devlopment workaround, build for only one multilib&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>mingw32 builds are sequential with linux version, using shared sstatic-cache&lt;/li>
&lt;li>roughly 15 minutes on the same machine for mingw parts&lt;/li>
&lt;/ul>
&lt;h3 id="recommendations">Recommendations&lt;/h3>
&lt;ul>
&lt;li>for quick toolchain - use Crosstool-ng&lt;/li>
&lt;li>Yocto Project makes sense if you need Cygwin
&lt;ul>
&lt;li>less important since windows is moving to linux&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Yocto Project take more time and effort
&lt;ul>
&lt;li>easy way for common source and configuration switchs&lt;/li>
&lt;li>simplify defect handling and propagation of fixes for systems&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="questions">Questions&lt;/h2>
&lt;ul>
&lt;li>Vivado vitis baremetal tools chians are built with this&lt;/li>
&lt;li>How did you converge configuration
&lt;ul>
&lt;li>query gcc&lt;/li>
&lt;li>check logs for what arguments were passed&lt;/li>
&lt;li>print config&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>which release was this against.
&lt;ul>
&lt;li>3.0 zeus&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>multilib vs multiconfig
&lt;ul>
&lt;li>this was largely due to legacy reasons&lt;/li>
&lt;li>one gcc binary to execute&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="author">Author&lt;/h2>
&lt;ul>
&lt;li>kernel-crashing.org&lt;/li>
&lt;li>author: fray&lt;/li>
&lt;/ul></description></item><item><title>Developing, Building and Testing Your Baremetal Applications Using The Yocto Project and OpenEmbedded Infrastructure</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/developing-building-and-testing-your-baremetal-applications-using-the-yocto-project-and-openembedded-infrastructure-alejandro-hernandez-samaniego-microsoft/</link><pubDate>Tue, 30 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/developing-building-and-testing-your-baremetal-applications-using-the-yocto-project-and-openembedded-infrastructure-alejandro-hernandez-samaniego-microsoft/</guid><description>&lt;blockquote>
&lt;p>Multiarchitecture SoCs are more widely used, usually containing a large architecture where it can run a full operating system such as Linux, and one or more small architectures designed to run an RTOS or a baremetal application,requiring less hardware resources,leveraging suitable tasks from one to another creating a more efficient product.&lt;/p>
&lt;p>While the Yocto Project is well known for its capabilities on creating customized Embedded Linux Distributions,bitbake is also capable of building a toolchain to create Baremetal applications or an RTOS.&lt;/p>
&lt;p>In this presentation Alejandro will show how to create baremetal applications using the same flow currently used in OpenEmbedded to develop Linux applications, using recipes, classes and user configuration files, he will show how users from the community can benefit from a single flow, showcasing how to run these applications on QEMU and create tests for them to be automatically tested using the OpenEmbedded infrastructure along with their corresponding Linux distributions.&lt;/p>
&lt;p>Anyone from the community interested in learning about baremetal programming or about the Yocto Project might find the contents of this presentation interesting.&lt;/p>
&lt;/blockquote>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;p>Multiarchitecture Embedded Devices&lt;/p>
&lt;ul>
&lt;li>Azure Sphere
&lt;ul>
&lt;li>Secured MCU&lt;/li>
&lt;li>Secured OS&lt;/li>
&lt;li>Cloud Security&lt;/li>
&lt;li>MT3620 Dev Board Diagram&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="oe-runtime-testing-infra">OE Runtime Testing Infra&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>Testing a linux OS (poky)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>TEST_TARGET&lt;/p>
&lt;ul>
&lt;li>QEMU&lt;/li>
&lt;li>Hardware (simpleremote)
&lt;ul>
&lt;li>Send commands via SSH (TEST_SERVER_IP)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>TEST_SUITES&lt;/p>
&lt;ul>
&lt;li>auto&lt;/li>
&lt;li>cases: ping ssh scp parselogs&lt;/li>
&lt;li>meta/lib/oeqa/runtime/cases&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="testimage_boot_patterns-in-oe">TESTIMAGE_BOOT_PATTERNS in OE&lt;/h3>
&lt;ul>
&lt;li>testimage.bbclass
&lt;ul>
&lt;li>TESTIMAGE_BOOT_PATTERNS&lt;/li>
&lt;li>TESTIMAGE_BOOT_PATTERNS[send_login_user]&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>qemurunner.py
&lt;ul>
&lt;li>default_boot_pattern&lt;/li>
&lt;li>accepted_patterns&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="testimageflow">Testimageflow&lt;/h3>
&lt;ol>
&lt;li>H: Start booting&lt;/li>
&lt;li>T: Login&lt;/li>
&lt;li>H: ROOT\n&lt;/li>
&lt;li>T: Prints out root username&lt;/li>
&lt;li>H: SEND_COMMAND&lt;/li>
&lt;li>T: Check for another prompt&lt;/li>
&lt;li>H: READ&lt;/li>
&lt;/ol>
&lt;h3 id="baremetal-toolchain-on-the-yocto-project">Baremetal Toolchain on the Yocto Project&lt;/h3>
&lt;pre>&lt;code class="language-conf">MACHINE = &amp;quot;qemuarm64&amp;quot;
TCLIBC = &amp;quot;baremetal&amp;quot;
&lt;/code>&lt;/pre>
&lt;p>Then build and run in qemu&lt;/p>
&lt;pre>&lt;code class="language-sh">bitbake baremetal-helloworld
runqemu
&lt;/code>&lt;/pre>
&lt;p>Other tagets&lt;/p>
&lt;pre>&lt;code class="language-sh">bitbake meta-toolchain
bitbake baremetal-helloworld -c populate_sdk
&lt;/code>&lt;/pre>
&lt;ul>
&lt;li>&lt;code>TCLIBC=&amp;quot;newlib&amp;quot;&lt;/code> - little more than baremetal&lt;/li>
&lt;/ul>
&lt;h3 id="simple-baremetal-helloworld-on-aarch64">Simple Baremetal HelloWorld on Aarch64&lt;/h3>
&lt;ul>
&lt;li>QEMU source code (virt)&lt;/li>
&lt;li>UART, RAM, Kernel Address&lt;/li>
&lt;li>ARM Developers Manual - UART PL011&lt;/li>
&lt;/ul>
&lt;p>What files do you need?&lt;/p>
&lt;ul>
&lt;li>Start Code&lt;/li>
&lt;li>Linker Script&lt;/li>
&lt;li>Your source code&lt;/li>
&lt;/ul>
&lt;p>Example for aarch64&lt;/p>
&lt;ul>
&lt;li>hello_baremetal_aarch64.c&lt;/li>
&lt;li>startup_aarch64.s&lt;/li>
&lt;li>linkerscript_aarch64.ld&lt;/li>
&lt;/ul>
&lt;h3 id="creating-test-for-freertos">Creating test for FreeRTOS&lt;/h3>
&lt;ul>
&lt;li>Overriding Patterns in &lt;code>local.conf&lt;/code>
&lt;ul>
&lt;li>TEST_SUITES = &amp;ldquo;freertos_echo&amp;rdquo;&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>defined new test cases
&lt;ul>
&lt;li>&lt;a href="https://github.com/aehs29/meta-freertos">meta-freertos&lt;/a>&lt;/li>
&lt;li>[freertos_echo.py]](&lt;a href="https://github.com/aehs29/meta-freertos/blob/de4c8530b9bb31b9bbf08124a21a3ffc47d0121f/lib/oeqa/runtime/cases/freertos_echo.py#L1">https://github.com/aehs29/meta-freertos/blob/de4c8530b9bb31b9bbf08124a21a3ffc47d0121f/lib/oeqa/runtime/cases/freertos_echo.py#L1&lt;/a>)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>These tests run in do_testimage&lt;/li>
&lt;/ul>
&lt;h3 id="how-to-create-freertos-test">How to create FreeRTOS test&lt;/h3>
&lt;p>This is a simple example of using OEQA test framework with a baremetal application.&lt;/p>
&lt;ul>
&lt;li>He then created a very basic C application that emulated the basic prompts for Linux.&lt;/li>
&lt;li>Hacky, but a simple way to get an initial test in with a framework focused on Linux testing.&lt;/li>
&lt;li>You could possibly get it working for libgloss&lt;/li>
&lt;/ul>
&lt;h2 id="questions">Questions&lt;/h2>
&lt;ul>
&lt;li>Q: Can a testimage.bb depend on something&lt;/li>
&lt;li>A: tests can depend on other recipes. Works with the build system itself.&lt;/li>
&lt;/ul></description></item><item><title>Finding Sources of Latency on your Linux System</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/finding-sources-of-latency-on-your-linux-system-steven-rostedt-vmware/</link><pubDate>Tue, 30 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/finding-sources-of-latency-on-your-linux-system-steven-rostedt-vmware/</guid><description>&lt;blockquote>
&lt;p>In today&amp;rsquo;s computer systems the level of complexity has risen such that when a task or response to an event takes longer than expected, it is not easy knowing what the culprit is. The Linux operating system contains several utilities that allows a user to see where things may be held up. This talk will cover many of these utilities and briefly explain how to use them. From the hardware latency detector to the latency tracers. It will also discuss the new synthetic event interface that allows users to create a histogram on the time it takes any two events to occur.&lt;/p>
&lt;p>I have previously discussed the latency tracers but they are soon to be obsolete, and the new synthetic event interface will be replacing them. There is still a lot more development going on with the synthetic events and this talk will briefly go over some of the new features that are yet to arrive.&lt;/p>
&lt;/blockquote>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>Latency from Hardware&lt;/p>
&lt;ul>
&lt;li>System Mangement Interrupt (SMI)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Cache miss&lt;/p>
&lt;/li>
&lt;li>
&lt;p>branch prediction&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Hyper-threading&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Hardware Latency detector (HWLAT_TRACER)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>fedora 31 not debian&lt;/p>
&lt;/li>
&lt;li>
&lt;p>tracefs&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>Measuring latency from interrupts&lt;/p></description></item><item><title>Linux on Open Source Hardware with RISC-V</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/linux-on-open-source-hardware-with-risc-v-drew-fustini-beagleboardorg-foundation/</link><pubDate>Tue, 30 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/linux-on-open-source-hardware-with-risc-v-drew-fustini-beagleboardorg-foundation/</guid><description>&lt;blockquote>
&lt;p>Want to run Linux on open hardware? This talk will explore Open Source Hardware projects capable of that task, and explore how RISC-V and free software FPGA projects can be leveraged to create libre systems.&lt;/p>
&lt;p>This talk will explore Open Source Hardware projects relevant to Linux, including boards like BeagleBone, Olimex OLinuXino, the Reform laptop and more.&lt;/p>
&lt;p>I will also talk about the importance of the open RISC-V instruction set and free software FPGA toolchains. I will explain how myself and others at Hackaday Supercon teamed up to get Linux running on RISC-V core in the ECP5 FPGA badge. I will explain what LiteX is and how it enabled us to quickly build a SoC capable of running Linux.&lt;/p>
&lt;p>Finally, I will explore the landscape of open source chip design projects and the Linux-capable RISC-V silicon chips on horizon for 2020.&lt;/p>
&lt;/blockquote>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://github.com/pdp7/talks">https://github.com/pdp7/talks&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://github.com/pdp7/talks/blob/master/rv-elc.pdf">https://github.com/pdp7/talks/blob/master/rv-elc.pdf&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://media.ccc.de/v/36c3-10549-linux_on_open_source_hardware_with_open_source_chip_design">https://media.ccc.de/v/36c3-10549-linux_on_open_source_hardware_with_open_source_chip_design&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>What&amp;rsquo;s required to be &amp;ldquo;open hardware&amp;rdquo;&lt;/p>
&lt;ul>
&lt;li>schematic&lt;/li>
&lt;li>board layouts&lt;/li>
&lt;/ul>
&lt;h3 id="risc-v-the-instruction-set-for-everything">RISC V: The instruction set for everything?&lt;/h3>
&lt;ul>
&lt;li>ISA=instruction set architecture&lt;/li>
&lt;li>ARM requires commercial licening&lt;/li>
&lt;/ul>
&lt;h3 id="whats-different-about-risc-v">What&amp;rsquo;s different about RISC-V&lt;/h3>
&lt;ul>
&lt;li>simple&lt;/li>
&lt;li>clean slate design&lt;/li>
&lt;li>modular
&lt;ul>
&lt;li>extensively/specialization&lt;/li>
&lt;li>small standards base ISA, with multiple standard extensions&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>stable&lt;/li>
&lt;li>community design&lt;/li>
&lt;/ul>
&lt;h3 id="ecosystem">Ecosystem&lt;/h3>
&lt;ul>
&lt;li>opensource software&lt;/li>
&lt;li>commercial software&lt;/li>
&lt;li>open-source cores&lt;/li>
&lt;/ul>
&lt;p>Hardware&lt;/p>
&lt;ul>
&lt;li>commercial cores&lt;/li>
&lt;li>commercial core provisders&lt;/li>
&lt;li>inhouse cores&lt;/li>
&lt;/ul>
&lt;h3 id="industry">Industry&lt;/h3>
&lt;ul>
&lt;li>Most people are just licensing cores from ARM&lt;/li>
&lt;li>open source implementation
&lt;ul>
&lt;li>BOOM, Rocket, PULP, SweRV&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="chips">Chips&lt;/h3>
&lt;p>lowRISC&lt;/p>
&lt;ul>
&lt;li>not-for-profit organisation&lt;/li>
&lt;li>OpenTitan project with Google&lt;/li>
&lt;/ul>
&lt;p>SiFive&lt;/p>
&lt;ul>
&lt;li>SiFive FE310 microcontroller&lt;/li>
&lt;li>HiFive1: Arguino Compatible RISC-V dev kit&lt;/li>
&lt;/ul>
&lt;p>Linux on RISV-V&lt;/p>
&lt;ul>
&lt;li>HiFive Unleashed
&lt;ul>
&lt;li>best core if you want to run RISC-V Linux&lt;/li>
&lt;li>mostly just a proof of concept&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Kendryte K210&lt;/p>
&lt;ul>
&lt;li>8 mb of SRAM&lt;/li>
&lt;li>$13&lt;/li>
&lt;li>&lt;a href="https://hackaday.com/2019/02/14/new-part-day-a-risc-v-cpu-for-eight-dollars/">https://hackaday.com/2019/02/14/new-part-day-a-risc-v-cpu-for-eight-dollars/&lt;/a>&lt;/li>
&lt;li>Has MMU but too old to be supported by linux&lt;/li>
&lt;li>will be suported in Linux 5.8&lt;/li>
&lt;/ul>
&lt;p>PolarFire&lt;/p>
&lt;ul>
&lt;li>CORE-V Chassis - tapeout 2H 2020&lt;/li>
&lt;li>Hard RISC-V with FPGA fabric&lt;/li>
&lt;/ul>
&lt;p>Open Source FPGA Tools&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://www.youtube.com/watch?v=vCG5_nxm2G4">MeganWachs - Keynote RISC-V and FPGAs: Open Source Hardware Hacking&lt;/a>&lt;/li>
&lt;li>Lattice&lt;/li>
&lt;/ul>
&lt;h3 id="linux-on-badge">Linux on Badge&lt;/h3>
&lt;ul>
&lt;li>has ECP5 FPGA
&lt;ul>
&lt;li>Supported by open source FPGA tool&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Linux running on Supercon badge&lt;/li>
&lt;li>2019 Supercon badget&lt;/li>
&lt;li>32 MB of SDRAM to the Hackaday badge&lt;/li>
&lt;/ul>
&lt;h3 id="migen">Migen&lt;/h3>
&lt;ul>
&lt;li>HDL written in python&lt;/li>
&lt;li>&lt;a href="https://github.com/litex-hub/fpga_101">https://github.com/litex-hub/fpga_101&lt;/a>&lt;/li>
&lt;/ul>
&lt;h3 id="litex">LiteX&lt;/h3>
&lt;ul>
&lt;li>Litex used to build cores, create SoCs and full FPGA designs&lt;/li>
&lt;li>LiteX Hub - Collaborative FPGA projects around LiteX&lt;/li>
&lt;li>Based on Migen&lt;/li>
&lt;/ul>
&lt;h3 id="linux-on-litex">Linux on LiteX&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://github.com/litex-hub/linux-on-litex-vexriscv">https://github.com/litex-hub/linux-on-litex-vexriscv&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>What baords could you use?&lt;/p>
&lt;ul>
&lt;li>ULX3S
&lt;ul>
&lt;li>ECP FPGA dev board&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="quickstart---fpga">Quickstart - FPGA&lt;/h3>
&lt;ul>
&lt;li>Fomu
&lt;ul>
&lt;li>RGB LED&lt;/li>
&lt;li>MicroPython&lt;/li>
&lt;li>Verilog&lt;/li>
&lt;li>LiteX&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="quickstart--no-hardware">Quickstart -No Hardware&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="renode.io">Renode&lt;/a>&lt;/li>
&lt;/ul></description></item><item><title>Linux Stateless Video Decoder Support</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/linux-stateless-video-decoder-support-nicolas-dufresne-collabora/</link><pubDate>Tue, 30 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/linux-stateless-video-decoder-support-nicolas-dufresne-collabora/</guid><description>&lt;blockquote>
&lt;p>While it has been under development for years, the support for video CODEC accelerators has gain a lot of traction in past year. A formal specification has now been merge into Linux Media subsystem and staging control APIs and drivers now exist. This allow for blob free HW accelerated decoding on popular SoC like Allwinner, i.MX8 and Rockchip.&lt;/p>
&lt;p>In this talk, Nicolas will give an overview of the decoding process using such hardware accelerators along with an overview of the user space API and how it&amp;rsquo;s used within multimedia frameworks. Nicolas will also explain the relation between this and accelerators attached to modern GPUs. This presentation would not be complete without mentioning the development of FFMPEG and GStreamer native support and their major role in the development of the the new Open Source drivers.&lt;/p>
&lt;p>This talk is addressed to multimedia enthusiasts and developers curious about video decoding and the upstream effort effort to make that available to users.&lt;/p>
&lt;/blockquote>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;h2 id="state-full-decoder">State-full Decoder&lt;/h2>
&lt;p>Begining of Linux Codecs&lt;/p>
&lt;p>What is state-full?&lt;/p>
&lt;ul>
&lt;li>stateful is a blackbox&lt;/li>
&lt;li>blackbox gets bitstream&lt;/li>
&lt;/ul>
&lt;h3 id="v4l2-m2m">V4L2 M2M&lt;/h3>
&lt;pre>&lt;code class="language-none">output -&amp;gt; VPU -&amp;gt; capture
&lt;/code>&lt;/pre>
&lt;ul>
&lt;li>V4L2 output queue is used for the bitstream&lt;/li>
&lt;li>capture queue is used for the decoded pictures&lt;/li>
&lt;li>capability to seek and end stream&lt;/li>
&lt;/ul>
&lt;h3 id="procons">Pro/cons&lt;/h3>
&lt;ul>
&lt;li>pro: minimal per codec code needed&lt;/li>
&lt;li>con: require a firmware&lt;/li>
&lt;li>con: harder to multiplex&lt;/li>
&lt;/ul>
&lt;p>CODA Driver&lt;/p>
&lt;ul>
&lt;li>Enabling iMX51 and iMX6&lt;/li>
&lt;li>reversed enginerring from imx binary blobs&lt;/li>
&lt;/ul>
&lt;h3 id="begining-of-state-less">Begining of State-Less&lt;/h3>
&lt;p>2015&lt;/p>
&lt;ul>
&lt;li>Rockchip&lt;/li>
&lt;li>new type of CODEC hardware&lt;/li>
&lt;li>Rockchip VDPU&lt;/li>
&lt;/ul>
&lt;p>What is State-Less&lt;/p>
&lt;ul>
&lt;li>
&lt;p>no processor&lt;/p>
&lt;/li>
&lt;li>
&lt;p>expose &amp;ldquo;accelarators&amp;rdquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;ol>
&lt;li>inputs:&lt;/li>
&lt;/ol>
&lt;ul>
&lt;li>reference&lt;/li>
&lt;li>bitstream&lt;/li>
&lt;li>parameters&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;ol start="2">
&lt;li>accerator&lt;/li>
&lt;/ol>
&lt;/li>
&lt;li>
&lt;ol start="3">
&lt;li>outputs&lt;/li>
&lt;/ol>
&lt;ul>
&lt;li>pictures&lt;/li>
&lt;li>may not be in order&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>What are GPU?&lt;/p>
&lt;ul>
&lt;li>Crafting command stream is HW specific&lt;/li>
&lt;li>only implement in userspace drivers (mesa)&lt;/li>
&lt;li>commands are schedule by the GPU driver&lt;/li>
&lt;li>multiple GPU hardware in the same application remains tedius&lt;/li>
&lt;/ul>
&lt;p>This is not what google did!&lt;/p>
&lt;h3 id="v4l2-m2m--request-2015">V4L2 M2M + Request (2015)&lt;/h3>
&lt;p>Instead, extend stateless: V4L2 M2M + Request&lt;/p>
&lt;p>Added components&lt;/p>
&lt;ul>
&lt;li>
&lt;p>CODEC Controls&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Request&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Topology&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Request API&lt;/p>
&lt;ul>
&lt;li>way to queue parameters, controls, and bitstream buffers&lt;/li>
&lt;li>added to media controller API&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="h264">H.264&lt;/h3>
&lt;ul>
&lt;li>NALU Sequence
&lt;ul>
&lt;li>SPS, PPS, IDR Slice, P Slice, B Slice&lt;/li>
&lt;li>P previous decoded pictures&lt;/li>
&lt;li>both past and future references&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Annex B NALU
&lt;ul>
&lt;li>Start-Code&lt;/li>
&lt;li>HDR, Paylod&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>AVCc NALU
&lt;ul>
&lt;li>Size&lt;/li>
&lt;li>HDR, Payload&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="decoding-process">Decoding Process&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>MIA&amp;hellip; Missed one slide&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Fill SPS/ PPS, Decode Parameters, Slice parameters&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Modify reference list&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Decode the slide/frame&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Do DPB management as per spec&lt;/p>
&lt;ul>
&lt;li>Display Picture management&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Output frames that could be re-ordered&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="v4l2">V4L2&lt;/h3>
&lt;ul>
&lt;li>Allocate a Request (an FD)&lt;/li>
&lt;li>set per frame&lt;/li>
&lt;li>queue a v4l2_buffer&lt;/li>
&lt;li>queue the request&lt;/li>
&lt;li>poll the request FD for completion&lt;/li>
&lt;/ul>
&lt;h3 id="continue-in-time">Continue in time&lt;/h3>
&lt;p>MediaTek VPU (State-full)&lt;/p>
&lt;ul>
&lt;li>tiled output only (requires HW converter)&lt;/li>
&lt;/ul>
&lt;p>Qualcomm Venus&lt;/p>
&lt;ul>
&lt;li>Stateful&lt;/li>
&lt;li>lots of CODECS&lt;/li>
&lt;/ul>
&lt;p>Upstreaming Stalled&lt;/p>
&lt;ul>
&lt;li>Could not settle on the Request/Job API&lt;/li>
&lt;li>Low knowledge of CODEC decoing process by the linux-media maintainers&lt;/li>
&lt;li>only one hardware to test the API design (Only rockchip)&lt;/li>
&lt;li>No formal specific (not that state-full CODEC had one either)&lt;/li>
&lt;/ul>
&lt;h3 id="allwinner-vpu-support-kickstarter-by-bootlin-2018">Allwinner VPU support Kickstarter by Bootlin (2018)&lt;/h3>
&lt;ul>
&lt;li>Request API is finalized&lt;/li>
&lt;li>MPEG2 Support in Staging&lt;/li>
&lt;li>H.264 support was progressing (but only sliced based)&lt;/li>
&lt;li>reverse engineered from binary userspace&lt;/li>
&lt;li>VAAPI userspace drivers&lt;/li>
&lt;/ul>
&lt;p>2019&lt;/p>
&lt;ul>
&lt;li>formal specification was merged&lt;/li>
&lt;li>RK3288 driver was mainlined&lt;/li>
&lt;li>H264, VP8, HEVC uAPI added as staging control API&lt;/li>
&lt;li>RK3288 driver was renamed?&lt;/li>
&lt;/ul>
&lt;p>The Hantro Driver&lt;/p>
&lt;ul>
&lt;li>I.MX8M Quad, using Hantro G1/G2&lt;/li>
&lt;li>Registry compatible with the RK3288&lt;/li>
&lt;li>Give email and you get specification&lt;/li>
&lt;/ul>
&lt;p>Hantro Company&lt;/p>
&lt;ul>
&lt;li>Hantro Visibility Better&lt;/li>
&lt;li>on2 technology&lt;/li>
&lt;li>Google
&lt;ul>
&lt;li>VP8 and VP9 royalty free&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>VeriSilicon&lt;/li>
&lt;/ul>
&lt;p>Other story of API rename&lt;/p>
&lt;ul>
&lt;li>stmmac is an ethernet driver, that was thought to be STM design&lt;/li>
&lt;li>later found to be DesignWare design, shared across numerous SoC&lt;/li>
&lt;li>Since API was released it was unable to be renamed&lt;/li>
&lt;/ul>
&lt;p>Testing and Fixing&lt;/p>
&lt;ul>
&lt;li>LibreELEC - just enough OS for KODI
&lt;ul>
&lt;li>FFMPEG support&lt;/li>
&lt;li>bug fixing&lt;/li>
&lt;li>interlaced Content Support&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>2020&lt;/p>
&lt;ul>
&lt;li>RK3399 JPEG, MPEG2, H.264, and VP9 support&lt;/li>
&lt;li>Start having base class for Stateless
&lt;ul>
&lt;li>DXVA2 and NVDEC support&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>VA V4L2 Request driver was abandoned&lt;/li>
&lt;/ul>
&lt;h2 id="demo">demo&lt;/h2>
&lt;ul>
&lt;li>linux kernel 5.7rc2&lt;/li>
&lt;li>gstreamer has tool called &amp;lsquo;gst-build&amp;rsquo; built on mesin
&lt;ul>
&lt;li>allow you to run plugin&lt;/li>
&lt;li>gst-play-1.0&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>video layers are an overlay&lt;/li>
&lt;li>prerolling.&lt;/li>
&lt;li>three different streams&lt;/li>
&lt;li>one two iMx8&lt;/li>
&lt;/ul>
&lt;h2 id="questions">Questions&lt;/h2>
&lt;ul>
&lt;li>performance stateless vs state-full
&lt;ul>
&lt;li>have to wake up processor more&lt;/li>
&lt;li>more control over queuing&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>converting them to state-less is complex&lt;/li>
&lt;/ul></description></item><item><title>Robot Operating System (ROS) 2 - How Open Source Software and Linux is Powering the Next Generation of Robotics</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/robot-operating-system-ros-2-how-open-source-software-and-linux-is-powering-the-next-generation-of-robotics-katherine-scott-open-robotics/</link><pubDate>Tue, 30 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/robot-operating-system-ros-2-how-open-source-software-and-linux-is-powering-the-next-generation-of-robotics-katherine-scott-open-robotics/</guid><description>&lt;h2 id="robot-operating-system-ros-2---how-open-source-software-and-linux-is-powering-the-next-generation-of-robotics">Robot Operating System (ROS) 2 - How Open Source Software and Linux is Powering the Next Generation of Robotics&lt;/h2>
&lt;ul>
&lt;li>Katherine Scott, Open Robotics&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>Robot Operating System (ROS) is a set of mature free and open source software packages used by the robotics community to program robots. Recently ROS had its first major version upgrade in a decade to ROS 2. This new version introduces a number of changes and new features, many of which simplify the development process and allow users to build virtual robots without ever touching a piece of hardware. ROS 2 is the version of ROS that supports Python 3 out of the box and has new additions that allow for high-fidelity simulations. Simulation makes learning advanced robotics topics more accessible, as you no longer need to outfit a robotics lab and you can simulate cutting edge hardware for free. In this talk we&amp;rsquo;ll cover the state of the open source robotics ecosystem and cover the changes made in ROS 2 to improve its simplicity, stability, safety, and security. These features, along with enhanced embedded hardware support, are helping ROS become the de facto standard for the developers of autonomous vehicles, drones, industrial, and agricultural robots. This talk will give the Linux community and update on ROS ecosystem and a starting point for learning how to use it.&lt;/p>
&lt;/blockquote>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;ul>
&lt;li>ROS is a lyer on top of Linux for robots&lt;/li>
&lt;li>metrics.ros.org&lt;/li>
&lt;/ul>
&lt;h3 id="windows">Windows&lt;/h3>
&lt;ul>
&lt;li>works on Windows&lt;/li>
&lt;li>vscode&lt;/li>
&lt;/ul>
&lt;h3 id="intro">Intro&lt;/h3>
&lt;h4 id="software-before-times">Software before times&lt;/h4>
&lt;ul>
&lt;li>research grade&lt;/li>
&lt;li>proprietary&lt;/li>
&lt;li>works on Windows 95&lt;/li>
&lt;li>system integrators&lt;/li>
&lt;li>vendors&lt;/li>
&lt;li>bespoke&lt;/li>
&lt;li>hardware controllers&lt;/li>
&lt;li>Feed forwards&lt;/li>
&lt;/ul>
&lt;p>Catalyst&lt;/p>
&lt;ul>
&lt;li>2004 competition for autonomous vehical&lt;/li>
&lt;/ul>
&lt;p>Input to innovation&lt;/p>
&lt;ul>
&lt;li>flexible robots&lt;/li>
&lt;li>IPO&lt;/li>
&lt;li>FOSS&lt;/li>
&lt;li>Willow Garage - 2007 Poof FOOS for robots&lt;/li>
&lt;/ul>
&lt;p>Three projects results&lt;/p>
&lt;ul>
&lt;li>opencv&lt;/li>
&lt;li>pcl&lt;/li>
&lt;li>ROS&lt;/li>
&lt;/ul>
&lt;p>Two Robots born&lt;/p>
&lt;ul>
&lt;li>Willow: Shared World Class Research&lt;/li>
&lt;li>2013 Willow Folders but OS lives on&lt;/li>
&lt;/ul>
&lt;p>Ethos of Global Research Community&lt;/p>
&lt;ul>
&lt;li>Small, Simple, Composable Utilities&lt;/li>
&lt;li>Don&amp;rsquo;t Reivent the Wheel&lt;/li>
&lt;li>Non-Exclusive (polyglot, packagin infrastructure)&lt;/li>
&lt;li>Inclusive (in addition to, not in place of)&lt;/li>
&lt;li>Freedom&lt;/li>
&lt;/ul>
&lt;p>Out of Willow was born:&lt;/p>
&lt;ul>
&lt;li>OpenRobotics&lt;/li>
&lt;li>ROS Industrial&lt;/li>
&lt;/ul>
&lt;h2 id="ros-philosophy">ROS Philosophy&lt;/h2>
&lt;ul>
&lt;li>Federation over Centralation&lt;/li>
&lt;/ul>
&lt;p>Plus list from above.&lt;/p>
&lt;ul>
&lt;li>Small, Simple, Composable Utilities&lt;/li>
&lt;li>Don&amp;rsquo;t Reivent the Wheel&lt;/li>
&lt;li>Non-Exclusive (polyglot, packagin infrastructure)&lt;/li>
&lt;li>Inclusive (in addition to, not in place of)&lt;/li>
&lt;li>Freedom&lt;/li>
&lt;/ul>
&lt;p>Order of topics&lt;/p>
&lt;ol>
&lt;li>Don&amp;rsquo;t Reinvent&lt;/li>
&lt;/ol>
&lt;h3 id="dont-reinvent">Dont Reinvent&lt;/h3>
&lt;p>Multiprocess Control&lt;/p>
&lt;ul>
&lt;li>Components
&lt;ul>
&lt;li>Sensors&lt;/li>
&lt;li>Control&lt;/li>
&lt;li>actuators&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>nodes are process encapsulation between languages&lt;/li>
&lt;li>Imagine
&lt;ul>
&lt;li>C++ Python programs all start concurently&lt;/li>
&lt;li>with hardware&lt;/li>
&lt;li>lots of config&lt;/li>
&lt;li>control flow based on config&lt;/li>
&lt;li>What would your shell script file look like?&lt;/li>
&lt;li>ROS nodes and launch files take care of this&lt;/li>
&lt;li>Tooling to start them.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Topics&lt;/p>
&lt;ul>
&lt;li>pub/sub bus&lt;/li>
&lt;li>ROS nodes communicate over topics&lt;/li>
&lt;li>Cross language serialation primitives that predate protobuff, rabbitMQ, etc.&lt;/li>
&lt;li>Standard messages allow
&lt;ul>
&lt;li>plug and play&lt;/li>
&lt;li>loose coupling&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Online introspection&lt;/li>
&lt;li>quality of service capabilities&lt;/li>
&lt;li>build as an abstraction
&lt;ul>
&lt;li>DDS implementation, ensures security, robustness&lt;/li>
&lt;li>implementation of pub/sub is pushed off to other implementation&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>RVIZ&lt;/p>
&lt;ul>
&lt;li>Robots make lots of data
&lt;ul>
&lt;li>much of it is live&lt;/li>
&lt;li>with 3D context&lt;/li>
&lt;li>annotation&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>RVIZ is your GUI&lt;/li>
&lt;/ul>
&lt;p>&lt;a href="http://wiki.ros.org/Bags">Bags&lt;/a>&lt;/p>
&lt;ul>
&lt;li>standard serialzation library for transport also works for disk storage
&lt;ul>
&lt;li>MIA&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>bags are amazing
&lt;ul>
&lt;li>ML/CV/DL&lt;/li>
&lt;li>unit tests&lt;/li>
&lt;li>collaborators&lt;/li>
&lt;li>Black Box&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>collect on robot and transfer elsewhere for analysis&lt;/li>
&lt;li>De-facto standard for sharing data
&lt;ul>
&lt;li>Ford Autonomous Vehical Data&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="http://wiki.ros.org/ROS/Tutorials/Recording%20and%20playing%20back%20data">http://wiki.ros.org/ROS/Tutorials/Recording%20and%20playing%20back%20data&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>Services/Actions&lt;/p>
&lt;ul>
&lt;li>Services: synchronous behavior API&lt;/li>
&lt;li>Action: async behavior
&lt;ul>
&lt;li>Handles request negotation&lt;/li>
&lt;li>with preemption&lt;/li>
&lt;li>with status callbacks&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Callback driven API&lt;/li>
&lt;li>build robot behvaiors, fast&lt;/li>
&lt;/ul>
&lt;p>Geometry/Kinematics&lt;/p>
&lt;ul>
&lt;li>Hard robot problems
&lt;ul>
&lt;li>where is everything&lt;/li>
&lt;li>where am I&lt;/li>
&lt;li>how to get A to B&lt;/li>
&lt;li>I can see X, how to graph it&lt;/li>
&lt;li>Many more&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>URDF: Universal Robot Description Format
&lt;ul>
&lt;li>Defines 3D Geometry of a Robot&lt;/li>
&lt;li>Works with your CAD format&lt;/li>
&lt;li>gives a robot an idea of its shape and size&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>TF2 Transform 2
&lt;ul>
&lt;li>transform coordinates from different frames&lt;/li>
&lt;li>API driven, minimal math&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Forward/Inverse Kinematics&lt;/p>
&lt;ul>
&lt;li>MoveIt&lt;/li>
&lt;/ul>
&lt;p>SLAM/Navigation&lt;/p>
&lt;ul>
&lt;li>Path planning&lt;/li>
&lt;/ul>
&lt;p>Simulation&lt;/p>
&lt;ul>
&lt;li>Robots are expensive, dangerous, slow&lt;/li>
&lt;li>sharing a robot is hard&lt;/li>
&lt;li>testing is hard&lt;/li>
&lt;li>what if you don&amp;rsquo;t need robot?&lt;/li>
&lt;li>What if you could have robot VM?&lt;/li>
&lt;/ul>
&lt;p>Simulation - Gazebo&lt;/p>
&lt;ul>
&lt;li>build a virtual robot&lt;/li>
&lt;li>simulate Physics, robot, and sensors&lt;/li>
&lt;li>Plays well with ROS2&lt;/li>
&lt;li>Allows yo build test debug from your desk&lt;/li>
&lt;/ul>
&lt;h2 id="ros-getting-to-plug-and-play-hardware">ROS: Getting to Plug and Play Hardware&lt;/h2>
&lt;ul>
&lt;li>Hardware Ready&lt;/li>
&lt;li>Bridge between ROS 2 DDS layer and ROS&lt;/li>
&lt;/ul>
&lt;h2 id="community-not-just-code">Community not just Code&lt;/h2>
&lt;ul>
&lt;li>ros.org&lt;/li>
&lt;li>discourse.ros.org&lt;/li>
&lt;li>answers.ros.org&lt;/li>
&lt;/ul>
&lt;h2 id="ros-2-foxy">ROS 2 Foxy&lt;/h2>
&lt;ul>
&lt;li>6th Ros 2 Release&lt;/li>
&lt;li>First major LTS&lt;/li>
&lt;li>Start now 3 year of patches and supports&lt;/li>
&lt;/ul>
&lt;p>I want to learn!&lt;/p>
&lt;ul>
&lt;li>DARPA SubT Simulator has great tutorial&lt;/li>
&lt;li>Autoware has Autonomy class
&lt;ul>
&lt;li>Prepackaged docker container to run simulation&lt;/li>
&lt;li>&lt;a href="https://autoware.org/awf-course">awf-course&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;a href="index.ros.org/doc/ros2">ROS 2 Docs&lt;/a>&lt;/li>
&lt;li>TurtleBot3&lt;/li>
&lt;/ul>
&lt;h2 id="contact">Contact&lt;/h2>
&lt;ul>
&lt;li>rosorg&lt;/li>
&lt;li>kscottz&lt;/li>
&lt;li>org.org&lt;/li>
&lt;li>openrobics&lt;/li>
&lt;/ul>
&lt;h2 id="questions">Questions&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>Q: Gazebo included?&lt;/p>
&lt;/li>
&lt;li>
&lt;p>A: No&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Q: I work on embedded projects that run on custom hardware for fancy PTZ cameras. I would love to convience our Python app developers how/if ROS could be leveraged. Where do you think I should start? Are their any consultants that could help analysis the specific use case?&lt;/p>
&lt;/li>
&lt;li>
&lt;p>A: This is something we are missing. She views robots broadly. MicroROS. Developing concepts for hardware. hardware interface framework.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Start with simulation&lt;/p>
&lt;/li>
&lt;/ul></description></item><item><title>Using MIPI DSI as Main Display Interface</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/using-mipi-dsi-as-main-display-interface-marcel-ziswiler-toradex-ag/</link><pubDate>Tue, 30 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/using-mipi-dsi-as-main-display-interface-marcel-ziswiler-toradex-ag/</guid><description>&lt;h2 id="using-mipi-dsi-as-main-display-interface">Using MIPI DSI as Main Display Interface&lt;/h2>
&lt;ul>
&lt;li>Marcel Ziswiler, Toradex AG&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>The MIPI Display Serial Interface (DSI) is the de-facto standard display interface featured by modern higher-end SoCs. Lacking the long-term availability of discrete MIPI DSI display panels most embedded systems rely on bridge chips converting to more common display interfaces like parallel RGB, LVDS, (e)DP or HDMI. Our generic system concept relies on DSI adapter boards integrating various such bridge chips. After introducing the Linux DSI subsystem this talk concentrates on the auto-detection of such DSI adapters based on parametrisation stored in EEPROMs. The U-Boot boot loader reads the EEPROM contents and chooses the applicable device tree overlay to be applied. The concept of DDC/EDID with hot-plug detect vs. a custom model-specific parametrisation is discussed. The talk continues covering the integration aspect of such DSI bridge chips within the Linux DRM stack. Various limitations of the DSI subsystem and possible solutions are discussed. The DSI bridge chip ecosystem is covered and we look into possible reasons only very few bridge chips are actually supported in mainline so far. The talk concludes with a live demo of our DSI auto-detection implementation.&lt;/p>
&lt;/blockquote>
&lt;ul>
&lt;li>Tordadex - swiss. Embedded. Computing&lt;/li>
&lt;/ul>
&lt;h2 id="intro">Intro&lt;/h2>
&lt;ul>
&lt;li>MIPI&lt;/li>
&lt;li>U-Boot FIT Image&lt;/li>
&lt;li>LIve Demo&lt;/li>
&lt;/ul>
&lt;h2 id="mipi-display-serial-interface-mipi-dsi">MIPI Display Serial Interface (MIPI DSI)&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>Spec by MIPI Alliance&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Low power (LP) mode or high speed (HS) mode&lt;/p>
&lt;ul>
&lt;li>HS is ussually one direction&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>MIPI DSI Spec initial version May 2006&lt;/p>
&lt;/li>
&lt;li>
&lt;p>MIPI DSI-2 Spec supports Ultra high definition (4k and 8k)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Physical Layer&lt;/p>
&lt;ul>
&lt;li>1.0 Gbps/lane (1.01), 1.5, 2.5, 4.5 Gbps/lane (D-PHY 2.0)&lt;/li>
&lt;li>MIPI DCS - MIPI Display Command Set&lt;/li>
&lt;li>Incorportates Display Stream Compression (DSC)
&lt;ul>
&lt;li>Standard from VESA&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>de-facto standard display interface feature by modern high-end SoC&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="verdin-products">Verdin products&lt;/h2>
&lt;p>Verdin MIPI DSI Display Adapter System Design&lt;/p>
&lt;ul>
&lt;li>generic system concept&lt;/li>
&lt;li>display adapter boards integrating various bridge chips&lt;/li>
&lt;li>DSI Mezzanine Connector
&lt;ul>
&lt;li>MIPI DSI: 1 clk + 4 data&lt;/li>
&lt;li>GPIO ( BLK1_EN, Touch Interrupt)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>2 x I2C bridge chip + DDC/EDID&lt;/li>
&lt;li>PWM backlight&lt;/li>
&lt;li>I2S for optional audio&lt;/li>
&lt;li>Generic system control signals
&lt;ul>
&lt;li>PWR_EN_MOCI&lt;/li>
&lt;li>SLEEP_MOCI#&lt;/li>
&lt;li>RESET_MOCI#&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Verdin iMX8M Mini&lt;/p>
&lt;ul>
&lt;li>NXP i.MX 8M Mini SoC&lt;/li>
&lt;li>Single display controller, LCDIF&lt;/li>
&lt;li>MIPI DSI output w/ 4 data&lt;/li>
&lt;li>MIPI D-PHY 1.2 max data per lane 1.5 GPS&lt;/li>
&lt;li>Resoution up to 1920x180p60 and 1800x1200p60&lt;/li>
&lt;/ul>
&lt;p>Verdin DSI to HDMI Adapter&lt;/p>
&lt;ul>
&lt;li>Lontium Se&lt;/li>
&lt;li>HDMI V1.4 1080p, 8bit RGB up to 60Hz&lt;/li>
&lt;li>ST HDMI2C1-14HD ESD prtect and signal conditiong&lt;/li>
&lt;li>type A standard HDMI connector&lt;/li>
&lt;/ul>
&lt;p>Verdin DSI to LVDS Adatper&lt;/p>
&lt;ul>
&lt;li>SN65DS184 MIPI DSI to dual link LVDS bridge&lt;/li>
&lt;li>signle/dual-lane LVDS up to 1920x1200/1377x768&lt;/li>
&lt;li>LVDS and touch connector compatible with Capacitive Touch Display 10.1&amp;rdquo; LVDS&lt;/li>
&lt;/ul>
&lt;h2 id="intro-linux-dsi-subsystem">Intro Linux DSI Subsystem&lt;/h2>
&lt;p>DRM MIPI DSI Core
common logic helpers to deal with MIPI DSI peripherals&lt;/p>
&lt;ul>
&lt;li>DRM Panel COre - Generic LVDS Panel (panel-lvds.c)&lt;/li>
&lt;li>DRM Bridge Core TI SN65DS184 DSI to LVDS Bridge - (ti-sn65dsi84.c)&lt;/li>
&lt;li>MIPI DSI Core - Northwest Logic MPI DSI Host COntroller (nwi-dsi.c)&lt;/li>
&lt;li>DRM CORE - Display Engine Driver&lt;/li>
&lt;/ul>
&lt;h2 id="dsi-bridge-chip-integration">DSI bridge chip integration&lt;/h2>
&lt;p>How does DSI bridge chip integrate with that?&lt;/p>
&lt;ul>
&lt;li>DRM bridge&lt;/li>
&lt;li>DRM connector&lt;/li>
&lt;li>I2C device&lt;/li>
&lt;li>MIPI DSI device&lt;/li>
&lt;/ul>
&lt;p>DSI Bridge Chip Integration Pitfalls&lt;/p>
&lt;ul>
&lt;li>availability of super secret data sheets
&lt;ul>
&lt;li>chinese vendors hide their data sheets&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>ancient downstream or bare skeleton drivers only&lt;/li>
&lt;li>lots of hard-coded parmeters&lt;/li>
&lt;li>link bring-up sequences not well documented
&lt;ul>
&lt;li>lots of trial and error&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Drivider frequency limitations on either controller side, bridge side or both
&lt;ul>
&lt;li>may require running outside of recommended range&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="bridge-chips-in-our-current-adapters">Bridge Chips in our current Adapters&lt;/h3>
&lt;p>How about Bridge Chips used in our designs current Adapters?&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Lontium LT8912B MIPI DSI to HDMI bridge&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Adopted driver from Rockchip Linux on Github&lt;/p>
&lt;ul>
&lt;li>Forward ported to later DRM API&lt;/li>
&lt;li>Reword driver to be proper I2C device&lt;/li>
&lt;li>full register set from Lontium psuedo code driver&lt;/li>
&lt;li>imrpoved regmap integration&lt;/li>
&lt;li>I2C sub addresses&lt;/li>
&lt;li>added regular I2C based DDC/EDID handling&lt;/li>
&lt;li>Added GPIO based hot-plug detection
&lt;ul>
&lt;li>Needed for I2C GPIO expander support&lt;/li>
&lt;li>hot plug detect GPIO handling crashed GPIO exapdnder&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>bus format was not properly set&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>not pretty but it works&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Further clean-up and upstreaming pending&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Texas Instruments SN65DSI84 MIPI DSI to dual-link LVDS bridge&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Downstream driver taken from a patch in CompLab Yocto Meta Layer on Github&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="dsi-bridge-chip-ecosystem">DSI Bridge Chip Ecosystem&lt;/h3>
&lt;ul>
&lt;li>Vendors still reluctant to maining drivers&lt;/li>
&lt;li>Few mainline supported bridge chips&lt;/li>
&lt;li>Few examples to copy from&lt;/li>
&lt;li>procedure of actual silicon may be difficult&lt;/li>
&lt;li>conformance of MIPI DSI host IP vs bridge chip silicon&lt;/li>
&lt;/ul>
&lt;p>Bridge Chips supported in Mainline&lt;/p>
&lt;ul>
&lt;li>
&lt;p>driver/gpu/drm/bridge&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Differentiate between&lt;/p>
&lt;ul>
&lt;li>SoC internal IP&lt;/li>
&lt;li>discrete external bridge chips&lt;/li>
&lt;li>directly connected panels&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>SoC internal IP&lt;/p>
&lt;ul>
&lt;li>NXP i.MX 8 series&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>discrete external bridge chips&lt;/p>
&lt;ul>
&lt;li>ADV7533&lt;/li>
&lt;li>Parade PS8640 MIPI DSI to eDP converter&lt;/li>
&lt;li>SN65DSI86 DSI to eDP Bridge&lt;/li>
&lt;li>TC358764 DSI/LVDS Bridge&lt;/li>
&lt;li>TC358768AXBG/TC358778XBG MIPI DSI bridge chips&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>directly connected panels&lt;/p>
&lt;ul>
&lt;li>Rasperry Pi 7In touch. Toshiba TC358762 DSI to DPI aka parallel RGB bridge&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="auto-detection-of-dsi-adapter-base-on-eeprom-contents">Auto-Detection of DSI Adapter Base on EEPROM Contents&lt;/h2>
&lt;ul>
&lt;li>idea 1
&lt;ul>
&lt;li>regular device tree: setting bridge stat to disable vs okay&lt;/li>
&lt;li>device graph: linking endpoint and remote-endpoint nodes?&lt;/li>
&lt;li>full flexbility requires device tree overlays&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>idea 2
&lt;ul>
&lt;li>storing device tree overlay in EEPROM&lt;/li>
&lt;li>simple DTBO may be below 1kb more complex ones quickly more than 2kb&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>compromise. Store configuration block&lt;/li>
&lt;/ul>
&lt;h3 id="u-boot-read-eeprom-contents-and-selecting-applicatble-device-tree-overlay">U-Boot read EEPROM Contents and Selecting Applicatble Device Tree Overlay&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>Generalized ConfigBlock Handling from NAND/eMMC to EEPROM&lt;/p>
&lt;/li>
&lt;li>
&lt;p>table with product ID to device treee overlay file name mapping&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Distroboot script to apply device tree overlays based on auto-detection as well as overlays.txt file&lt;/p>
&lt;/li>
&lt;li>
&lt;p>HDMI may do hot-plug detect&lt;/p>
&lt;/li>
&lt;li>
&lt;p>DDC/EDID&lt;/p>
&lt;/li>
&lt;li>
&lt;p>MIA&amp;hellip;&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h3 id="dt-overlays">DT Overlays&lt;/h3>
&lt;p>Verdin DSI&lt;/p>
&lt;ul>
&lt;li>Verdin DSI to HDMI Adapter
&lt;ul>
&lt;li>fragment for I2C bus&lt;/li>
&lt;li>fragment for I2C bus where you have bridge chip on&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Verdin DSI to LVDS Adapter&lt;/li>
&lt;/ul>
&lt;h3 id="uboot-fit-image">Uboot FIT Image&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>board specfici device trees&lt;/p>
&lt;/li>
&lt;li>
&lt;p>display adapter specific device tree overlays&lt;/p>
&lt;/li>
&lt;li>
&lt;p>FIT image allows conveninet packing of Linux kernel binary toegether with various device trees, device tree overlays and/or ramdisk&lt;/p>
&lt;/li>
&lt;li>
&lt;p>booted as&amp;hellip;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>fdt_module is deduced form the EEPROM on the module. fdt_board from one on the carrier board. display_adapter_dtbo from one of the display adapters&lt;/p>
&lt;/li>
&lt;/ul>
&lt;pre>&lt;code class="language-sh">mkimage -l tezi.itb
...
&lt;/code>&lt;/pre>
&lt;h3 id="device-tree-overlay-pitfalls">Device Tree Overlay Pitfalls&lt;/h3>
&lt;ul>
&lt;li>complex device tree overlays may require symbols&lt;/li>
&lt;li>&lt;code>DTC_FLAGS='-@'&lt;/code>&lt;/li>
&lt;li>if reference device nodes with hex addresses.
&lt;ul>
&lt;li>CASE SENSITIVE!!!&lt;/li>
&lt;li>use lower case!!!&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>troubleshooting
&lt;ul>
&lt;li>Add dtc on target. &lt;code>opkg install dtc&lt;/code>&lt;/li>
&lt;li>Use &lt;code>dtc -l fs&lt;/code> on target and dump /proc/device-tree&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;ul>
&lt;li>Demo - DSI Auto-Detection Demo&lt;/li>
&lt;/ul>
&lt;h2 id="questions">Questions&lt;/h2>
&lt;ul>
&lt;li>Q: Used overlay stuff in u-boot&lt;/li>
&lt;li>Q: Is Low power signaling Single ended?&lt;/li>
&lt;li>Q: Can the end pane llike LVDS support partial update? How will the bridge propogate the presence/absence of particular DCS feature to Linux DRM driver subsytem?&lt;/li>
&lt;li>Q: did you consider doing the overlays in linux kernel?&lt;/li>
&lt;li>Q: Why is DRM required with DSI?&lt;/li>
&lt;li>Q: Why are the vendors reluctant with regards to mainlining (or even docs)?&lt;/li>
&lt;li>Q: Keep the conversation going. Please visit the #2-track-embedded-linux on our Slack Workspace after the session ends&lt;/li>
&lt;/ul></description></item><item><title>PipeWire: The New Multimedia Service, Now Ready for Automotive</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/pipewire-the-new-multimedia-service-now-ready-for-automotive-julian-bouzas-collabora/</link><pubDate>Mon, 29 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/pipewire-the-new-multimedia-service-now-ready-for-automotive-julian-bouzas-collabora/</guid><description>&lt;h2 id="pipewire-the-new-multimedia-service-now-ready-for-automotive---julian-bouzas-collabora">PipeWire: The New Multimedia Service, Now Ready for Automotive - Julian Bouzas, Collabora&lt;/h2>
&lt;blockquote>
&lt;p>PipeWire is the new emerging open source project that aims to greatly improve both audio and video handling on Linux systems, both desktop and embedded. It was recently adopted by Automotive Grade Linux as the core audio framework because its design&amp;rsquo;s flexibility makes it possible to address automotive requirements, replacing entirely previous solutions and addressing new use cases such as achieving ultra low latency with zero-copy media exchange, and allowing external session managers to define device policy logic.&lt;/p>
&lt;p>In this talk, Julian is going to present the PipeWire project, how it evolved to overcome the automotive industry use cases, and what the current upstream status is. Julian will also present the WirePlumber policy management framework, which makes it easy to write use-case specific policy systems.&lt;/p>
&lt;/blockquote>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;h3 id="intro">Intro&lt;/h3>
&lt;p>Fresh multimedia service for Linux&lt;/p>
&lt;ul>
&lt;li>originally mean for video only: PulseAudio for Video (PulseVideo)&lt;/li>
&lt;li>video capture
&lt;ul>
&lt;li>cameras&lt;/li>
&lt;li>graphic sources (wayland, vulkan, OpenGL)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Audio playback and capture
&lt;ul>
&lt;li>microphone and speaker&lt;/li>
&lt;li>bluetooth device&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Why do we need Pipewire&lt;/p>
&lt;ul>
&lt;li>Unified both pulseaudio and Jack audio servers&lt;/li>
&lt;li>Permissions, support for container&lt;/li>
&lt;li>Low Latency
&lt;ul>
&lt;li>designed for small buffer sizes&lt;/li>
&lt;li>(1-2ms of latency)&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Flexible: external session manager adaptable to any use cases
&lt;ul>
&lt;li>can write your own session manager&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="architecture-and-design">Architecture and Design&lt;/h3>
&lt;p>Multimedia stack&lt;/p>
&lt;ul>
&lt;li>DRM&lt;/li>
&lt;li>PipeWire: Layer between Kernel and Applications&lt;/li>
&lt;li>DRM -&amp;gt; Wayland compositor -&amp;gt; PipeWire&lt;/li>
&lt;li>Kernel devices: DRM, V4L2, Bluetooth, Alsa&lt;/li>
&lt;li>PipeWire Sessions Manager&lt;/li>
&lt;/ul>
&lt;p>Compatibilities APIs on top of PipeWirte&lt;/p>
&lt;ul>
&lt;li>Alsa&lt;/li>
&lt;li>Pulse AUdio&lt;/li>
&lt;li>JACK&lt;/li>
&lt;/ul>
&lt;p>Architecture and Design&lt;/p>
&lt;ul>
&lt;li>Modular with Plugin&lt;/li>
&lt;li>Graph based like GStreamer: Nodes, ports and Links&lt;/li>
&lt;li>Multi-Process
&lt;ul>
&lt;li>external session manager configures and links the nodes&lt;/li>
&lt;li>daemon processes most of the data&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Fully based on internal and simple plugin API library (SPA)
&lt;ul>
&lt;li>extremely simple lightweight generic purpose multimedia libraries&lt;/li>
&lt;li>mostly header-only C library&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Pipewire is very performant&lt;/p>
&lt;ul>
&lt;li>Uses modern Linux Kernel APIs&lt;/li>
&lt;/ul>
&lt;p>Security&lt;/p>
&lt;ul>
&lt;li>External session manager grants permission&lt;/li>
&lt;/ul>
&lt;p>Permissions&lt;/p>
&lt;ul>
&lt;li>read - Visable, capture data&lt;/li>
&lt;li>write, play data&lt;/li>
&lt;li>execute: allow executing methods on object (setup format on nodes)&lt;/li>
&lt;/ul>
&lt;p>Adopted&lt;/p>
&lt;ul>
&lt;li>Version 0.3.5 released in May 2020 and distributed in Fedora 32&lt;/li>
&lt;li>Adopted by AGL&lt;/li>
&lt;/ul>
&lt;h3 id="pipewire-dot-tool">pipewire dot tool&lt;/h3>
&lt;p>Generates DOT graphs &lt;code>pw-dot pw.dot&lt;/code>&lt;/p>
&lt;h3 id="wireplumber-design">WirePlumber Design&lt;/h3>
&lt;ul>
&lt;li>application that loads modules that were written with that library&lt;/li>
&lt;li>allows external session manager&lt;/li>
&lt;li>Plan to add PYthon/Rust bindings&lt;/li>
&lt;/ul>
&lt;p>Wire plumber Versions&lt;/p>
&lt;ul>
&lt;li>
&lt;p>v0.3.0 (2020 June) first version with desktop support&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>pavucontrol&lt;/code> can still be used to control audio&lt;/p>
&lt;/li>
&lt;/ul></description></item><item><title>Tutorial: Debugging Embedded Devices Using GDB - A Review of Some Lessons Learned</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/tutorial-debugging-embedded-devices-using-gdb-a-review-of-some-lessons-learned-mike-anderson-the-ptr-group/</link><pubDate>Mon, 29 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/tutorial-debugging-embedded-devices-using-gdb-a-review-of-some-lessons-learned-mike-anderson-the-ptr-group/</guid><description>&lt;h2 id="tutorial-debugging-embedded-devices-using-gdb---a-review-of-some-lessons-learned">Tutorial: Debugging Embedded Devices Using GDB - A Review of Some Lessons Learned&lt;/h2>
&lt;ul>
&lt;li>Mike Anderson, The PTR Group&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>Linux has an incredible selection of tools for both debugging and profiling applications to get the most out of the system. In this session, we will start with gdb and show many of the lesser-known features that can significantly shorten debugging time. Next we will focus on the profiling and code coverage features found in gprof/gcov for determining both the performance of function calls and whether your test code is actually testing all of the code that it needs to test via examining the code coverage of the execution. Next, we will go into more sophisticated approaches using strace, ftrace, oprofile and LTTng and show how they work and why you might choose one over the other for certain tasks.&lt;/p>
&lt;/blockquote>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;p>What we will talk about&lt;/p>
&lt;ul>
&lt;li>GNU project, gcc and gdb&lt;/li>
&lt;li>gdb CLI, TUI and gdbfront-ends&lt;/li>
&lt;li>help, scripts, macro&lt;/li>
&lt;li>attach to running app&lt;/li>
&lt;li>breakpoints, watchpoints and more&lt;/li>
&lt;li>fdbserver&lt;/li>
&lt;li>strace&lt;/li>
&lt;li>gprov/gcov&lt;/li>
&lt;li>valgrint&lt;/li>
&lt;li>LTTng and Ftrace&lt;/li>
&lt;/ul>
&lt;p>GNU Project&lt;/p>
&lt;ul>
&lt;li>GNU: GNU&amp;rsquo;s Not Unix&lt;/li>
&lt;li>front-end laguage parser and back-end code generator&lt;/li>
&lt;li>numerous &amp;lsquo;binutils&amp;rsquo; such as the linker, libraian&lt;/li>
&lt;/ul>
&lt;p>Line debug levels&lt;/p>
&lt;ul>
&lt;li>g0 produce no debug info&lt;/li>
&lt;li>g1 produce minimal info, enought for back trace, no info about local var and no line num&lt;/li>
&lt;li>g2 default debug level&lt;/li>
&lt;li>g3 extra info, macro definitions&lt;/li>
&lt;li>&lt;code>-ggdb3&lt;/code> debug infor for gdb more than COFF,XCOFF or DWARF2 fof -g&lt;/li>
&lt;/ul>
&lt;p>Example&lt;/p>
&lt;pre>&lt;code class="language-shell">arm-linux-gnueabi-gcc -ggdb3 -o hello helloWorld.c
arm-linux-gnueabi-objdump -h hello
&lt;/code>&lt;/pre>
&lt;p>GDB GUI&lt;/p>
&lt;ul>
&lt;li>ddd Data Display Debugger
&lt;ul>
&lt;li>ddd supports: gdb, jdb, Python, Perl, TCL, and PHP&lt;/li>
&lt;li>debugger arm-linux-gnueabi-gdb myapp&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>MS Visual Studio Code&lt;/li>
&lt;/ul>
&lt;p>GDB help&lt;/p>
&lt;ul>
&lt;li>aliases&lt;/li>
&lt;li>breakpoints&lt;/li>
&lt;li>data&lt;/li>
&lt;li>files&lt;/li>
&lt;li>internals&lt;/li>
&lt;li>obscure&lt;/li>
&lt;li>running&lt;/li>
&lt;li>stack&lt;/li>
&lt;li>status&lt;/li>
&lt;li>support&lt;/li>
&lt;li>tracepoints&lt;/li>
&lt;li>user-defined&lt;/li>
&lt;/ul>
&lt;h3 id="gdb-script">gdb script&lt;/h3>
&lt;ul>
&lt;li>&lt;code>.gdbinit&lt;/code> in current directoy&lt;/li>
&lt;/ul>
&lt;p>useful init&lt;/p>
&lt;pre>&lt;code>set history save on
set print pretty on
set pagination off
set confirm off
&lt;/code>&lt;/pre>
&lt;p>&lt;code>gdb -x&lt;/code> load at load time&lt;/p>
&lt;p>gdb has built in python interpreter Just call &lt;code>python&lt;/code>.&lt;/p>
&lt;h3 id="working-with-signals-via-gdb">Working with Signals via gdb&lt;/h3>
&lt;p>Print table of how gdb will handle each signal:&lt;/p>
&lt;p>&lt;code>info handle &lt;/code>&lt;/p>
&lt;p>Ways GDB can handle signla&lt;/p>
&lt;ul>
&lt;li>nostop&lt;/li>
&lt;li>stop&lt;/li>
&lt;li>print&lt;/li>
&lt;li>no-print&lt;/li>
&lt;li>pass&lt;/li>
&lt;li>nopass&lt;/li>
&lt;/ul>
&lt;p>handle signal keywords&lt;/p>
&lt;p>signal SIGSEGV - deliver SEGV signal to the current program&lt;/p>
&lt;h3 id="loadexecute-your-code">Load/Execute your code&lt;/h3>
&lt;ul>
&lt;li>Use &amp;lsquo;file &lt;filename>&amp;rsquo; to loca additional files&lt;/li>
&lt;li>Helpful for using with kgdb&lt;/li>
&lt;/ul>
&lt;h3 id="watchpoints">watchpoints&lt;/h3>
&lt;pre>&lt;code class="language-shell">watch -l &amp;lt;address/symbol&amp;gt; # command is scope aware
rwatch &amp;lt;a/s&amp;gt; # stops if read
watch &amp;lt;a/s&amp;gt; thread 3 # stops if thread 3 modified
watch &amp;lt;a/s&amp;gt; if &amp;lt;a/s&amp;gt; &amp;gt; 5 # stops when contents &amp;gt; 5
&lt;/code>&lt;/pre>
&lt;h3 id="gdbserver-cross-debug-example">gdbserver Cross Debug Example&lt;/h3>
&lt;pre>&lt;code>gdbserver 192.168.7.1:1929 myapp &amp;amp;
(gdb) target remote 192.168.7.2:1929
&lt;/code>&lt;/pre>
&lt;p>gdbserver hostIP:2345 &amp;ndash;attach PID&lt;/p>
&lt;ul>
&lt;li>workds within GUI based fron-ends as well&lt;/li>
&lt;/ul>
&lt;h3 id="strace">strace&lt;/h3>
&lt;p>watch system called made from user space.&lt;/p>
&lt;pre>&lt;code>strace -c ./capture_stream -D /dev/video0 -w 764*331 -p 1 | ./viewer -w 680*480 -p 1
&lt;/code>&lt;/pre>
&lt;h3 id="ltrace">ltrace&lt;/h3>
&lt;ul>
&lt;li>ltrace allows us to trace library calls&lt;/li>
&lt;li>strace for libraries&lt;/li>
&lt;/ul>
&lt;h3 id="ftrace-function-tracer">Ftrace (function tracer)&lt;/h3>
&lt;h3 id="kernelshark">Kernelshark&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://kernelshark.org/">https://kernelshark.org/&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://kernelshark.org/Documentation.html">https://kernelshark.org/Documentation.html&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://lwn.net/Articles/425583/">https://lwn.net/Articles/425583/&lt;/a>&lt;/li>
&lt;li>TRACE-CMD The front-end application to Ftrace. The back-end application to KernelShark.&lt;/li>
&lt;/ul></description></item><item><title>Tutorial: Introduction to the Embedded Boot Loader U-boot</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/tutorial-introduction-to-the-embedded-boot-loader-u-boot-behan-webster-converse-in-code/</link><pubDate>Mon, 29 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/tutorial-introduction-to-the-embedded-boot-loader-u-boot-behan-webster-converse-in-code/</guid><description>&lt;blockquote>
&lt;p>U-Boot is the universal bootloader used on a vast majority of embedded systems, development kits, products and so on. This session is an introduction into the U-Boot bootloader, including a hands-on part, and covers practical topics like identifying that the board is running U-Boot, accessing and exploring the U-Boot shell, including advanced scripting techniques to make life easier, obtaining information about the current hardware, accessing buses and storage and finally booting the kernel. Furthermore, since every embedded project has it’s a unique set of requirements, U-Boot customization topics are briefly touched at the end of the session.&lt;/p>
&lt;/blockquote>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;ul>
&lt;li>SPL - Secondary program Loader
&lt;ul>
&lt;li>Just enough of U-Boot to load something else&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Tertiary program loader
&lt;ul>
&lt;li>smaller than SPL&lt;/li>
&lt;li>uncommon&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;h3 id="u-boot-shell">U-boot Shell&lt;/h3>
&lt;ul>
&lt;li>original shell&lt;/li>
&lt;li>HUSH shell&lt;/li>
&lt;li>similar to bourne shell&lt;/li>
&lt;li>You can get help for &amp;lsquo;usb&amp;rsquo;: &lt;code>help usb&lt;/code>&lt;/li>
&lt;/ul>
&lt;h3 id="contact">contact&lt;/h3>
&lt;p>irc
mailing list&lt;/p>
&lt;h3 id="memory-access">Memory access&lt;/h3>
&lt;ul>
&lt;li>support for read/write mem and reg&lt;/li>
&lt;li>support for byte/word/long/quad&lt;/li>
&lt;li>memory modification interactivly &lt;code>mm&lt;/code>, &lt;code>mn&lt;/code>&lt;/li>
&lt;li>&lt;code>cp&lt;/code> copy memory&lt;/li>
&lt;li>&lt;code>cmp&lt;/code> compare&lt;/li>
&lt;/ul>
&lt;h3 id="u-boot-environment">U-boot environment&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>env key value storage&lt;/p>
&lt;/li>
&lt;li>
&lt;p>default to compile time default&lt;/p>
&lt;/li>
&lt;li>
&lt;p>can have defaults read from somewhere&lt;/p>
&lt;/li>
&lt;li>
&lt;p>can be saved in memory&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>printenv&lt;/code> print all env&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>env print arch&lt;/code>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>env set fookey barvaluse&lt;/code>&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>env set foonowempty&lt;/code> similar to unset foonowempty&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>saveenv&lt;/code> for env persistence&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;code>run&lt;/code> for running scripts. chain commands with &amp;lsquo;;&amp;rsquo;&lt;/p>
&lt;/li>
&lt;li>
&lt;p>The script environment is evaluate when set. You can escape &lt;code>$&lt;/code> to evaluate later&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>Special variables&lt;/p>
&lt;ul>
&lt;li>ver&lt;/li>
&lt;li>stdin, stdou, stderr&lt;/li>
&lt;li>loadaddr&lt;/li>
&lt;li>filesize&lt;/li>
&lt;li>bootargs&lt;/li>
&lt;li>bootcmd&lt;/li>
&lt;li>preboo&lt;/li>
&lt;li>ipaddr, netmask, serverip, gatewayip - network settings,&lt;/li>
&lt;li>ethaddr, eth1addr&lt;/li>
&lt;/ul>
&lt;p>Other commands&lt;/p>
&lt;ul>
&lt;li>setexpr - environment manipulation multitool&lt;/li>
&lt;/ul>
&lt;p>logical and conditional expression&lt;/p>
&lt;ul>
&lt;li>&lt;code>if&lt;/code>, &lt;code>||&lt;/code>, &lt;code>&amp;amp;&amp;amp;&lt;/code>&lt;/li>
&lt;li>can&amp;rsquo;t use &lt;code>!&lt;/code> in conditional.&lt;/li>
&lt;li>&lt;code>while&lt;/code>&lt;/li>
&lt;/ul>
&lt;h3 id="u-boot-data-loading">u-boot data loading&lt;/h3>
&lt;ul>
&lt;li>SD/MMC &lt;code>mmc&lt;/code>, usb, sata, nand&lt;/li>
&lt;li>Uiversal FS access &lt;code>ls&lt;/code>, &lt;code>load&lt;/code>&lt;/li>
&lt;li>Squash FS not supported&lt;/li>
&lt;/ul>
&lt;p>Example with SD card&lt;/p>
&lt;pre>&lt;code class="language-shell">mmc rescan
mmc part
# device and partition
ls mmc 0:1
load mmc 0:1 $loadaddr ID.txt
md.b $loadaddr $filesize
&lt;/code>&lt;/pre>
&lt;p>Loading from network&lt;/p>
&lt;p>U-Boot network stack is UDP-only (no TCP)&lt;/p>
&lt;ul>
&lt;li>support for TFTP, NFS, DHCP/BOOTP&lt;/li>
&lt;li>ping&lt;/li>
&lt;li>tftp&lt;/li>
&lt;li>dhcp (obtain settings then tftp)&lt;/li>
&lt;/ul>
&lt;pre>&lt;code>env set
ping $serverip
tftp $loadaddr $serverip:somefile
dhcp $loadaddr $serverip:somefile
&lt;/code>&lt;/pre>
&lt;p>Load over serial&lt;/p>
&lt;ul>
&lt;li>X/Y modem&lt;/li>
&lt;li>Srecord&lt;/li>
&lt;li>kermit protocol&lt;/li>
&lt;li>&lt;code>loady&lt;/code>&lt;/li>
&lt;/ul>
&lt;p>Screen&lt;/p>
&lt;pre>&lt;code>loady
ctrl-a:exec !! sb -T yourbinary.bin
&lt;/code>&lt;/pre>
&lt;h3 id="booting-the-kernel">Booting the kernel&lt;/h3>
&lt;ul>
&lt;li>(z)Image
&lt;ul>
&lt;li>Linux binary (with decompressor)&lt;/li>
&lt;li>no protection gainst bitrot&lt;/li>
&lt;li>just set up registers and jump&lt;/li>
&lt;li>optional separate device tree&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>uImage (originally support, now legacy)
&lt;ul>
&lt;li>Legacy since forever&lt;/li>
&lt;li>wrapper around binary&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>&lt;code>fitImage&lt;/code> - multi component image
&lt;ul>
&lt;li>based on device tree&lt;/li>
&lt;li>support multiple files&lt;/li>
&lt;li>configurable checksum algorithm per entry&lt;/li>
&lt;li>support digital signatures&lt;/li>
&lt;li>like tar files&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Booting&lt;/p>
&lt;ul>
&lt;li>boot commands: bootz, booti, bootm&lt;/li>
&lt;/ul>
&lt;pre>&lt;code>env set bootargs console=ttyO0,115200
load mmc 0:1 boot/dtbs/4.9.../am335x.dtb
load mmc 0:1 0x880000 boot/dtbs/4.9.../am335x.dtb
&lt;/code>&lt;/pre>
&lt;p>Device Tree&lt;/p>
&lt;ul>
&lt;li>Data structure describing the hardware&lt;/li>
&lt;li>asyclic graph&lt;/li>
&lt;li>can link to any items&lt;/li>
&lt;/ul>
&lt;p>snippet&lt;/p>
&lt;pre>&lt;code class="language-devicetree">`images { kernel@1 { data
data = /incbin/(&amp;quot;./arch/arm/boot/dts/...dtb&amp;quot;)
}}
&lt;/code>&lt;/pre>
&lt;pre>&lt;code>mkimage -f fitimage.its fitImage
&lt;/code>&lt;/pre>
&lt;pre>&lt;code>bootm $fitimageaddr
iminfo imxtract
&lt;/code>&lt;/pre>
&lt;h3 id="fdt">fdt&lt;/h3>
&lt;p>fdt command can maniuplate flattend device tree&lt;/p>
&lt;ul>
&lt;li>fdt addr&lt;/li>
&lt;li>fdt resize&lt;/li>
&lt;li>fdt print&lt;/li>
&lt;li>fdt set&lt;/li>
&lt;/ul>
&lt;h3 id="gpio">gpio&lt;/h3>
&lt;ul>
&lt;li>gpio input&lt;/li>
&lt;li>gpio set&lt;/li>
&lt;li>gpio clear&lt;/li>
&lt;li>gpio toggle&lt;/li>
&lt;/ul>
&lt;h3 id="i2c-command">i2c command&lt;/h3>
&lt;ul>
&lt;li>i2c bus&lt;/li>
&lt;li>i2c dev&lt;/li>
&lt;li>i2c md&lt;/li>
&lt;li>i2c mw - write registers to I2C device&lt;/li>
&lt;li>i2c probe&lt;/li>
&lt;li>i2c speed&lt;/li>
&lt;/ul>
&lt;h3 id="qemu">qemu&lt;/h3>
&lt;pre>&lt;code>qemu-system-arm -M virt -bios u-boot.bin
&lt;/code>&lt;/pre>
&lt;h3 id="demo">Demo&lt;/h3>
&lt;pre>&lt;code>env set bootargs root= rootfstype= rootwait console=ttyO0,115200
mmc rescan
load mcc...
load mmc...
&lt;/code>&lt;/pre>
&lt;h3 id="task-7-build-u-boot-in-sandbox-mode">Task 7 build u-boot in sandbox mode&lt;/h3>
&lt;p>ALlows you to run u-boot as user application&lt;/p>
&lt;pre>&lt;code>make sandbox_defconfig
&lt;/code>&lt;/pre>
&lt;h3 id="other-task">Other task&lt;/h3>
&lt;pre>&lt;code>env ask mac 'MAC address ?'
&lt;/code>&lt;/pre></description></item><item><title>Yocto Project LTS Releases - Nicolas Dechesne, Linaro &amp; David Reyna, Wind River</title><link>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/yocto-project-lts-releases-nicolas-dechesne-linaro-david-reyna-wind-river/</link><pubDate>Mon, 29 Jun 2020 00:00:00 +0000</pubDate><guid>https://academic-oss-elc.netlify.app/talk/2020-oss-elc/yocto-project-lts-releases-nicolas-dechesne-linaro-david-reyna-wind-river/</guid><description>&lt;h2 id="yocto-project-lts-releases---nicolas-dechesne-linaro--david-reyna-wind-river">Yocto Project LTS Releases - Nicolas Dechesne, Linaro &amp;amp; David Reyna, Wind River&lt;/h2>
&lt;ul>
&lt;li>Speakers: David Reyna, Nicolas Dechesne&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>Many projects struggle between the requirements for Long Term Support (LTS) and cadence delivery, the balance between stability versus agility and resources.&lt;/p>
&lt;p>The Yocto Project is an open source project from the Linux foundation which provides tools and processes to build Linux systems. The Yocto Project makes releases every six months, and each release is maintained by the Yocto Project for a period of one year. This works great for keeping a tight integration loop with upstream. However the release cadence and the amount of changes that occur in each release make it less than ideal for certain markets. LTS releases have been one of the main feedback from our ecosystem for some time.&lt;/p>
&lt;p>In this talk we will review the process behind this decision which is most likely the biggest change in the project since its inception. We will present how it will be implemented, how member organizations participated through the Yocto Project Advisory Board, discuss the potential impact on the Yocto Project ecosystem, and address the lessons learned in addition to the expected shortcomings and challenges.&lt;/p>
&lt;/blockquote>
&lt;h2 id="notes">Notes&lt;/h2>
&lt;ul>
&lt;li>First Linux Foundation project in 2010.&lt;/li>
&lt;li>OpenEmbedded Started in 2003&lt;/li>
&lt;/ul>
&lt;h3 id="yocto-releases">Yocto Releases&lt;/h3>
&lt;ul>
&lt;li>6 month cadence (slide-8)&lt;/li>
&lt;li>Release contains: OE-core, bitbake, meta-yocto, yocto-docs (slide 9)&lt;/li>
&lt;/ul>
&lt;h3 id="autobuilder">Autobuilder&lt;/h3>
&lt;ul>
&lt;li>autobuilder&lt;/li>
&lt;li>25 builders, 12+ hosts&lt;/li>
&lt;li>ptests&lt;/li>
&lt;li>Major improvements to reduce need for manual testing (slide 13)&lt;/li>
&lt;li>hash equivalence is a way to get more efficiency&lt;/li>
&lt;/ul>
&lt;h3 id="lts-background">LTS background&lt;/h3>
&lt;ul>
&lt;li>Longer LTS cycle&lt;/li>
&lt;li>LTS announced in March 2020&lt;/li>
&lt;li>&lt;a href="https://www.yoctoproject.org/yocto-project-long-term-support-announced/">https://www.yoctoproject.org/yocto-project-long-term-support-announced/&lt;/a>&lt;/li>
&lt;li>Maintained for two years&lt;/li>
&lt;li>Yocto 3.1 is first LTS (dunfell)&lt;/li>
&lt;li>20 hrs a week fo maintainer duties&lt;/li>
&lt;li>TSC is responsible for LTS releases, rpcoess and maintainer&lt;/li>
&lt;/ul>
&lt;h3 id="what-is-not-in-lts">What is not in LTS&lt;/h3>
&lt;ul>
&lt;li>meta-oe&lt;/li>
&lt;li>vendor bsp&lt;/li>
&lt;li>only test on virtualized tests&lt;/li>
&lt;li>valudate use of CVE automated tools&lt;/li>
&lt;li>replacement for vendor BSP support&lt;/li>
&lt;/ul>
&lt;h3 id="branching">Branching&lt;/h3>
&lt;ul>
&lt;li>LTS&lt;/li>
&lt;li>stable (was 12-18 months, reduced to 8? months)&lt;/li>
&lt;li>master&lt;/li>
&lt;/ul>
&lt;h3 id="contribute-lts">contribute LTS&lt;/h3>
&lt;ul>
&lt;li>submit patches to mailing list&lt;/li>
&lt;li>patches should be on master, except whne incorporating a CVE/bug fix for old version&lt;/li>
&lt;/ul></description></item></channel></rss>