<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://saguileran.github.io/feed.xml" rel="self" type="application/atom+xml"/><link href="https://saguileran.github.io/" rel="alternate" type="text/html" hreflang="en"/><updated>2026-02-04T14:59:35+00:00</updated><id>https://saguileran.github.io/feed.xml</id><title type="html">blank</title><subtitle>A simple, whitespace theme for academics. Based on [*folio](https://github.com/bogoli/-folio) design. </subtitle><entry><title type="html">Building websites using Github pages</title><link href="https://saguileran.github.io/blog/2026/github-pages/" rel="alternate" type="text/html" title="Building websites using Github pages"/><published>2026-01-29T18:01:00+00:00</published><updated>2026-01-29T18:01:00+00:00</updated><id>https://saguileran.github.io/blog/2026/github-pages</id><content type="html" xml:base="https://saguileran.github.io/blog/2026/github-pages/"><![CDATA[<p>Nowdays, it seems that any person without a public link (social media, websites, google accountm, etc) seems to not excists.</p> <p>Although there are many possible ways to create a personal website many of them involve getting into programming to hard or pay to other person or website to build it. Nevertheless, the current computer science tools allow almost any person to create and customize its own website / portafolio.</p> <p>Namespace</p> <p>The open-source and free solution is to use github. Github is a platform that allows to host repositories, a folder with codes or any kind of stuff, online for free, it can be public or private. The use of github is enormous and many programmers and companies used it to host their code to keeping trackin. One of the most amazing thins is the possibility to look any code and take inspiration of it, such is that that there are many public websites designs and templates to create your own website.</p> <h2 id="github-pages">Github Pages</h2> <h3 id="templates">Templates</h3> <p>There are many one-click options that allow you to build complex and great websites with portafolio section. You can check it by google on it github</p> <ul> <li> <h2 id="al-folio">al-folio</h2> </li> </ul> <h2 id="ai-gemini-vsc-copilot-etc">AI (Gemini, VSC-copilot, etc)</h2> <p>At present, the evolution and performance of AI agents is amazing. Using the AI, withouth any knowledge of programming, it is possible to create your own website chating with an AI, interacting with it by saying what are you looking for and how it can be. You can add anything you lilke (images, songs, tables, font, etc). One examples is this one</p> <p>Example: <a href="https://zapatamujica.github.io/">Juan Sebastián Zapata-Mujica</a>. Sebastian is a social researcher with zero experience in programming but a huge interested into get a personal portafolio, to share his photographies and works.</p>]]></content><author><name></name></author><category term="learning"/><category term="github"/><category term="websites"/><summary type="html"><![CDATA[A basic tutorial to implement a personal, or for projects, website]]></summary></entry><entry><title type="html">Master’s project talks</title><link href="https://saguileran.github.io/blog/2025/talks/" rel="alternate" type="text/html" title="Master’s project talks"/><published>2025-05-16T21:01:00+00:00</published><updated>2025-05-16T21:01:00+00:00</updated><id>https://saguileran.github.io/blog/2025/talks</id><content type="html" xml:base="https://saguileran.github.io/blog/2025/talks/"><![CDATA[<p>This post contains the presentations I gave during my master’s degree. I started the master’s program with a defined project: to study sound production in birds using physics and computer science. I chose IME-USP because of the <a href="https://compmus.ime.usp.br/en/">Computer Music Group</a>, a research group with extensive experience in analyzing sound and a strong multidisciplinary focus, guided by Professor <a href="https://www.ime.usp.br/mqz/">Marcelo Gomes de Queiroz</a>, an expert in both music and computer science.</p> <h2 id="1st-talk-sound-in-animals">1st Talk: Sound in Animals</h2> <div style="position: relative; width: 100%; height: 0; padding-top: 56.2500%; padding-bottom: 0; box-shadow: 0 2px 8px 0 rgba(63,69,81,0.16); margin-top: 1.6em; margin-bottom: 0.9em; overflow: hidden; border-radius: 8px; will-change: transform;"> <iframe loading="lazy" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: none; padding: 0;margin: 0;" src="https://www.canva.com/design/DAGoHP1SIiQ/qwiswzE_BvMYgR2yLYEY5w/view?embed" allowfullscreen="allowfullscreen" allow="fullscreen"> </iframe> </div> <p style="text-align: right;"><a href="https:&#x2F;&#x2F;www.canva.com&#x2F;design&#x2F;DAGoHP1SIiQ&#x2F;qwiswzE_BvMYgR2yLYEY5w&#x2F;view?utm_content=DAGoHP1SIiQ&amp;utm_campaign=designshare&amp;utm_medium=embeds&amp;utm_source=link" target="_blank" rel="noopener">1st_SoundInAnimals</a> by Sebastian Aguilera Novoa.</p> <h2 id="2nd-talk-the-syrinx">2nd Talk: The Syrinx</h2> <div style="position: relative; width: 100%; height: 0; padding-top: 56.2500%; padding-bottom: 0; box-shadow: 0 2px 8px 0 rgba(63,69,81,0.16); margin-top: 1.6em; margin-bottom: 0.9em; overflow: hidden; border-radius: 8px; will-change: transform;"> <iframe loading="lazy" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0; border: none; padding: 0;margin: 0;" src="https://www.canva.com/design/DAGymuX6T0I/-JpOu7LK20RSAzhQ1Q_0AA/view?embed" allowfullscreen="allowfullscreen" allow="fullscreen"> </iframe> </div> <p style="text-align: right;"><a href="https:&#x2F;&#x2F;www.canva.com&#x2F;design&#x2F;DAGymuX6T0I&#x2F;-JpOu7LK20RSAzhQ1Q_0AA&#x2F;view?utm_content=DAGymuX6T0I&amp;utm_campaign=designshare&amp;utm_medium=embeds&amp;utm_source=link" target="_blank" rel="noopener">2nd_TheSyrinx</a> by Sebastian Aguilera Novoa.</p> <h2 id="3rd-qualifying">3rd: Qualifying</h2> <h2 id="4rd-definding">4rd: Definding</h2>]]></content><author><name></name></author><category term="research"/><category term="usp"/><category term="research"/><summary type="html"><![CDATA[Talks I gave during my master's research.]]></summary></entry><entry><title type="html">Free Software Development Logbook</title><link href="https://saguileran.github.io/blog/2025/free-software-development/" rel="alternate" type="text/html" title="Free Software Development Logbook"/><published>2025-03-15T21:01:00+00:00</published><updated>2025-03-15T21:01:00+00:00</updated><id>https://saguileran.github.io/blog/2025/free-software-development</id><content type="html" xml:base="https://saguileran.github.io/blog/2025/free-software-development/"><![CDATA[<hr/> <h2 id="introduction">Introduction</h2> <p>This post is created for the Free Software Development course taught by <a href="https://www.ime.usp.br/paulormm/">Professor Paulo R. M. Meirelles</a> at the <a href="https://www.ime.usp.br/">Institute of Mathematics and Statistics (IME)</a> at the <a href="https://www5.usp.br/">University of São Paulo (USP)</a>. The course is designed and maintained by the research group <a href="https://flusp.ime.usp.br/">FLUSP</a>. You can find all tutorials and more detailed information on its official webpage. More information about the course (content, references, etc.) can be found on the official website Janus for the courses, <a href="https://uspdigital.usp.br/janus/componente/disciplinasOferecidasInicial.jsf?action=3&amp;sgldis=MAC5856">MAC5856 - Desenvolvimento de Software Livre</a>.</p> <p>The objective of the course is to introduce students to free and open source software. In Portuguese, both terms mean the same. The course covers basic concepts, appropriate languages, ethical and technical aspects, etc., with the goal of promoting and constructing open and collaborative software. The course focus is to learn and contribute to open projects like the Linux kernel for the <a href="https://www.kernel.org/doc/html/v4.14/driver-api/iio/index.html">IIO subsystem</a>.</p> <p>In addition, there is a new tool implemented for the VMs developement and linux modules design, creation, and testing. The tool is <code class="language-plaintext highlighter-rouge">kw</code>, a kernel developer workflow tool. More information can be found at <a href="https://kworkflow.org/">kworkflow</a>.</p> <blockquote> <p><strong>NOTE</strong></p> <p>The course focuses its tutorials and practices on the Linux kernel subsystem <a href="https://www.kernel.org/doc/html/v4.16/driver-api/iio/index.html">Industrial I/O (IIO)</a>. This subsystem is designed for handling sensors and other devices that provide analog-to-digital or digital-to-analog data conversion, making it a critical component for industrial and embedded systems. <em>The device used for the course is a Lenovo laptop with Ubuntu 24.04.2 LTS.</em></p> </blockquote> <hr/> <h2 id="tutorial-1-setting-up-a-test-environment-for-linux-kernel">Tutorial 1: Setting up a test environment for Linux Kernel</h2> <p>The first tutorial of the course provides an introduction to <a href="https://github.com/QEMU">QEMU</a> and <a href="https://github.com/libvirt">libvirt</a>, powerful tools designed to deploy virtual machines (VMs) quickly and efficiently, eliminating the traditional complexities and time-consuming efforts typically associated with VM setup. Both QEMU and libvirt are libraries used for virtualization and resource emulation, enabling users to create and manage virtualized environments with ease.</p> <p>The Linux kernel architecture tested is an ARM for the industrial I/O subsystem (IIO).</p> <p>A detailed guide can be found at: <a href="https://flusp.ime.usp.br/kernel/qemu-libvirt-setup/">Setting up a test environment for Linux Kernel Dev using QEMU and libvirt</a> writtten by <a href="https://linux.ime.usp.br/~marcelosc/">Marcelo Schmitt</a>.</p> <h3 id="summary">Summary</h3> <p>The tutorial is divided into the following sections:</p> <ol> <li>Preparing testing environment directory and “all-in-one” script <ul> <li>Create necessary folders and files.</li> <li>Give the required permissions for files and folders.</li> </ul> </li> <li>Set up and configure a VM running a guest OS <ul> <li>Create an <code class="language-plaintext highlighter-rouge">activate.sh</code> file to deploy VMs manager. To enable it, execute the comand <code class="language-plaintext highlighter-rouge">home/lk_dev/activate.sh</code> or, located in the folder <code class="language-plaintext highlighter-rouge">lk_dev</code> use <code class="language-plaintext highlighter-rouge">.activate.sh</code> or <code class="language-plaintext highlighter-rouge">soruce activate.sh</code>, this will print some green text and a pink prompt preamble to indicate you are in the VM’s manager.</li> <li>Check image OS properties and partition size, then resize the disk image to 5Gb to give space for more linux modules.</li> <li>Extract kernel and initrd images from OS image to create the VM with them</li> <li>Activate the <code class="language-plaintext highlighter-rouge">libvirt</code> damen to use <code class="language-plaintext highlighter-rouge">virsh</code> commands. In addition, starts a default network (to connect the VM with internet) with virsh. It will also enable autostart and persistence for the network.</li> <li>The output for the point, is a bash function that creates a VM named arm64 that creates a VM with some default configuration defined in the activate file.</li> </ul> </li> <li>Configure SSH access from the host to the VM. <ul> <li>Allow ssh connection with the current VM’s credentials, user root without password. There are two important settigns you must done: enable permit root login and permit empty password. This its done by modifying the <code class="language-plaintext highlighter-rouge">/etc/ssh/sshd_config</code> file.</li> <li>Reconfigure the sshd keys and restart the sshd damon.</li> <li>Now, it is possible to connect to the VM machine via ssh, using a client-server approach. Furthermore, it is possible to sent and recive files using Secure Copy Protocol (scp).</li> </ul> </li> <li>Fetch the modules loaded in the guest kernel. <ul> <li>Export the modules installed. To keep the same machine in every moment, it is highly recommended to create a file with the modules used, this can be done wiht <code class="language-plaintext highlighter-rouge">lsmod &gt; vm_mod_list</code>.</li> </ul> </li> <li>Set up host &lt;-&gt; VM file sharing (optional) <ul> <li>This part was tried but for now is not working. After implemented the changes suggested (memory backing and file system configurations) the machine does not work, it does not boot.</li> </ul> </li> </ol> <blockquote> <h4 id="useful-commands"><strong>Useful Commands</strong></h4> <ul> <li><code class="language-plaintext highlighter-rouge">lsmod</code> - Show the status of modules in the Linux Kernel, more info <a href="https://manpages.ubuntu.com/manpages/trusty/man8/lsmod.8.html">here</a>.</li> <li><code class="language-plaintext highlighter-rouge">create_vm_virsh</code> - To create a VM with the kernel, initrd, and memory defined in the activate file. This have to be executed once.</li> <li><code class="language-plaintext highlighter-rouge">virsh start --console VM_name</code> - To start a created machine use.</li> <li><code class="language-plaintext highlighter-rouge">virsh list --all</code> - Display all VM availables and their current state.</li> <li><code class="language-plaintext highlighter-rouge">virsh destroy VM_name</code> - Destroy the machine, force to close the machine. It is used when the VM does not response.</li> <li><code class="language-plaintext highlighter-rouge">virsh undefine VM_name</code> - Forget the VM in the manager. This should be executed together iwth destroy.</li> </ul> </blockquote> <h3 id="troubleshooting">Troubleshooting</h3> <h4 id="ssh-configuration">SSH Configuration</h4> <p>In the part 3, if the <code class="language-plaintext highlighter-rouge">/etc/ssh/</code> folder is missing, it indicates that SSH is not installed on the system. To resolve this issue, follow these steps:</p> <ol> <li> <p>Update and upgrade the system packages:</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>apt update <span class="o">&amp;&amp;</span> <span class="nb">sudo </span>apt upgrade
</code></pre></div> </div> </li> <li> <p>Install the OpenSSH server package to enable SSH functionality:</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>apt <span class="nb">install </span>openssh-server
</code></pre></div> </div> </li> </ol> <p>This will download and configure the necessary SSH dependencies, allowing you to establish an SSH connection.</p> <h4 id="destroying-vm">Destroying VM</h4> <p>There is a minor issue when destroying and undefining the VM. After the machine is killed, it may freeze when using the <code class="language-plaintext highlighter-rouge">virsh start</code> command and fail to display the login prompt. However, you can still access the VM via SSH. To resolve this, ensure the VM is properly shut down before destroying it, and verify the VM’s state using <code class="language-plaintext highlighter-rouge">virsh list --all</code>. If the issue persists, consider restarting the <code class="language-plaintext highlighter-rouge">libvirt</code> service:</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>systemctl restart libvirtd
</code></pre></div></div> <p>Additionally, check the VM’s configuration and logs for any inconsistencies that might cause the freeze. The image below shows the problem.</p> <div class="row mt-3" style="width:80%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/vm_1-480.webp 480w,/assets/img/posts/flusp/vm_1-800.webp 800w,/assets/img/posts/flusp/vm_1-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/vm_1.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> An error occurred during the tutorial after destroying the VM and creating it again. </div> <h4 id="shared-memory">Shared Memory</h4> <p>To edit the VM configuration use <code class="language-plaintext highlighter-rouge">EDITOR=vim; virsh edit arm64</code>. As mentioned before, after implemented the suggested configurations the machine does not work, there is an available blog to solve the shared memory issue: <a href="https://discourse.nixos.org/t/virt-manager-cannot-find-virtiofsd/26752/9">Virt-manager cannot find virtiofsd - discourse.nixos</a>. It was tested but does not work`</p> <h3 id="comments">Comments</h3> <p>Although the tutorial introduced powerful tools, their usage is clearly detailed, making them accessible and easy to follow. In my experience, the challenging part was managing the VM with <code class="language-plaintext highlighter-rouge">virsh</code>, as a domain must be properly defined and either closed or shut down to after using, or reset to update changes. On the other hand, despite being an Ubuntu user, I found the image types (qcow2), kernel, initrd, and VM building processes to be entirely new concepts. Considering the environment setup, it was fascinating to define a simple environment with constants and functions, which is somewhat similar to the <code class="language-plaintext highlighter-rouge">.bashrc</code> file in Ubuntu for managing user-specific shell configurations.</p> <blockquote> <p><strong>ADVICE:</strong> Always is requireted to restart the environment after make a change in the activate.sh file.</p> </blockquote> <h3 id="parctical-excersie-ubuntu-jammy-and-amd64-kernels">Parctical excersie: Ubuntu Jammy and AMD64 kernels</h3> <p>As a practical exercise, let’s try to create a VM using the same Debian version but for an AMD64 architecture. The image is at <a href="http://cdimage.debian.org/cdimage/cloud/bookworm/daily/20250217-2026/debian-12-nocloud-amd64-daily-20250217-2026.qcow2">http://cdimage.debian.org/cdimage/cloud/bookworm/daily/20250217-2026/debian-12-nocloud-amd64-daily-20250217-2026.qcow2</a> and use an Ubuntu image. Since the previous image is lightweight, let’s test with a more robust image. To download visit the website <a href="https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-armhf.img">https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-armhf.img</a>. Then, following the same steps explored in the tutorial it is enough to add two new <code class="language-plaintext highlighter-rouge">create_vm_virsh</code> funtions to the activate file environment for each</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">function </span>create_vm_virsh_amd<span class="o">()</span> <span class="o">{</span>
    <span class="nb">sudo </span>virt-install <span class="se">\</span>
      <span class="nt">--name</span> <span class="s2">"amd64"</span> <span class="se">\</span>
      <span class="nt">--memory</span> 4096 <span class="se">\</span>
      <span class="nt">--arch</span> x86_64 <span class="se">\</span>
      <span class="nt">--machine</span> q35 <span class="se">\</span>
      <span class="nt">--osinfo</span> <span class="nv">detect</span><span class="o">=</span>on,require<span class="o">=</span>off <span class="se">\</span>
      <span class="nt">--import</span> <span class="se">\</span>
      <span class="nt">--features</span> <span class="nv">acpi</span><span class="o">=</span>on <span class="se">\</span>
      <span class="nt">--disk</span> <span class="nv">path</span><span class="o">=</span><span class="s2">"</span><span class="k">${</span><span class="nv">VM_DIR</span><span class="k">}</span><span class="s2">/amd64_img.qcow2"</span> <span class="se">\</span>
      <span class="nt">--network</span> bridge:virbr0 <span class="se">\</span>
      <span class="nt">--graphics</span> none <span class="se">\</span>
      <span class="nt">--console</span> pty,target_type<span class="o">=</span>serial
<span class="o">}</span>
</code></pre></div></div> <p>The other function. <code class="language-plaintext highlighter-rouge">create_vm_virsh_ubuntu</code>, is pretty similar to the tutorial exemple but changing the name and disk path.</p> <div class="row mt-3" style="width:80%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/AMD64_vm-480.webp 480w,/assets/img/posts/flusp/AMD64_vm-800.webp 800w,/assets/img/posts/flusp/AMD64_vm-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/AMD64_vm.gif" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Example of AMD 64 VM machine initialization. </div> <blockquote> <h4 id="conclusion"><strong>Conclusion</strong></h4> <p>Although all steps were executed successfully, the Ubuntu machine did not perform as expected. This issue likely stems from the kernel used in the tutorial, which includes numerous updates, configurations, drivers, and components that differ significantly from those in the latest version of Ubuntu Jammy. As for the AMD image, it was successfully created; however, due to a lack of in-depth knowledge about AMD systems, its usage was limited to basic operations.</p> </blockquote> <hr/> <h2 id="tutorial-2-building-and-booting-a-custom-linux-kernel-for-arm-using-kw">Tutorial 2: Building and booting a custom Linux kernel for ARM using kw</h2> <p>In this tutorial, we explore how to build and compile a Linux kernel with an ARM architecture. The kernel is customized and then booted. The source code is obtained from the Linux community and loaded into memory or hardware, with or without virtualization. Four our case since server and host are sharing the resource the VM uses virtualization. The tutorial also explains what a kernel module is and how it can be written, loaded, and unloaded in the system.</p> <p>An important concept introduced is <em>Cross-compilation</em>, a process where code is compiled on one architecture but executed on another. In our case, we use x64 or x86 host systems to compile and test ARM64 systems. Although these architectures differ significantly, the key distinction is that ARM is designed for devices like smartphones and tablets, while x64/x86 systems are typically used in laptops and desktops. ARM offers several advantages, such as energy efficiency, low battery consumption, and performance comparable to common x64 systems.</p> <p>Finally, the <code class="language-plaintext highlighter-rouge">kw</code> software is introduced. This software enables fast and efficient creation and management of virtual machines (VMs), significantly reducing the effort required for setup and configuration.</p> <p>A detailed guide can be found at: <a href="https://flusp.ime.usp.br/kernel/build-linux-for-arm-kw/">Building and booting a custom Linux kernel for ARM using kw</a> written by <a href="https://davidbtadokoro.tech/">David Tadokoro</a>.</p> <h3 id="summary-1">Summary</h3> <ol> <li>Installing kw <ul> <li>Clone the official <code class="language-plaintext highlighter-rouge">kw</code> repository <code class="language-plaintext highlighter-rouge">https://github.com/kworkflow/kworkflow.git</code> and switch for the unstable branch, this branch is also very stable and contains new updates created for the developers that are not included in the main branch.</li> <li>Install the software by executing <code class="language-plaintext highlighter-rouge">setup.sh --full-installation</code>. The flag passed for the isntallation script is for including tne dependencies installation.</li> <li>To update kw use <code class="language-plaintext highlighter-rouge">kw self-update</code> if is the main branch, in other case add <code class="language-plaintext highlighter-rouge">--unestable</code> for update the pacakge respect the unestable branch.</li> </ul> </li> <li>Cloning a Linux kernel tree <ul> <li>Linux kernels can be found in many official places. These repositories are also known as <em>trees</em>, because the software designed is a tree-like hierarchy. You can get more information of the linux by looking the version name. The most updated official tree versions are known as <em>mainline</em>, also as Linus Torvalds’s tree.</li> <li>Download the IIO subsystem tree by cloning the repo <code class="language-plaintext highlighter-rouge">git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git</code>. This repository contains a huge quantity of comments and weveral branches, since it is a educational excersie is enough to download a single branch (testing) and a few commits, the last 10 for example. This is done using git and its flags.</li> </ul> </li> <li>Configure kw in a local context for IIO development <ul> <li>Initialize <code class="language-plaintext highlighter-rouge">kw</code>. This create an isoleted environment for the kernel development, or even create multple environments for a singe tree.</li> <li>Start the libvirt deamon and the default network, to enalbe ssh connection.</li> <li>Start the VM created in the first tutorial with vrish and check the IP for the VM. If everything goes correctly, now you can connect to the machine with <code class="language-plaintext highlighter-rouge">kw ssh</code>.</li> </ul> </li> <li>Configuring the Linux kernel compilation <ul> <li>To customize and module the building process the Kernel Build System is used, it uses <code class="language-plaintext highlighter-rouge">make</code> and other GNU tools, it always generates a <code class="language-plaintext highlighter-rouge">kbuild</code> and <code class="language-plaintext highlighter-rouge">.config</code> files. These files contains information about the modules configurations, between other stuff. In most of the directories of the kernel there are always a <code class="language-plaintext highlighter-rouge">Kconfig</code> file, furthermore there are default configurations, know as <em>deconfig</em> files. In this part, we create default configurations and then update them with new values, both actiosn are executed with make. To do it, the modules list created in the first tutorial is passed to make, to keep the same modules eviroment and make debugging easer.</li> <li>It is possible to edit the <code class="language-plaintext highlighter-rouge">.config</code> files directly although it is not recommended. Instead, a safer and more practical way is to use a Terminal User Interfaces (TUI) provided by kw. It is done with <code class="language-plaintext highlighter-rouge">kw build --menu</code>. The TUI has many advantages specially for new users. To test the TUI a change in the kernel image is done, expanding or modying it. To verify the change check the building information using <code class="language-plaintext highlighter-rouge">kw build --info</code>.</li> </ul> </li> <li>Building a custom Linux kernel <ul> <li>At present there are many manufactures for hardware with different architectures, where everyone has different instructions for reading and integration. As result, it is necesarry to donwload a suitable GCC compiler, for ARM64 architecture. In debian systems the library is <code class="language-plaintext highlighter-rouge">gcc-aarch64-linux-gnu</code>.</li> <li>Add kw configuraitons fo the arch target architecture (ARM64), corss compiler, and kernel image (the one created in the second tutorial with the name <code class="language-plaintext highlighter-rouge">Image.gz</code>). To check if everyting is sucessfully setup use the command <code class="language-plaintext highlighter-rouge">kw condif --show build</code>.</li> <li>The last substep is compile the linux kernel with the local configurations implemented, <code class="language-plaintext highlighter-rouge">kw build</code>.</li> </ul> </li> <li>Installing modules and booting the custom-built Linux kernel <ul> <li>Although the module was created it is still not installed in the VM, it is necessary to move the module objects. This is done with <code class="language-plaintext highlighter-rouge">kw deploy --modules</code>. It is always required when modifying or adding modules.</li> <li>Update the activate script with the new kernel in the launch and create functions. Then, activate or reload the main environment.</li> <li>To implement the changes done it is required to poweroff the VM and remove it from the virsh manager. Then, create it again using the new kernel configurations.</li> <li>Start the VM and check if the changes were sucessfully. This can be done by verifying the kernel version information with <code class="language-plaintext highlighter-rouge">uname --kernel-realse</code>. You have to see the new name with the modifitacion done.</li> <li>For kernel developers the final step is to install the kernel in the machine. This is done via <code class="language-plaintext highlighter-rouge">make install</code>. Nevertheless, since QEMU and libvir are being used they take of via pinking up the kernel image.</li> </ul> </li> </ol> <p>It is possible to use different cross compilers because there are many availables online comming from different vendors.</p> <blockquote> <h4 id="useful-commands-1"><strong>Useful Commands</strong></h4> <ul> <li><code class="language-plaintext highlighter-rouge">kw --version</code> - Print information about the <code class="language-plaintext highlighter-rouge">kw</code> release installed</li> <li><code class="language-plaintext highlighter-rouge">kw build</code> - Compile Linux kernel from source considering local configurations</li> <li><code class="language-plaintext highlighter-rouge">uname</code> - Displays information about the operating system and hardware of a Linux or Unix-like computer</li> <li><code class="language-plaintext highlighter-rouge">virsh net-dhcp-leases default</code> - Check the ip VM</li> </ul> </blockquote> <h3 id="troubleshooting-1">Troubleshooting</h3> <p>There were no important issues. The tutorial was completed sucessfully.</p> <p><strong>NOTE:</strong> Always power off the VM before making any changes or edits to the environment or the <code class="language-plaintext highlighter-rouge">activate.sh</code> file. Failing to do so may result in unexpected issues. This tutorial was completed without errors; the issues encountered were primarily due to improper VM usage, such as skipping the VM reboot step.</p> <h3 id="comments-1">Comments</h3> <p>The tutorial was completed smoothly and without any issues. The installation and configuration of <code class="language-plaintext highlighter-rouge">kw</code> were straightforward. The custom Linux kernel was successfully loaded. One of the most important concepts introduced was the creation and use of the <code class="language-plaintext highlighter-rouge">.config</code> file. This file was generated and configured using <code class="language-plaintext highlighter-rouge">make</code>, along with the VM modules, and managed through <code class="language-plaintext highlighter-rouge">kw</code>’s kernel configuration tools.</p> <p>Another key feature introduced was the <code class="language-plaintext highlighter-rouge">kw menu</code>, a powerful tool for managing VM modules, drivers, and other configurations. This interface simplifies the process of customizing and managing kernel settings.</p> <p>Once everything was properly set up, the final step involved building and deploying the custom kernel with the defined local configurations. Thanks to <code class="language-plaintext highlighter-rouge">kw</code>, this process was remarkably simple, requiring just two command lines to complete.</p> <div class="row mt-3" style="width:80%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/kw-menu-480.webp 480w,/assets/img/posts/flusp/kw-menu-800.webp 800w,/assets/img/posts/flusp/kw-menu-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/kw-menu.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Display the Terminal User Interfaces (TUI) provided by linux, a user friendly interface to make changes in the VM kernel configurations. </div> <hr/> <h2 id="tutorial-3-introduction-to-linux-kernel-build-configuration-and-modules">Tutorial 3: Introduction to Linux kernel build configuration and modules</h2> <p>This tutorial explains how to configure the Linux kernel build process. The configurations are made in the <code class="language-plaintext highlighter-rouge">Kbuild</code> files and through the <code class="language-plaintext highlighter-rouge">kw</code> menu configuration interface. After creating two modules—a simple module and another that calls it—their initialization and exit functions are tested by loading them into the kernel. The process includes verifying module information, loading and unloading the modules, and checking kernel logs to ensure proper functionality.</p> <p>A detailed guide can be found at: <a href="https://flusp.ime.usp.br/kernel/modules-intro/">Introduction to Linux kernel build configuration and modules</a>. Written by <a href="https://linux.ime.usp.br/~marcelosc/">Marcelo Schmitt</a></p> <h3 id="summary-2">Summary</h3> <ol> <li>Creating a simple example module <ul> <li>Start by creating a C code, Linux is written in c and some in assembler. The code contains two static cuztomized functions for initilize and exit, bot are loaded with the kernel libraries and the final lines is the license. The modules are saved at <code class="language-plaintext highlighter-rouge">drivers/misc</code> subfoler.</li> </ul> </li> <li>Creating Linux kernel configuration symbols <ul> <li>Create a Kconfig configuration symble, this means to add some configurations to the Kconfig file. The configuration added has the same name of the module, im lettercases, and attributes (trista, default, help, help, depends on, select) which help the user for more control and setup.</li> <li>Add the module to the list of build objects in the Makefile.</li> </ul> </li> <li>Configuring the Linux kernel build with menuconfig <ul> <li>Enter to the <em>menuconfig</em> and enable the module. Go to general setup, search the module by name, select it, and then enable it to be loaded.</li> <li>Build the image an modules again, update the <code class="language-plaintext highlighter-rouge">Image.gz</code> then mount the VM and isntall the modules, taking in account the customized module</li> <li>Start the VM and acces to it, could be via ssh.</li> <li>Verify the kernel version, <code class="language-plaintext highlighter-rouge">uname --all</code>.</li> </ul> </li> <li>Installing Linux kernel modules <ul> <li>Verify the modules loaded (<code class="language-plaintext highlighter-rouge">modinfo simple_mod</code>) and the smplae mod information (<code class="language-plaintext highlighter-rouge">lsmod</code>).</li> <li>Load the module, module file (.ko), to the running kernel (<code class="language-plaintext highlighter-rouge">insmod path/to/module.ko</code> or <code class="language-plaintext highlighter-rouge">modprobe module_nam</code>). It is also possible to remove the module with <code class="language-plaintext highlighter-rouge">rmmod module_name</code> or <code class="language-plaintext highlighter-rouge">modprobe -r simple_mode</code></li> <li>Display the tail of display message, driver message, to check if the module start and exit functions were executed sucessfully. They have to print the same message defined in the first step.</li> </ul> </li> <li>Dependencies between kernel features <ul> <li>Add a callable function to the module. This function is called from other modules and displaies a simple message that contains the module name. In addition, the init and exit functions are updated to be more dinamycal, print the module name from where there been called.</li> <li>Rebuild the module to update the version in the VM, via scp or kw.</li> <li>Create a new module to call the sample module. This module also contains an init and exit functions. Then, load the new module and test it as same as before, use the <code class="language-plaintext highlighter-rouge">dmesg</code> command to chaick the tail after loading and unloading the module.</li> </ul> </li> </ol> <blockquote> <h4 id="useful-commands-2"><strong>Useful Commands</strong></h4> <ul> <li><code class="language-plaintext highlighter-rouge">make -C "$IIO_TREE" menuconfig</code> - Menuconfig to enable modules and setup kernel configurations.</li> <li><code class="language-plaintext highlighter-rouge">kw build --clean</code> - Clean any artifacts from previous compilations</li> <li><code class="language-plaintext highlighter-rouge">kw build</code> - Build image and modules.</li> <li><code class="language-plaintext highlighter-rouge">dmesg | tail </code> - Show last kernel log messages.</li> <li><code class="language-plaintext highlighter-rouge">modinfo &lt;module_name&gt;</code> - Show information related to the kernel module.</li> <li><code class="language-plaintext highlighter-rouge">insmod &lt;module_name&gt;</code> - Loads module at given location.</li> <li><code class="language-plaintext highlighter-rouge">rmmod &lt;module_name&gt;</code> - Remove kernel module.</li> <li><code class="language-plaintext highlighter-rouge">modprobe &lt;module_name&gt;</code> - Loads module of given name and its dependencies</li> <li><code class="language-plaintext highlighter-rouge">modprobe -r &lt;module_name&gt;</code> - Unloads module of given name</li> </ul> </blockquote> <h3 id="troubleshooting-2">Troubleshooting</h3> <p>There was a simple issue when loading the module. After creating the simple example module, the configuration symbols were added, but the <code class="language-plaintext highlighter-rouge">simple_mod</code> module was not included in the list of build objects. As a result, when attempting to test the module, it failed to load and did not function as expected. This minor error highlights the importance of both steps: configuring symbols and ensuring they are added to the list of build objects.</p> <p>Another issue encountered was related to shutting down and unmanaging the VM. When the VM is shut down and removed from the <code class="language-plaintext highlighter-rouge">kw</code> environment, the SSH connection is forgotten. Although it is still possible to connect using a standard SSH command, it is highly recommended to reconfigure the connection through <code class="language-plaintext highlighter-rouge">kw</code> for a smoother workflow.</p> <h3 id="comments-2">Comments</h3> <p>It was clear how the basic functions of the modules, such as the initialization (<code class="language-plaintext highlighter-rouge">init</code>) and cleanup (<code class="language-plaintext highlighter-rouge">exit</code>) functions, operate. However, a deeper analysis requires more advanced knowledge of the C programming language and hardware interactions. The use of <code class="language-plaintext highlighter-rouge">kw</code> significantly simplifies the configuration process by automatically identifying the kernel image and the IIO tree path.</p> <p>One of the most valuable insights from the results is understanding how the functions are invoked. With the addition of a second module that calls the simple module, the driver messages displayed using <code class="language-plaintext highlighter-rouge">dmesg</code> provide a chronological log of function calls. This log demonstrates the order in which drivers are loaded, reflecting the sequence in which they are listed.</p> <p>It is worth noting that the addition and configuration of modules are performed outside the VM, within the activated environment, directly in the Linux kernel directory. In contrast, the testing and verification of these modules are conducted within the VM environment.</p> <div class="row mt-3" style="width:80%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/vm_2-480.webp 480w,/assets/img/posts/flusp/vm_2-800.webp 800w,/assets/img/posts/flusp/vm_2-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/vm_2.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Example of the <b>menuconfig</b> interface after enabling the custom module. </div> <hr/> <h2 id="tutorial-4-introduction-to-linux-kernel-character-device-drivers">Tutorial 4: Introduction to Linux kernel Character Device Drivers</h2> <p>This tutorial provides an introduction to Linux character devices, complemented by a practical example: a basic character driver. These character devices facilitate sequential data transfer between the user and the system using dynamic data streams. They act as a bridge between software and hardware, managing device operations, data flow, and access.</p> <p>A detailed guide can be found at: <a href="https://flusp.ime.usp.br/kernel/char-drivers-intro/">Introduction to Linux kernel Character Device Drivers</a> written by <a href="https://linux.ime.usp.br/~marcelosc/">Marcelo Schmitt</a></p> <h3 id="summary-3">Summary</h3> <p>The topics cover are:</p> <ol> <li>Character devices</li> <li>Major and Minor Numbers</li> <li>File operations</li> <li>Bringing device IDs and file operations together</li> <li>A character device driver example <ul> <li>Create a C code a</li> </ul> </li> <li>Testing the <code class="language-plaintext highlighter-rouge">simple_char</code> driver</li> </ol> <h3 id="troubleshooting-3">Troubleshooting</h3> <p>The results from the read test program, <code class="language-plaintext highlighter-rouge">Read buffer: �մ��</code>, and the write program, <code class="language-plaintext highlighter-rouge">Error: 9wrote -1 bytes to buffer</code>, were different from what was expected. This discrepancy arises because the implementations are overly simplistic and do not account for hardware characteristics or proper error handling. To address these issues, the programs should be enhanced to include robust error-checking mechanisms and adapt to the specific hardware requirements to ensure accurate and reliable operation.</p> <h3 id="comments-3">Comments</h3> <p>As a new student exploring the Linux kernel, this tutorial provided an excellent overview of key concepts, particularly the structure and functionality of kernel modules. It clarified how modules are created, their purpose, and the process of writing them. While the tutorial included the necessary code, I spent considerable time analyzing and understanding the logic behind many lines. However, the hands-on testing process was invaluable, as it demonstrated how modules can be tested, modified, and integrated into the kernel effectively.</p> <hr/> <h2 id="tutorial-5-the-iio-dummy-simple-anatomy">Tutorial 5: The IIO Dummy Simple Anatomy</h2> <p>This tutorial provides an overview of the IIO Simple Dummy module, a foundational example illustrating how kernel modules are structured and implemented. It covers constants, functions, methods, structures, registers, and more. The complete module can be found on GitHub at <a href="https://github.com/torvalds/linux/tree/master/drivers/iio/dummy">IIO Dummy Module on GitHub</a>. Additional documentation and resources are available on the <a href="https://kernelnewbies.org/IIO_tasks">Welcome to IIO Tasks page</a>, which offers comprehensive details about the module.</p> <p>The tutorial focuses on the key components of a basic kernel module, emphasizing how to read and write data using channels. It also includes a practical example demonstrating the integration of both read and write functionalities. This serves as an excellent starting point for understanding the anatomy of kernel modules and their interaction with the Industrial I/O (IIO) subsystem.</p> <p>A detailed guide can be found at: <a href="https://flusp.ime.usp.br/iio/iio-dummy-anatomy/">The iio_simple_dummy Anatomy</a> written by <a href="https://siqueira.tech/">Rodrigo Siqueira</a>.</p> <h3 id="summary-4">Summary</h3> <p>The tutorial parts are:</p> <ol> <li>The IIO Dummy Channels Setup</li> <li>The <code class="language-plaintext highlighter-rouge">iio_dummy_read_raw()</code> Function</li> <li>The <code class="language-plaintext highlighter-rouge">*write_raw</code> Function</li> <li>Putting Things Together with Probe Function</li> </ol> <h3 id="troubleshooting-4">Troubleshooting</h3> <p>Since the tutorial is mostly theoretical, explaining code concepts and structures, there were no significant issues encountered. The explanations provided were clear and detailed, making it easy to follow along and understand the material.</p> <h3 id="comments-4">Comments</h3> <p>Despite the tutorial covering several topics, the functions contain numerous lines of code and variables, making them challenging to comprehend. Rodrigo has made a commendable and highly appreciated effort in summarizing all the information about the dummy module into a single tutorial. This consolidation is invaluable for new users, saving them significant time and effort that would otherwise be spent searching for this information or directly analyzing the code to understand its structure.</p> <p>Regarding the practical aspects, while the code is well-documented, creating, or mofifying, a module or function remains a significant challenge. It demands a deep understanding of the C programming language and the intricacies of driver operations.</p> <hr/> <h2 id="tutorial-6-sending-patches-by-email-with-git">Tutorial 6: Sending patches by email with git</h2> <p>This tutorial describes how to configure Git to send emails using a Gmail, or any other emails sever. In addition, there is a brief description about the <code class="language-plaintext highlighter-rouge">git send-email</code> command, what flags we are going to use and the meaning of each one. Finally, there are a few tips to test the patch before to sending it, it is highly recommended to avoid send incorrect or wrong styled messages to the main repository.</p> <p>The patch consists of two parts: the cover letter, which is optional but highly recommended, and the message for each commit. These are specified using flags in the <code class="language-plaintext highlighter-rouge">git send-email</code> command. Each commit generates an email containing three sections: the header, the body message, and the code differences between the current code and the proposed changes.</p> <ol> <li> <p><strong>Header</strong>: The header includes essential email metadata such as the sender(s) (<code class="language-plaintext highlighter-rouge">From</code>), recipient (<code class="language-plaintext highlighter-rouge">To</code>), and subject (<code class="language-plaintext highlighter-rouge">Subject</code>). The subject should provide a concise and formal description of the issue being addressed. It is important to use imperative verbs in the subject line, as the changes are presented as actions to be performed. Avoid informal language or unnecessary words. To track patchs use a USP email.</p> </li> <li> <p><strong>Body Message</strong>: The body provides a detailed explanation of the issue and the proposed solution. This section may include longer comments, technical details, and any relevant context to help reviewers understand the changes. Be clear and precise, ensuring the message is informative and professional.</p> </li> <li> <p><strong>Code Differences</strong>: This section displays the differences between the current code and the proposed changes. It highlights the modifications made in the patch, making it easier for reviewers to evaluate the impact of the changes. It is done automatically when using git send email.</p> </li> </ol> <p>By structuring your patch email in this way, you ensure clarity and professionalism, increasing the likelihood of your patch being accepted.</p> <p>A detailed guide can be found at: <a href="https://flusp.ime.usp.br/git/sending-patches-by-email-with-git/">Sending patches by email with git</a> written by <a href="https://matheustavares.dev/">Matheus Tavares</a>.</p> <h3 id="summary-5">Summary</h3> <ol> <li>Setting Git up to send emails</li> <li>How to use <code class="language-plaintext highlighter-rouge">git send-email </code></li> <li>More tips on patch sending</li> </ol> <blockquote> <h4 id="useful-commands-3"><strong>Useful Commands</strong></h4> <ul> <li><code class="language-plaintext highlighter-rouge">git format-patch -1 --stdout | ./scripts/checkpatch.pl --</code> - Check patch code style errors.</li> <li><code class="language-plaintext highlighter-rouge">git send-email -&lt;commits&gt; --dry-run --suppress-cc=all --to=freesoftware2025@gmail.com</code> - Test email sending to course email for verification and feedback. This test but not sent the email, to send it the flag <code class="language-plaintext highlighter-rouge">--dry-run</code> have to be removed.</li> <li><code class="language-plaintext highlighter-rouge">git send-email --annotate --to="teste@email.com" --cc="test_cc@mail.com" -1</code> - Send last patch and open the user editor to modying it.</li> <li><code class="language-plaintext highlighter-rouge">git send-email --annotate --cover-letter --thread --no-chain-reply-to --to="teste@email.com" --cc="mailing@list.com" -3 # for a patchset</code> - Send a patch with some configurations.</li> </ul> </blockquote> <h3 id="troubleshooting-5">Troubleshooting</h3> <p>Since Gmail is being accessed by an external application (a third-party app), it is necessary to enable the connection between Git and Gmail. This can be achieved by adjusting the email’s security settings or using a two-factor authentication method. While the latter option is more secure, it is not available for USP emails. Therefore, USP users can lower their email security settings, whereas other users are strongly encouraged to enable two-factor authentication for enhanced security.</p> <h3 id="comments-5">Comments</h3> <p>The tutorial is clear and more for github users.</p> <hr/> <h2 id="project-1-sending-a-real-patch">Project 1: Sending a Real Patch</h2> <p>As a first practical exercise, let’s send a simple patch to the official Linux kernel. The objective is to contribute to the Linux kernel’s IIO subsystem or DRM AMD subsystem. The task involves creating and submitting a patch (similar to a commit) to the official Linux kernel repository using the corresponding latest developer branch. This process is carried out via a mailing list. To send the email, Git is utilized. For detailed instructions, refer to <a href="#tutorial-6-sending-patches-by-email-with-git">Tutorial 6: Sending patches by email with git</a>.</p> <p>Since students are not required to have deep knowledge of the Linux kernel and its subsystems, the patches suggested by the professor and mentors involve simple modifications to the code. These include code style corrections (though these are less likely to be accepted), removing duplicate code, eliminating unused functions, making small improvements, or other straightforward changes.</p> <blockquote> <p><strong>NOTE</strong>: The goal is to practice creating and submitting patches to the Linux kernel mailing list, not necessarily to have them accepted in the same course period. The focus is on understanding the workflow, adhering to coding standards, and communicating with maintainers.</p> </blockquote> <h3 id="iio-subsystem">IIO Subsystem</h3> <p>A simple patch to start contributing is removing duplicate code or functions. For the IIO subsystem, there are a few functions duplicated in the drivers. One example is located in the driver <strong>hp03</strong>, found at <code class="language-plaintext highlighter-rouge">drivers/iio/pressure/hp03.c</code>. This file contains four identical lines of code:</p> <div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">static</span> <span class="n">bool</span> <span class="nf">hp03_is_writeable_reg</span><span class="p">(</span><span class="k">struct</span> <span class="n">device</span> <span class="o">*</span><span class="n">dev</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">reg</span><span class="p">)</span>
<span class="p">{</span>
   <span class="k">return</span> <span class="nb">false</span><span class="p">;</span>
<span class="p">}</span>

<span class="k">static</span> <span class="n">bool</span> <span class="nf">hp03_is_volatile_reg</span><span class="p">(</span><span class="k">struct</span> <span class="n">device</span> <span class="o">*</span><span class="n">dev</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">reg</span><span class="p">)</span>
<span class="p">{</span>
   <span class="k">return</span> <span class="nb">false</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div> <p>Both functions always return <code class="language-plaintext highlighter-rouge">false</code>, regardless of the register number or device. They are used in a single place within the <code class="language-plaintext highlighter-rouge">hp03_regmap_config</code> structure:</p> <div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">static</span> <span class="k">const</span> <span class="k">struct</span> <span class="n">regmap_config</span> <span class="n">hp03_regmap_config</span> <span class="o">=</span> <span class="p">{</span>
   <span class="p">.</span><span class="n">reg_bits</span>	<span class="o">=</span> <span class="mi">8</span><span class="p">,</span>
   <span class="p">.</span><span class="n">val_bits</span>	<span class="o">=</span> <span class="mi">8</span><span class="p">,</span>

   <span class="p">.</span><span class="n">max_register</span>	<span class="o">=</span> <span class="n">HP03_EEPROM_CD_OFFSET</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span>
   <span class="p">.</span><span class="n">cache_type</span>	<span class="o">=</span> <span class="n">REGCACHE_RBTREE</span><span class="p">,</span>

   <span class="p">.</span><span class="n">writeable_reg</span>	<span class="o">=</span> <span class="n">hp03_is_writeable_reg</span><span class="p">,</span>  <span class="c1">// here</span>
   <span class="p">.</span><span class="n">volatile_reg</span>	<span class="o">=</span> <span class="n">hp03_is_volatile_reg</span><span class="p">,</span>   <span class="c1">// here</span>
<span class="p">};</span>
</code></pre></div></div> <p>A naive solution would be to remove the function lines and directly replace them with <code class="language-plaintext highlighter-rouge">false</code> in the structure. However, this approach breaks the code style and completeness of the kernel driver structure, as all recent drivers are expected to include <code class="language-plaintext highlighter-rouge">writeable</code> and <code class="language-plaintext highlighter-rouge">volatile</code> functions based on the device’s characteristics. These functions are typically implemented based on the device’s datasheet, which defines the register values and possible states. Then, the naive solution may be:</p> <div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">static</span> <span class="k">const</span> <span class="k">struct</span> <span class="n">regmap_config</span> <span class="n">hp03_regmap_config</span> <span class="o">=</span> <span class="p">{</span>
   <span class="p">.</span><span class="n">reg_bits</span>	<span class="o">=</span> <span class="mi">8</span><span class="p">,</span>
   <span class="p">.</span><span class="n">val_bits</span>	<span class="o">=</span> <span class="mi">8</span><span class="p">,</span>

   <span class="p">.</span><span class="n">max_register</span>	<span class="o">=</span> <span class="n">HP03_EEPROM_CD_OFFSET</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span>
   <span class="p">.</span><span class="n">cache_type</span>	<span class="o">=</span> <span class="n">REGCACHE_RBTREE</span><span class="p">,</span>

   <span class="p">.</span><span class="n">writeable_reg</span>	<span class="o">=</span> <span class="nb">false</span><span class="p">,</span>
   <span class="p">.</span><span class="n">volatile_reg</span>	<span class="o">=</span> <span class="nb">false</span><span class="p">,</span>
<span class="p">};</span>
</code></pre></div></div> <p>The <code class="language-plaintext highlighter-rouge">hp03</code> device, dating back to 2007, lacks detailed information about registers or states in its datasheet (<a href="https://www.sensorica.ru/pdf/HP03.pdf">HP03 Series of Calibrated Sensor Module</a>). In contrast, modern devices, such as the BMP280 pressure sensor (<a href="https://cdn-shop.adafruit.com/datasheets/BST-BMP280-DS001-11.pdf">BMP280 Datasheet</a>), provide comprehensive details about registers and states, which are implemented in their <code class="language-plaintext highlighter-rouge">writeable</code> and <code class="language-plaintext highlighter-rouge">volatile</code> functions.</p> <p>This explains why both functions in <code class="language-plaintext highlighter-rouge">hp03.c</code> return <code class="language-plaintext highlighter-rouge">false</code> and why any changes are not suitable in this case. The <code class="language-plaintext highlighter-rouge">hp03</code> device, introduced in 2007, lacks detailed register or state information in its datasheet (<a href="https://www.sensorica.ru/pdf/HP03.pdf">HP03 Series of Calibrated Sensor Module</a>). Consequently, the functions <code class="language-plaintext highlighter-rouge">hp03_is_writeable_reg</code> and <code class="language-plaintext highlighter-rouge">hp03_is_volatile_reg</code> are implemented to always return <code class="language-plaintext highlighter-rouge">false</code>, as there is no additional information to define specific behavior for these registers.</p> <p>In contrast, modern devices, such as the BMP280 pressure sensor (<a href="https://cdn-shop.adafruit.com/datasheets/BST-BMP280-DS001-11.pdf">BMP280 Datasheet</a>), provide comprehensive details about registers and states. These details allow for the implementation of more sophisticated <code class="language-plaintext highlighter-rouge">writeable</code> and <code class="language-plaintext highlighter-rouge">volatile</code> functions based on the device’s characteristics. For the <code class="language-plaintext highlighter-rouge">hp03</code> driver, however, any attempt to modify these functions without additional technical information would be inappropriate and could lead to incorrect behavior.</p> <h4 id="patch">Patch</h4> <div class="row mt-3" style="width:100%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/patch_iio-480.webp 480w,/assets/img/posts/flusp/patch_iio-800.webp 800w,/assets/img/posts/flusp/patch_iio-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/patch_iio.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/patch_iio_answer-480.webp 480w,/assets/img/posts/flusp/patch_iio_answer-800.webp 800w,/assets/img/posts/flusp/patch_iio_answer-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/patch_iio_answer.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> </div> <p>Because the changes are too simple and generate some warnings, which I was not able to detect, the patch is not accepted. You can view the mail sent at <a href="https://lore.kernel.org/linux-iio/20250429184129.7aff4461@jic23-huawei/">https://lore.kernel.org/linux-iio/20250429184129.7aff4461@jic23-huawei/</a>.</p> <div class="row mt-3" style="width:100%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/patch_IIO_answer_1-480.webp 480w,/assets/img/posts/flusp/patch_IIO_answer_1-800.webp 800w,/assets/img/posts/flusp/patch_IIO_answer_1-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/patch_IIO_answer_1.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/patch_IIO_answer_2-480.webp 480w,/assets/img/posts/flusp/patch_IIO_answer_2-800.webp 800w,/assets/img/posts/flusp/patch_IIO_answer_2-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/patch_IIO_answer_2.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Responses from Jonathan Cameron, the maintainer of the IIO subsystem kernel. </div> <h3 id="drm-amd-subsystem">DRM AMD Subsystem</h3> <p>The process done here is based in the patch <a href="https://lore.kernel.org/all/20250225015532.303032-1-luanicaro@usp.br/#Z31display:dc:bios:command_table_helper.h">https://lore.kernel.org/all/20250225015532.303032-1-luanicaro@usp.br/#Z31display:dc:bios:command_table_helper.h</a> developed by Luan Icaro Pinto Arcanjo <a href="mailto:luanicaro@usp.br">luanicaro@usp.br</a> where he removes some duplications of the amd subsystem.</p> <p>Because the IIO contribution is too simple, the focus patch shifted to another subsystem requiring less technical knowledge, specifically the DRM AMD Linux subsystem, to identify and address duplicate code lines. Using the <code class="language-plaintext highlighter-rouge">arkanjo</code> tool on the path <code class="language-plaintext highlighter-rouge">linux/drivers/gpu/drm/amd</code>, the following results were obtained with 100 % of similarity:</p> <ul> <li><a href="../../../assets/text/duplicados_amd_drm.txt"><code class="language-plaintext highlighter-rouge">duplicados_amd_drm.txt</code></a>: A report generated by <code class="language-plaintext highlighter-rouge">arkanjo</code> listing the number of repeated lines in descending order.</li> <li><a href="../../../assets/text/output_parsed.txt"><code class="language-plaintext highlighter-rouge">output_parsed.txt</code></a>: A parsed output listing files with duplicated code, separated by spaces and followed by their similarity coefficient, also ordered in descending order.</li> </ul> <p>These results provide a starting point for identifying and addressing duplicate code in the DRM AMD subsystem, offering a more suitable opportunity for a beginner-level contribution. In summary, there are two functions duplicated many times on the <code class="language-plaintext highlighter-rouge">linux/drivers/gpu/drm/amd/display/dc/irq/dc</code>.</p> <ol> <li> <p>The <code class="language-plaintext highlighter-rouge">hpd_ack()</code> function acknowledges a display hotplug (HPD) interrupt by reading the HPD status, clearing the interrupt, and flipping the interrupt polarity to detect the next plug/unplug event, ensuring proper handling of display connections.</p> <div class="language-c highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">bool</span> <span class="nf">hpd_ack</span><span class="p">(</span>
   <span class="k">struct</span> <span class="n">irq_service</span> <span class="o">*</span><span class="n">irq_service</span><span class="p">,</span>
   <span class="k">const</span> <span class="k">struct</span> <span class="n">irq_source_info</span> <span class="o">*</span><span class="n">info</span><span class="p">)</span>
<span class="p">{</span>
   <span class="kt">uint32_t</span> <span class="n">addr</span> <span class="o">=</span> <span class="n">info</span><span class="o">-&gt;</span><span class="n">status_reg</span><span class="p">;</span>
   <span class="kt">uint32_t</span> <span class="n">value</span> <span class="o">=</span> <span class="n">dm_read_reg</span><span class="p">(</span><span class="n">irq_service</span><span class="o">-&gt;</span><span class="n">ctx</span><span class="p">,</span> <span class="n">addr</span><span class="p">);</span>
   <span class="kt">uint32_t</span> <span class="n">current_status</span> <span class="o">=</span>
      <span class="n">get_reg_field_value</span><span class="p">(</span>
         <span class="n">value</span><span class="p">,</span>
         <span class="n">HPD0_DC_HPD_INT_STATUS</span><span class="p">,</span>
         <span class="n">DC_HPD_SENSE_DELAYED</span><span class="p">);</span>

   <span class="n">dal_irq_service_ack_generic</span><span class="p">(</span><span class="n">irq_service</span><span class="p">,</span> <span class="n">info</span><span class="p">);</span>

   <span class="n">value</span> <span class="o">=</span> <span class="n">dm_read_reg</span><span class="p">(</span><span class="n">irq_service</span><span class="o">-&gt;</span><span class="n">ctx</span><span class="p">,</span> <span class="n">info</span><span class="o">-&gt;</span><span class="n">enable_reg</span><span class="p">);</span>

   <span class="n">set_reg_field_value</span><span class="p">(</span>
      <span class="n">value</span><span class="p">,</span>
      <span class="n">current_status</span> <span class="o">?</span> <span class="mi">0</span> <span class="o">:</span> <span class="mi">1</span><span class="p">,</span>
      <span class="n">HPD0_DC_HPD_INT_CONTROL</span><span class="p">,</span>
      <span class="n">DC_HPD_INT_POLARITY</span><span class="p">);</span>

   <span class="n">dm_write_reg</span><span class="p">(</span><span class="n">irq_service</span><span class="o">-&gt;</span><span class="n">ctx</span><span class="p">,</span> <span class="n">info</span><span class="o">-&gt;</span><span class="n">enable_reg</span><span class="p">,</span> <span class="n">value</span><span class="p">);</span>

   <span class="k">return</span> <span class="nb">true</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div> </div> </li> <li> <p>The <code class="language-plaintext highlighter-rouge">to_dal_irq_source_dcnX()</code> function maps hardware-specific interrupt source IDs (<code class="language-plaintext highlighter-rouge">src_id</code> and <code class="language-plaintext highlighter-rouge">ext_id</code>) to standardized <code class="language-plaintext highlighter-rouge">dc_irq_source</code> values, handling cases like VBLANK events, page flips, VLINE interrupts, HPD signals, and DMCUB notifications for display control on AMD DCNX GPUs. If no match is found, it returns <code class="language-plaintext highlighter-rouge">DC_IRQ_SOURCE_INVALID</code>.</p> </li> </ol> <p>Both functions are located at the interrupt request (IRQ) module inside the <a href="https://www.kernel.org/doc/html/next/gpu/amdgpu/display/index.html">Display Core (DC)</a> linux drive. The same function is writen in many files with different <a href="https://www.kernel.org/doc/html/next/gpu/amdgpu/display/dcn-overview.html">Display Core Next (DCN)</a> number and have exactly the same code lines. Those duplications are a good patch to send because may remove houndreds lines of code.</p> <h4 id="patch-1">Patch</h4> <h5 id="version-1">Version 1</h5> <p>The patch is reviewed by Alex Hung. The changes generate some code style warnings and was not tested in building.</p> <div class="row mt-3 d-flex align-items-center" style="width:100%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/patch_amd-480.webp 480w,/assets/img/posts/flusp/patch_amd-800.webp 800w,/assets/img/posts/flusp/patch_amd-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/patch_amd.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/patch_amd_response-480.webp 480w,/assets/img/posts/flusp/patch_amd_response-800.webp 800w,/assets/img/posts/flusp/patch_amd_response-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/patch_amd_response.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> First version of the patch. Left side patch sent and right side review recived. </div> <p>You can view the mail sent at <a href="https://lore.kernel.org/amd-gfx/f78f68ba-80e0-47ca-97a2-37a15d076e68@amd.com/">https://lore.kernel.org/amd-gfx/f78f68ba-80e0-47ca-97a2-37a15d076e68@amd.com/</a>.</p> <p>The patch was accepted and included in the official repository by Alex Hung 🎉.</p> <h5 id="version-2">Version 2</h5> <p>The patch is build and code styles warnings are removed. There is still a warning because the email is sent from a different email from it was signed off, the problem is related to the USP server inestability.</p> <div class="row mt-3 d-flex align-items-center" style="width:100%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/patch2_amd-480.webp 480w,/assets/img/posts/flusp/patch2_amd-800.webp 800w,/assets/img/posts/flusp/patch2_amd-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/patch2_amd.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/patch2_0_amd_response-480.webp 480w,/assets/img/posts/flusp/patch2_0_amd_response-800.webp 800w,/assets/img/posts/flusp/patch2_0_amd_response-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/patch2_0_amd_response.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> <br/> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/patch2_1_amd_response-480.webp 480w,/assets/img/posts/flusp/patch2_1_amd_response-800.webp 800w,/assets/img/posts/flusp/patch2_1_amd_response-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/patch2_1_amd_response.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Second version of the patch. Left side patch sent and right side review recived. THe patch is accepted. </div> <p>You can view the mail sent at <a href="https://lore.kernel.org/amd-gfx/f8299b44-1a11-431d-8c04-b0cb44b0b832@amd.com/">https://lore.kernel.org/amd-gfx/f8299b44-1a11-431d-8c04-b0cb44b0b832@amd.com/</a>.</p> <hr/> <h2 id="project-2-contribution-to-arkanjo">Project 2: Contribution to <a href="https://github.com/LipArcanjo/arkanjo/">Arkanjo</a></h2> <p>For the second phase of the course, I chose to contribute to <a href="https://github.com/LipArcanjo/arkanjo/">Arkanjo</a>, a tool for detecting duplicated functions in codebases. My contributions included:</p> <h3 id="1-resolution-of-issue-1">1. Resolution of Issue <a href="https://github.com/LipArcanjo/arkanjo/issues/1">#1</a></h3> <p>This issue concerned a color rendering bug in the output text results. The original implementation was optimized for dark terminal backgrounds, resulting in poor contrast and visibility when used with light themes. My solution involved:</p> <ul> <li>Implementing two distinct color sets for light and dark terminal backgrounds</li> <li>Creating three platform-specific utility files: <code class="language-plaintext highlighter-rouge">linux_utils</code>, <code class="language-plaintext highlighter-rouge">windows_utils</code>, and <code class="language-plaintext highlighter-rouge">apple_utils</code>. Each file contains a <code class="language-plaintext highlighter-rouge">UtilsOSDependable</code> class with functions to: <ul> <li>Detect terminal background color (in RGB format)</li> <li>Parse rgb colors and covert them to float data type</li> <li>Calculate color luminance (perceptual brightness)</li> <li>Others auxiliar functions</li> </ul> </li> </ul> <p>The solution has been tested on Linux (Ubuntu 24) and Windows environments, with Apple platform testing pending. The initial pull request has been accepted, though some bug fixes remain under review. A second pull request is currently undergoing evaluation.</p> <div class="row mt-3 d-flex align-items-center" style="width:100%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/arkanjo_dark-480.webp 480w,/assets/img/posts/flusp/arkanjo_dark-800.webp 800w,/assets/img/posts/flusp/arkanjo_dark-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/arkanjo_dark.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/arkanjo_ligth-480.webp 480w,/assets/img/posts/flusp/arkanjo_ligth-800.webp 800w,/assets/img/posts/flusp/arkanjo_ligth-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/arkanjo_ligth.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Testing colors change depending on the terminal background color. Tested on Linux and Windows. </div> <h3 id="2-documentation-enhancement">2. Documentation Enhancement</h3> <p>I developed comprehensive documentation for the tool using <a href="https://www.doxygen.nl/">Doxygen</a>, a widely-used documentation generator that offers:</p> <ul> <li>Extensive customization options</li> <li>Rapid build process</li> <li>Multi-language support (C, C++, Python, Java, Fortran)</li> <li>Regular updates</li> <li>Similar functionality to Python’s Sphinx, but with broader language support</li> </ul> <p>Implementation details:</p> <ul> <li>All header files were annotated following Doxygen best practices</li> <li>Documentation includes detailed descriptions of: files, functions, parameters, and namespaces.</li> </ul> <p>The documentation system features:</p> <ul> <li>Automated builds via GitHub Actions (<a href="https://github.com/LipArcanjo/arkanjo/blob/main/.github/workflows/main.yml">workflow file</a>)</li> <li>Deployment through GitHub Pages</li> </ul> <p>A preview of the documentation is currently available at: <a href="https://saguileran.github.io/arkanjo/html/">https://saguileran.github.io/arkanjo/html/</a> Final deployment to the main repository is pending configuration.</p> <p>Additional improvements needed include:</p> <ul> <li>Code structure refinements</li> <li>Enhanced diagram documentation</li> </ul> <h4 id="final-result">Final Result</h4> <div class="row mt-3 d-flex align-items-center" style="width:100%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/arkanjo_doc-480.webp 480w,/assets/img/posts/flusp/arkanjo_doc-800.webp 800w,/assets/img/posts/flusp/arkanjo_doc-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/arkanjo_doc.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/doxygen_theme-480.webp 480w,/assets/img/posts/flusp/doxygen_theme-800.webp 800w,/assets/img/posts/flusp/doxygen_theme-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/doxygen_theme.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Left: New Arkanjo documentation website, built with Doxygen. Right: Awesome Doxygen theme, a modern, minimalist, and fresh alternative. </div> <p>Although Doxygen offers customization, it is mostly limited to theme layout components, and the overall style remains largely unchanged. As an alternative, there is Awesome Doxygen—a minimalist and modern theme with both light and dark color schemes. Its style is similar to the <a href="https://sphinx-themes.org/sample-sites/sphinx-book-theme/">Sphinx Book theme</a>. However, in practice, Awesome Doxygen did not render colors and shapes correctly, likely because the theme is not fully compatible with all Doxygen versions.</p> <hr/> <h2 id="project-3-contributions-to-open-source-projects">Project 3: Contributions to Open Source Projects</h2> <p>In the third part of the course (Project 3), I contributed to two different open source projects.</p> <h3 id="contributing-to-debian">Contributing to Debian</h3> <p>This activity aimed to teach how to contribute to the Debian operating system, covering:</p> <ul> <li>The anatomy of the OS</li> <li>Mandatory and optional files in repositories</li> <li>Package composition</li> <li>Sending patches to the Debian community</li> </ul> <p>The workshop was divided into steps:</p> <ol> <li> <p><strong>Preparing the environment</strong> to test packages, following the tutorial <a href="https://debianbrasil.org.br/pt-br/empacotamento/configurando-seu-ambiente">Setting Up Your Development Environment</a>. The OS was deployed using QEMU and virsh, as in the first part of the course.</p> <p>Code to create the VM with <a href="https://cdimage.debian.org/cdimage/cloud/bookworm/daily/20250603-2132/debian-12-nocloud-amd64-daily-20250603-2132.qcow2">Debian 12 - nocloud - amd</a>:</p> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">function </span>create_vm_virsh_debian<span class="o">()</span> <span class="o">{</span>
   <span class="nb">sudo </span>virt-install <span class="se">\</span>
      <span class="nt">--name</span> <span class="s2">"debian"</span> <span class="se">\</span>
      <span class="nt">--memory</span> 4096 <span class="se">\</span>
      <span class="nt">--arch</span> x86_64 <span class="se">\</span>
      <span class="nt">--machine</span> q35 <span class="se">\</span>
      <span class="nt">--osinfo</span> <span class="nv">detect</span><span class="o">=</span>on,require<span class="o">=</span>off <span class="se">\</span>
      <span class="nt">--import</span> <span class="se">\</span>
      <span class="nt">--features</span> <span class="nv">acpi</span><span class="o">=</span>on <span class="se">\</span>
      <span class="nt">--disk</span> <span class="nv">path</span><span class="o">=</span><span class="s2">"</span><span class="k">${</span><span class="nv">VM_DIR</span><span class="k">}</span><span class="s2">/debian12.qcow2"</span> <span class="se">\</span>
      <span class="nt">--network</span> bridge:virbr0 <span class="se">\</span>
      <span class="nt">--graphics</span> none <span class="se">\</span>
      <span class="nt">--console</span> pty,target_type<span class="o">=</span>serial
<span class="o">}</span>
<span class="nb">export</span> <span class="nt">-f</span> create_vm_virsh_debian
</code></pre></div> </div> <p>Note: This was added to the <code class="language-plaintext highlighter-rouge">activate.sh</code> script. It is necessary to increase the disk space to at least 6GB to install the required libraries.</p> </li> <li><strong>Package selection</strong> for simple modifications, version update, and changelog file: <ul> <li>Chosen package: <strong>ruby-json</strong></li> <li>CSV tracker: <a href="https://tracker.debian.org/pkg/ruby-json">https://tracker.debian.org/pkg/ruby-json</a></li> <li>Official repository: <a href="https://salsa.debian.org/ruby-team/ruby-json">https://salsa.debian.org/ruby-team/ruby-json</a></li> </ul> <p>Complete package list available on the <a href="https://pad.riseup.net/p/dsl2025-debian-packaging-keep">main course pad</a>.</p> </li> <li><strong>Issue creation</strong> (<a href="https://salsa.debian.org/debian-brasil-team/docs/-/issues/500">issue</a>) in the official docs repository</li> <li><strong>Build</strong> the software for testing.</li> <li><strong>Send the patch</strong> with the updates.</li> <li><strong>Create a pull request</strong>: <a href="https://salsa.debian.org/ruby-team/ruby-json/-/merge_requests/1">Merge request - Update standards-version</a>.</li> </ol> <blockquote> <h4 id="used-commands">Used Commands</h4> <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gbp clone git@salsa.debian.org:saguileran/ruby-json.git  <span class="c"># clone all branches</span>
git checkout pristine-tar                                <span class="c"># use in case of problems</span>
gbp dch                                                  <span class="c"># create updated changelog</span>
gbp buildpackage                                         <span class="c"># build package</span>
git push                                                 <span class="c"># push changes</span>
</code></pre></div> </div> </blockquote> <h4 id="final-result-1">Final Result</h4> <div class="row mt-3 d-flex align-items-center" style="width:100%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/result_debia_pacote-480.webp 480w,/assets/img/posts/flusp/result_debia_pacote-800.webp 800w,/assets/img/posts/flusp/result_debia_pacote-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/result_debia_pacote.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/debian_approved-480.webp 480w,/assets/img/posts/flusp/debian_approved-800.webp 800w,/assets/img/posts/flusp/debian_approved-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/debian_approved.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Left: Final output of the `ruby-json` Debian package build process. Average build time: approximately 12 minutes.. Right: Pull request approved and successfully merged into the official repository. </div> <blockquote> <p>The workshop was excellent and successfully completed without any problems, thanks to the tutors. There was a minor error detected by lintian, but it can be ignored. Although there is a lot of information about Debian packaging, this short workshop gave me a clear overview of the process and the knowledge required to contribute.</p> </blockquote> <h3 id="contributing-to-scikit-maad">Contributing to scikit-maad</h3> <p><a href="https://scikit-maad.github.io/"><strong>scikit-maad</strong></a> is an open-source Python package designed for the quantitative analysis of environmental audio recordings, serving as a comprehensive toolkit for scientists interested in soundscape ecology. The project was initiated in 2021 by <a href="https://juansulloa.github.io/">Juan Sebastián Ulloa</a>, a researcher at the <a href="https://www.humboldt.org.co/">Instituto de Investigación de Recursos Biológicos Alexander von Humboldt</a> in Colombia, along with other collaborators.</p> <p>My contributions involve addressing some of the <a href="https://github.com/scikit-maad/scikit-maad/issues">open issues</a> in the package.</p> <div class="row mt-3 d-flex align-items-center" style="width:80%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/maad_issues-480.webp 480w,/assets/img/posts/flusp/maad_issues-800.webp 800w,/assets/img/posts/flusp/maad_issues-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/maad_issues.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> </div> <p>Additionally, after reaching out to Sebastián, he suggested expanding the package’s functionality by implementing new features related to spectrogram analysis, specifically functions for computing mel-spectrograms, Mel-Frequency Cepstral Coefficients (MFCC), and Linear Frequency Cepstral Coefficients (LFCC), which are currently missing from the toolkit.</p> <p>A spectrogram is a visual representation of the frequency content of an audio signal over time. Various types of spectrograms exist, each offering a unique perspective and extracting different features from the audio. While all are derived from the raw spectrogram, they apply different transformations to highlight specific characteristics. The relationships among these representations are illustrated below:</p> <div class="row mt-3 d-flex align-items-center" style="width:60%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/posts/flusp/torchaudio_feature_extractions-480.webp 480w,/assets/img/posts/flusp/torchaudio_feature_extractions-800.webp 800w,/assets/img/posts/flusp/torchaudio_feature_extractions-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/posts/flusp/torchaudio_feature_extractions.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> </div> <h4 id="example">Example</h4> <p>Let’s see an example of a spectrogram generated from an audio recording:</p> <ul> <li>The original audio waveform shows amplitude over time.</li> <li>The spectrogram transforms this into a time-frequency plot, where brighter or more intense colors indicate higher energy at specific frequencies and times.</li> </ul> <p>Below, you can listen to an audio sample and see its corresponding spectrogram and related feature representations.</p> <div class="row mt-3 justify-content-center"> <div class="col-sm mt-3 mt-md-0 d-flex justify-content-center"> <figure> <audio src="/assets/audio/BpZC57J7.wav" controls=""/> </figure> </div> </div> <div class="caption text-center"> Audio sample with a recording of human voice syaing: *"I have that curiosity beside me at this moment"*. </div> <div class="row mt-3 d-flex align-items-center" style="width:100%; margin: 0 auto 0 auto;"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_001-480.webp 480w,https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_001-800.webp 800w,https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_001-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_001.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_007-480.webp 480w,https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_007-800.webp 800w,https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_007-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_007.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_009-480.webp 480w,https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_009-800.webp 800w,https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_009-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_009.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_011-480.webp 480w,https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_011-800.webp 800w,https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_011-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="https://docs.pytorch.org/audio/master/_images/sphx_glr_audio_feature_extractions_tutorial_011.png" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> Images taken and modified from the Pytorch tutorial <a href="https://docs.pytorch.org/audio/master/tutorials/audio_feature_extractions_tutorial.html#sphx-glr-tutorials-audio-feature-extractions-tutorial-py">Audio Feature Extractions</a> </div> <h2 id="final-comments">Final Comments</h2> <p>At first, the course seemed challenging due to the unfamiliar languages and tools involved, particularly regarding VM setup and deployment. However, since I had prior experience with Ubuntu, I was able to overcome these difficulties successfully—thanks in large part to the helpful monitors, whom I deeply appreciate.</p> <p>The first project proved difficult because I spent too much time deciding how to refactor the code. I initially chose to work on an IIO kernel patch with a simple but tricky change, which I implemented. However, my submission was rejected due to introduced warnings and errors. As a backup plan, I used Arkanjo to search for code duplications and discovered several in the AMD DMR subsystem. There, I removed nearly 500 lines of redundant code, and this time, my patch was accepted quickly.</p> <p>For the second part, I selected Arkanjo—a tool developed at IME—which I explored in depth. I resolved one issue and added robust documentation. While the code changes were applied, the documentation deployment remains pending because pushing to the official repository requires owner permissions, which I don’t have. As a solution, we proposed creating an organization, but this is still in progress.</p> <p>The final project workshop was well-structured and guided, so I encountered no major issues. Additionally, as supplementary work, I spoke with Professor Paulo about contributing to an open-source project from Colombia (scikit-maad), which was my primary motivation for taking the course. While my contributions are complete, they have yet to be published.</p> <p>Overall, I enjoyed the course because most of the work was hands-on, and the proposed activities provided an excellent introduction to contributing to both small and large open-source projects. The foundational theory was clear and helped clarify concepts like “free” vs. “open” software. The classes were engaging and productive, thanks to active discussions among students, professors, and monitors. Personally, I highly recommend this course.</p> <blockquote> <p>As a final comment I want to recommend the <a href="https://github.com/alshedivat/al-folio"><strong>al-folio</strong></a> website theme, <em>“a beautiful, simple, clean, and responsive Jekyll theme for academics”</em>. It is a great tool with highly customing, look the deployed <a href="https://alshedivat.github.io/al-folio/">website</a> for more information.</p> </blockquote>]]></content><author><name></name></author><category term="free software"/><category term="usp"/><category term="mac-courses"/><summary type="html"><![CDATA[Logbook and notes for the free software development course at IME-USP, 2025-1]]></summary></entry><entry><title type="html">Birds, birds, and more birds</title><link href="https://saguileran.github.io/blog/2024/birds_in_everywhere/" rel="alternate" type="text/html" title="Birds, birds, and more birds"/><published>2024-06-24T21:01:00+00:00</published><updated>2024-06-24T21:01:00+00:00</updated><id>https://saguileran.github.io/blog/2024/birds_in_everywhere</id><content type="html" xml:base="https://saguileran.github.io/blog/2024/birds_in_everywhere/"><![CDATA[<p>This is an example post with image galleries.</p> <div class="row mt-3"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/9-480.webp 480w,/assets/img/9-800.webp 800w,/assets/img/9-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/9.jpg" class="img-fluid rounded z-depth-1" width="100%" height="auto" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/7-480.webp 480w,/assets/img/7-800.webp 800w,/assets/img/7-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/7.jpg" class="img-fluid rounded z-depth-1" width="100%" height="auto" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <div class="caption"> A simple, elegant caption looks good between image rows, after each row, or doesn't have to be there at all. </div> <p>Images can be made zoomable. Simply add <code class="language-plaintext highlighter-rouge">data-zoomable</code> to <code class="language-plaintext highlighter-rouge">&lt;img&gt;</code> tags that you want to make zoomable.</p> <div class="row mt-3"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/8-480.webp 480w,/assets/img/8-800.webp 800w,/assets/img/8-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/8.jpg" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/10-480.webp 480w,/assets/img/10-800.webp 800w,/assets/img/10-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/10.jpg" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="eager" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div> <p>The rest of the images in this post are all zoomable, arranged into different mini-galleries.</p> <div class="row mt-3"> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/11-480.webp 480w,/assets/img/11-800.webp 800w,/assets/img/11-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/11.jpg" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="lazy" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/12-480.webp 480w,/assets/img/12-800.webp 800w,/assets/img/12-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/12.jpg" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="lazy" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> <div class="col-sm mt-3 mt-md-0"> <figure> <picture> <source class="responsive-img-srcset" srcset="/assets/img/7-480.webp 480w,/assets/img/7-800.webp 800w,/assets/img/7-1400.webp 1400w," type="image/webp" sizes="95vw"/> <img src="/assets/img/7.jpg" class="img-fluid rounded z-depth-1" width="100%" height="auto" data-zoomable="" loading="lazy" onerror="this.onerror=null; $('.responsive-img-srcset').remove();"/> </picture> </figure> </div> </div>]]></content><author><name></name></author><category term="birds"/><category term="art"/><category term="images"/><summary type="html"><![CDATA[Birds and graffiti]]></summary></entry><entry><title type="html">Google Gemini updates: Flash 1.5, Gemma 2 and Project Astra</title><link href="https://saguileran.github.io/blog/2024/google-gemini-updates-flash-15-gemma-2-and-project-astra/" rel="alternate" type="text/html" title="Google Gemini updates: Flash 1.5, Gemma 2 and Project Astra"/><published>2024-05-14T00:00:00+00:00</published><updated>2024-05-14T00:00:00+00:00</updated><id>https://saguileran.github.io/blog/2024/google-gemini-updates-flash-15-gemma-2-and-project-astra</id><content type="html" xml:base="https://saguileran.github.io/blog/2024/google-gemini-updates-flash-15-gemma-2-and-project-astra/"><![CDATA[<p>Learn more:Learn more:Learn more:Learn more:Learn more:Learn more:May 14, 2024 We’re introducing a series of updates across the Gemini family of models, including the new 1.5 Flash, our lightweight model for speed and efficiency, and Project Astra, our vision for the future of AI assistants. In December, we launched our first natively multimodal model Gemini 1.0 in three sizes: Ultra, Pro and Nano. Just a few months later we released 1.5 Pro, with enhanced performance and a breakthrough long context window of 1 million tokens.Developers and enterprise customers have been putting 1.5 Pro to use in incredible ways and finding its long context window, multimodal reasoning capabilities and impressive overall performance incredibly useful.We know from user feedback that some applications need lower latency and a lower cost to serve. This inspired us to keep innovating, so today, we’re introducing Gemini 1.5 Flash: a model that’s lighter-weight than 1.5 Pro, and designed to be fast and efficient to serve at scale.Both 1.5 Pro and 1.5 Flash are available in public preview with a 1 million token context window in Google AI Studio and Vertex AI. And now, 1.5 Pro is also available with a 2 million token context window via waitlist to developers using the API and to Google Cloud customers.We’re also introducing updates across the Gemini family of models, announcing our next generation of open models, Gemma 2, and sharing progress on the future of AI assistants, with Project Astra.Context lengths of leading foundation models compared with Gemini 1.5’s 2 million token capability1.5 Flash is the newest addition to the Gemini model family and the fastest Gemini model served in the API. It’s optimized for high-volume, high-frequency tasks at scale, is more cost-efficient to serve and features our breakthrough long context window.While it’s a lighter weight model than 1.5 Pro, it’s highly capable of multimodal reasoning across vast amounts of information and delivers impressive quality for its size.The new Gemini 1.5 Flash model is optimized for speed and efficiency, is highly capable of multimodal reasoning and features our breakthrough long context window.1.5 Flash excels at summarization, chat applications, image and video captioning, data extraction from long documents and tables, and more. This is because it’s been trained by 1.5 Pro through a process called “distillation,” where the most essential knowledge and skills from a larger model are transferred to a smaller, more efficient model.Read more about 1.5 Flash in our updated Gemini 1.5 technical report, on the Gemini technology page, and learn about 1.5 Flash’s availability and pricing.Over the last few months, we’ve significantly improved 1.5 Pro, our best model for general performance across a wide range of tasks.Beyond extending its context window to 2 million tokens, we’ve enhanced its code generation, logical reasoning and planning, multi-turn conversation, and audio and image understanding through data and algorithmic advances. We see strong improvements on public and internal benchmarks for each of these tasks.1.5 Pro can now follow increasingly complex and nuanced instructions, including ones that specify product-level behavior involving role, format and style. We’ve improved control over the model’s responses for specific use cases, like crafting the persona and response style of a chat agent or automating workflows through multiple function calls. And we’ve enabled users to steer model behavior by setting system instructions.We added audio understanding in the Gemini API and Google AI Studio, so 1.5 Pro can now reason across image and audio for videos uploaded in Google AI Studio. And we’re now integrating 1.5 Pro into Google products, including Gemini Advanced and in Workspace apps.Read more about 1.5 Pro in our updated Gemini 1.5 technical report and on the Gemini technology page.Gemini Nano is expanding beyond text-only inputs to include images as well. Starting with Pixel, applications using Gemini Nano with Multimodality will be able to understand the world the way people do — not just through text, but also through sight, sound and spoken language.Read more about Gemini 1.0 Nano on Android.Today, we’re also sharing a series of updates to Gemma, our family of open models built from the same research and technology used to create the Gemini models.We’re announcing Gemma 2, our next generation of open models for responsible AI innovation. Gemma 2 has a new architecture designed for breakthrough performance and efficiency, and will be available in new sizes.The Gemma family is also expanding with PaliGemma, our first vision-language model inspired by PaLI-3. And we’ve upgraded our Responsible Generative AI Toolkit with LLM Comparator for evaluating the quality of model responses.Read more on the Developer blog.As part of Google DeepMind’s mission to build AI responsibly to benefit humanity, we’ve always wanted to develop universal AI agents that can be helpful in everyday life. That’s why today, we’re sharing our progress in building the future of AI assistants with Project Astra (advanced seeing and talking responsive agent).To be truly useful, an agent needs to understand and respond to the complex and dynamic world just like people do — and take in and remember what it sees and hears to understand context and take action. It also needs to be proactive, teachable and personal, so users can talk to it naturally and without lag or delay.While we’ve made incredible progress developing AI systems that can understand multimodal information, getting response time down to something conversational is a difficult engineering challenge. Over the past few years, we’ve been working to improve how our models perceive, reason and converse to make the pace and quality of interaction feel more natural.Building on Gemini, we’ve developed prototype agents that can process information faster by continuously encoding video frames, combining the video and speech input into a timeline of events, and caching this information for efficient recall.By leveraging our leading speech models, we also enhanced how they sound, giving the agents a wider range of intonations. These agents can better understand the context they’re being used in, and respond quickly, in conversation.With technology like this, it’s easy to envision a future where people could have an expert AI assistant by their side, through a phone or glasses. And some of these capabilities are coming to Google products, like the Gemini app and web experience, later this year.We’ve made incredible progress so far with our family of Gemini models, and we’re always striving to advance the state-of-the-art even further. By investing in a relentless production line of innovation, we’re able to explore new ideas at the frontier, while also unlocking the possibility of new and exciting Gemini use cases.Learn more about Gemini and its capabilities. Your information will be used in accordance with Google’s privacy policy.</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>      Done. Just one step more.
    
      Check your inbox to confirm your subscription.
    You are already subscribed to our newsletter.
    You can also subscribe with a
    different email address
    
    .
    
  Let’s stay in touch. Get the latest news from Google in your inbox.
          Follow Us
</code></pre></div></div>]]></content><author><name></name></author><category term="external-posts"/><category term="google"/><summary type="html"><![CDATA[We’re sharing updates across our Gemini family of models and a glimpse of Project Astra, our vision for the future of AI assistants.]]></summary></entry><entry><title type="html">Testing poems</title><link href="https://saguileran.github.io/blog/2023/poem-for-mj/" rel="alternate" type="text/html" title="Testing poems"/><published>2023-06-24T21:01:00+00:00</published><updated>2023-06-24T21:01:00+00:00</updated><id>https://saguileran.github.io/blog/2023/poem-for-mj</id><content type="html" xml:base="https://saguileran.github.io/blog/2023/poem-for-mj/"><![CDATA[]]></content><author><name></name></author><category term="sample-posts"/><category term="writting"/><summary type="html"><![CDATA[In process]]></summary></entry><entry><title type="html">El Carmen, Norte de Santander</title><link href="https://saguileran.github.io/blog/2023/el-carmen-NS/" rel="alternate" type="text/html" title="El Carmen, Norte de Santander"/><published>2023-06-12T21:01:00+00:00</published><updated>2023-06-12T21:01:00+00:00</updated><id>https://saguileran.github.io/blog/2023/el-carmen-NS</id><content type="html" xml:base="https://saguileran.github.io/blog/2023/el-carmen-NS/"><![CDATA[]]></content><author><name></name></author><category term="travel"/><category term="images"/><summary type="html"><![CDATA[A wonderful place with kindly people and great festivals]]></summary></entry><entry><title type="html">Displaying External Posts on Your al-folio Blog</title><link href="https://saguileran.github.io/blog/2022/displaying-external-posts-on-your-al-folio-blog/" rel="alternate" type="text/html" title="Displaying External Posts on Your al-folio Blog"/><published>2022-04-23T23:20:09+00:00</published><updated>2022-04-23T23:20:09+00:00</updated><id>https://saguileran.github.io/blog/2022/displaying-external-posts-on-your-al-folio-blog</id><content type="html" xml:base="https://saguileran.github.io/blog/2022/displaying-external-posts-on-your-al-folio-blog/"><![CDATA[<h3>External Posts on Your al-folio Blog</h3> <p>If you prefer publishing blog posts on medium.com or other external sources, starting version v0.5.0, <a href="https://github.com/alshedivat/al-folio">al-folio</a> lets you to display your external posts in the blog feed of your website! 🎉🎉</p> <p>Configuring external sources of super simple. After upgrading to v0.5.0, just add the following section to your _config.yml:</p> <pre>external_sources:<br />  - name: medium.com  # name of the source (arbitrary string)<br />    rss_url: <a href="https://medium.com/@al-folio/feed">https://medium.com/@&lt;your-medium-username&gt;/feed</a></pre> <p>The example above adds your medium.com blog post feed as an external source. But you can add arbitrary RSS feeds as sources.</p> <p>Any questions or suggestions? 👉 Start <a href="https://github.com/alshedivat/al-folio/discussions">a discussion on GitHub</a>!</p> <p><img src="https://medium.com/_/stat?event=post.clientViewed&amp;referrerSource=full_rss&amp;postId=b60a1d241a0a" width="1" height="1" alt=""/></p>]]></content><author><name></name></author><category term="external-posts"/><category term="medium"/></entry></feed>