<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux | Academic OSS ELC</title><link>https://academic-oss-elc.netlify.app/tags/linux/</link><atom:link href="https://academic-oss-elc.netlify.app/tags/linux/index.xml" rel="self" type="application/rss+xml"/><description>Linux</description><generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>en-us</language><lastBuildDate>Tue, 30 Jun 2020 00:00:00 +0000</lastBuildDate><image><url>https://academic-oss-elc.netlify.app/images/icon_hu0b7a4cb9992c9ac0e91bd28ffd38dd00_9727_512x512_fill_lanczos_center_2.png</url><title>Linux</title><link>https://academic-oss-elc.netlify.app/tags/linux/</link></image><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>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: 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></channel></rss>