<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://pi-etro.github.io/open-source-development/feed.xml" rel="self" type="application/atom+xml" /><link href="https://pi-etro.github.io/open-source-development/" rel="alternate" type="text/html" /><updated>2026-03-26T02:04:04+00:00</updated><id>https://pi-etro.github.io/open-source-development/feed.xml</id><title type="html">Open Source Development</title><subtitle>Activity blog for the MAC5856 Open Source Development course at IME-USP.</subtitle><author><name>Pietro Di Consolo Gregorio</name></author><entry><title type="html">📨 Sending patches by email with git</title><link href="https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/25/Sending-patches-by-email-with-git.html" rel="alternate" type="text/html" title="📨 Sending patches by email with git" /><published>2026-03-25T19:20:00+00:00</published><updated>2026-03-25T19:20:00+00:00</updated><id>https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/25/Sending-patches-by-email-with-git</id><content type="html" xml:base="https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/25/Sending-patches-by-email-with-git.html"><![CDATA[<h3 id="tldr">tl;dr</h3>

<ul>
  <li>Running the email proxy</li>
  <li>Configuring git send-email with kw send-patch</li>
  <li>Testing the setup with kw send-patch</li>
</ul>

<h3 id="commands">Commands</h3>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cd</span> ~/github/emailproxy-container
docker compose up <span class="nt">--build</span> <span class="nt">-d</span> <span class="c"># run the container</span>
docker <span class="nb">exec</span> <span class="nt">-it</span> emailproxy-container-server-1 /bin/bash <span class="c"># attach to the container terminal</span>
emailproxy <span class="nt">--no-gui</span> <span class="nt">--external-auth</span> <span class="nt">--config-file</span> /app/emailproxy.config <span class="c"># start the email proxy</span>
kw send-patch <span class="nt">--send</span> <span class="nt">--private</span> <span class="nt">--to</span><span class="o">=</span><span class="s1">'&lt;EMAIL-ADDRESS-1&gt;'</span>,<span class="s1">'&lt;EMAIL-ADDRESS-2&gt;'</span> <span class="c"># send the patch, use --simulate to dry-run</span>
</code></pre></div></div>

<h3 id="notes">Notes</h3>

<p>For this tutorial, we started by installing docker and docker-compose following <a href="https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04">this guide</a>.</p>

<p>After editing the config file in the <code class="language-plaintext highlighter-rouge">emailproxy-container</code> repository clone, we ran the container with the following command:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker compose up <span class="nt">--build</span> <span class="nt">-d</span>
</code></pre></div></div>

<p>After this, we attached the terminal to the container with:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker <span class="nb">exec</span> <span class="nt">-it</span> emailproxy-container-server-1 /bin/bash
</code></pre></div></div>

<p>And then started the email proxy with:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>emailproxy <span class="nt">--no-gui</span> <span class="nt">--external-auth</span> <span class="nt">--config-file</span> /app/emailproxy.config
</code></pre></div></div>

<p>Finally, we sent the email after some configurations to <code class="language-plaintext highlighter-rouge">kw send-patch</code>:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>kw send-patch <span class="nt">--send</span> <span class="nt">--private</span> <span class="nt">--to</span><span class="o">=</span><span class="s1">'&lt;EMAIL-ADDRESS-1&gt;'</span>,<span class="s1">'&lt;EMAIL-ADDRESS-2&gt;'</span>
</code></pre></div></div>

<p>In this final step, I had some trouble when authenticating my email address. In the end I had to disable ad and tracking
blocker extensions to be able to get the <code class="language-plaintext highlighter-rouge">http://localhost/...</code> URL.</p>

<h3 id="reference">Reference</h3>

<p><a href="https://flusp.ime.usp.br/git/sending-patches-by-email-with-git/">Sending patches by email with git</a></p>

<p><a href="https://flusp.ime.usp.br/git/sending-patches-with-git-and-a-usp-email/">Sending patches with git and a USP email</a></p>]]></content><author><name>Pietro Di Consolo Gregorio</name></author><category term="linux kernel" /><summary type="html"><![CDATA[tl;dr]]></summary></entry><entry><title type="html">📄 Linux kernel Character Device Drivers</title><link href="https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/18/Linux-kernel-Character-Device-Drivers.html" rel="alternate" type="text/html" title="📄 Linux kernel Character Device Drivers" /><published>2026-03-18T19:00:00+00:00</published><updated>2026-03-18T19:00:00+00:00</updated><id>https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/18/Linux-kernel-Character-Device-Drivers</id><content type="html" xml:base="https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/18/Linux-kernel-Character-Device-Drivers.html"><![CDATA[<h3 id="tldr">tl;dr</h3>

<ul>
  <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</li>
  <li>Testing the simple_char driver</li>
</ul>

<h3 id="commands">Commands</h3>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cat</span> /proc/devices
<span class="nb">stat</span> &lt;file&gt;
<span class="nb">mknod</span> &lt;file_name&gt; &lt;<span class="nb">type</span><span class="o">&gt;</span> &lt;major_num&gt; &lt;minor_num&gt;
dmesg <span class="nt">-w</span>

@host
aarch64-linux-gnu-gcc write_prog.c <span class="nt">-o</span> write_prog
scp write_prog root@&lt;VM-IP-ADDRESS&gt;:~/
@VM
root@localhost:~# ./write_prog simple_char_node

</code></pre></div></div>

<h3 id="notes">Notes</h3>

<ul>
  <li><strong>Character devices</strong>
    <ul>
      <li>Abstraction provided by Linux to support read/write devices with relatively small data transfers (one or a few bytes size).</li>
      <li>Abstracted as files in the file system and accessed through file access system calls.</li>
      <li>Example of devices: serial ports, keyboards, mice, etc.</li>
      <li>Example of character device files: <code class="language-plaintext highlighter-rouge">/dev/ttyS0</code>, <code class="language-plaintext highlighter-rouge">dev/input/mouse0</code>, <code class="language-plaintext highlighter-rouge">/dev/kmsg</code>, <code class="language-plaintext highlighter-rouge">/dev/zero</code>.</li>
    </ul>
  </li>
  <li><strong>Major and Minor Numbers</strong>
    <ul>
      <li>Files associated with character devices are special types of files.</li>
      <li>Allow users to interface with devices from the user space.</li>
      <li>Under the hood, device files are the device drivers that handle the system calls for them.</li>
      <li>The association between device files and devices is made with a device ID that consists of two parts: a major and a minor number</li>
      <li>The device ID (major/minor number) is used to choose which driver to run to support a particular device.</li>
    </ul>
  </li>
  <li><strong>File operations</strong>
    <ul>
      <li>Character device drivers may implement functions to handle file access system calls.</li>
      <li>The syscalls implemented by a device driver are set into a struct file_operations object.</li>
      <li>There are several different file operations a character driver can implement.</li>
      <li>Basic system calls: open, close, read, write.</li>
      <li>Handled by open, release, read, and write functions stored in struct file_operations objects.</li>
    </ul>
  </li>
</ul>

<h4 id="tutorial-steps">Tutorial steps</h4>

<p>The following steps were executed to test the simple_char driver. This could be considered a basic example of a workflow
for adding a module to the kernel, building, and installing it.</p>

<ul>
  <li>Create an example character device</li>
  <li>Enable the device: <code class="language-plaintext highlighter-rouge">make -C "$IIO_TREE" menuconfig</code></li>
  <li>Build linux image: <code class="language-plaintext highlighter-rouge">kw build --clean &amp;&amp; kw build</code></li>
  <li>Install the module:
    <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">mkdir</span> <span class="s2">"</span><span class="k">${</span><span class="nv">VM_DIR</span><span class="k">}</span><span class="s2">/arm64_rootfs"</span>
<span class="nb">sudo </span>guestmount <span class="nt">--rw</span> <span class="nt">--add</span> <span class="s2">"</span><span class="k">${</span><span class="nv">VM_DIR</span><span class="k">}</span><span class="s2">/arm64_img.qcow2"</span> <span class="nt">--mount</span> /dev/vda2 <span class="s2">"</span><span class="k">${</span><span class="nv">VM_DIR</span><span class="k">}</span><span class="s2">/arm64_rootfs"</span>
<span class="nb">sudo</span> <span class="nt">--preserve-env</span> make <span class="nt">-C</span> <span class="s2">"</span><span class="k">${</span><span class="nv">IIO_TREE</span><span class="k">}</span><span class="s2">"</span> <span class="nv">INSTALL_MOD_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">/arm64_rootfs"</span> modules_install
<span class="nb">sudo </span>guestunmount <span class="s2">"</span><span class="k">${</span><span class="nv">VM_DIR</span><span class="k">}</span><span class="s2">/arm64_rootfs"</span>
</code></pre></div>    </div>
  </li>
  <li>Start the VM: <code class="language-plaintext highlighter-rouge">sudo virsh start arm64</code></li>
  <li>Connect to the VM: <code class="language-plaintext highlighter-rouge">ssh root@$(sudo virsh net-dhcp-leases default | grep -oE '\b([0-9]{1,3}\.){3}[0-9]{1,3}\b')</code></li>
  <li>Get information about the module: <code class="language-plaintext highlighter-rouge">modinfo simple_char</code></li>
  <li>Load the module: <code class="language-plaintext highlighter-rouge">modprobe simple_char</code></li>
  <li>See kernel logs: <code class="language-plaintext highlighter-rouge">dmesg | tail</code></li>
</ul>

<p>Initially the device wasn’t writing to the buffer, giving me the following error:</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@localhost:~# ./write_prog simple_char_node
Error: 9wrote <span class="nt">-1</span> bytes to buffer
</code></pre></div></div>

<p>But this was caused by a misconfiguration with the device interface (<code class="language-plaintext highlighter-rouge">simple_char_node</code>). By deleting and recreating it
with the correct major number (<code class="language-plaintext highlighter-rouge">cat /proc/devices | grep simp</code>) I was able to write and read using the device.</p>
<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>root@localhost:~# ./write_prog simple_char_node
wrote 256 bytes to buffer
root@localhost:~# ./read_prog simple_char_node 
Read buffer: A new message <span class="k">for </span>simple_char.

</code></pre></div></div>

<h3 id="reference">Reference</h3>

<p><a href="https://flusp.ime.usp.br/kernel/char-drivers-intro/">Introduction to Linux kernel Character Device Drivers</a></p>]]></content><author><name>Pietro Di Consolo Gregorio</name></author><category term="linux kernel" /><summary type="html"><![CDATA[tl;dr]]></summary></entry><entry><title type="html">🧩 Linux kernel build configuration and modules</title><link href="https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/11/Linux-kernel-modules.html" rel="alternate" type="text/html" title="🧩 Linux kernel build configuration and modules" /><published>2026-03-11T19:00:00+00:00</published><updated>2026-03-11T19:00:00+00:00</updated><id>https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/11/Linux-kernel-modules</id><content type="html" xml:base="https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/11/Linux-kernel-modules.html"><![CDATA[<h3 id="tldr">tl;dr</h3>

<ul>
  <li>Creating a simple example module</li>
  <li>Creating Linux kernel configuration symbols</li>
  <li>Configuring the Linux kernel build with menuconfig</li>
  <li>Installing Linux kernel modules</li>
</ul>

<h3 id="commands">Commands</h3>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>make <span class="nt">-C</span> <span class="s2">"</span><span class="nv">$IIO_TREE</span><span class="s2">"</span> menuconfig <span class="c"># to enable a module in the menuconfig</span>
<span class="nb">cd</span> <span class="s2">"</span><span class="nv">$IIO_TREE</span><span class="s2">"</span> <span class="o">&amp;&amp;</span> kw build <span class="nt">--clean</span> <span class="c"># clean artifacts from previous compilations</span>
<span class="nb">cd</span> <span class="s2">"</span><span class="nv">$IIO_TREE</span><span class="s2">"</span> <span class="o">&amp;&amp;</span> kw build <span class="c"># build image and modules</span>
modinfo &lt;module_name&gt; <span class="c"># see information about module of given name</span>
lsmod <span class="c"># @VM list loaded modules</span>
insmod &lt;module_file.ko&gt; <span class="c"># loads module at given location</span>
rmmod &lt;module_name&gt; <span class="c"># unloads module of given name</span>
modprobe &lt;module_name&gt; <span class="c"># loads module of given name and its dependencies </span>
modprobe <span class="nt">-r</span> &lt;module_name&gt; <span class="c"># unloads module of given name</span>
depmod <span class="nt">--quick</span> <span class="c"># updates the module dependency list only if a module is added or removed</span>
dmesg | <span class="nb">tail</span> <span class="c"># see last logs</span>
</code></pre></div></div>

<h3 id="notes">Notes</h3>

<p>Although the tutorial told us that the entries in the <code class="language-plaintext highlighter-rouge">Kconfig</code> were in alphabetical order, the order did not appear to be alphabetical.</p>

<p>When installing the Linux kernel modules with <code class="language-plaintext highlighter-rouge">kw</code>, I got an error saying that <code class="language-plaintext highlighter-rouge">${VM_MOUNT_POINT}</code> wasn’t defined,
to fix this I had to replace it with <code class="language-plaintext highlighter-rouge">${VM_DIR}/arm64_rootfs</code> for the following command:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sudo guestunmount "$VM_MOUNT_POINT"
</code></pre></div></div>

<p>The rest of the tutorial was very clear. By the end, I had a working Linux kernel with the example modules.</p>

<h3 id="reference">Reference</h3>

<p><a href="https://flusp.ime.usp.br/kernel/modules-intro/">Introduction to Linux kernel build configuration and modules</a></p>]]></content><author><name>Pietro Di Consolo Gregorio</name></author><category term="linux kernel" /><summary type="html"><![CDATA[tl;dr]]></summary></entry><entry><title type="html">🏗️ Building and booting a custom Linux kernel with kw</title><link href="https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/04/Building-custom-linux-kernel.html" rel="alternate" type="text/html" title="🏗️ Building and booting a custom Linux kernel with kw" /><published>2026-03-04T18:40:00+00:00</published><updated>2026-03-04T18:40:00+00:00</updated><id>https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/04/Building-custom-linux-kernel</id><content type="html" xml:base="https://pi-etro.github.io/open-source-development/linux%20kernel/2026/03/04/Building-custom-linux-kernel.html"><![CDATA[<h3 id="tldr">tl;dr</h3>

<ul>
  <li><code class="language-plaintext highlighter-rouge">kw</code> to develop and build a custom Linux kernel.</li>
  <li><code class="language-plaintext highlighter-rouge">IIO</code> Linux kernel tree.</li>
  <li>Linux kernel compilation.</li>
  <li>Booting the custom Linux kernel.</li>
</ul>

<h3 id="commands">Commands</h3>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>kw ssh <span class="c"># initiate an SSH connection to the default remote</span>
<span class="nb">cd</span> <span class="s2">"</span><span class="nv">$IIO_TREE</span><span class="s2">"</span> <span class="c"># go to the IIO tree directory</span>
kw build <span class="nt">--menu</span> <span class="c"># safely modify `.config` w/ a TUI</span>
kw build <span class="c"># compile Linux kernel from source considering local configurations</span>
kw deploy <span class="nt">--modules</span> <span class="c"># only install modules into the VM</span>
</code></pre></div></div>

<h3 id="notes">Notes</h3>

<p>In this class I’ve installed the <a href="https://github.com/kworkflow/kworkflow">kw</a> tool to build and boot a custom Linux kernel.
The <a href="https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/">IIO</a> (Industrial I/O subsystem) Linux kernel tree was also cloned and built.</p>

<p>The resulting setup for this class was:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/home
├── lk_dev
│   ├── iio
│   ├── kw
│   ├── shared_arm64
│   └── vm
│       ├── arm64_boot
│       │   ├── initrd.img-6.1.0-43-arm64
│       │   └── vmlinuz-6.1.0-43-arm64
│       ├── arm64_img.qcow2
│       └── base_arm64_img.qcow2
└── pietro
    └── github
        └── open-source-development
            └── lk_dev
                └── activate.sh
</code></pre></div></div>

<blockquote>
  <p>📝 <code class="language-plaintext highlighter-rouge">kw</code> can update itself using the <code class="language-plaintext highlighter-rouge">self-update</code> command.</p>
  <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>kw self-update <span class="c"># update with master branch</span>
kw self-update <span class="nt">--unstable</span> <span class="c"># update with unstable branch.</span>
</code></pre></div>  </div>
</blockquote>

<blockquote>
  <p>⚠️ When a new VM is launched with virsh, update the IP addess in <code class="language-plaintext highlighter-rouge">kw</code> configuration.</p>
  <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>virsh net-dhcp-leases default
<span class="nb">cd</span> <span class="s2">"</span><span class="nv">$IIO_TREE</span><span class="s2">"</span>
kw remote <span class="nt">--add</span> arm64 root@&lt;VM-IP-address&gt; <span class="nt">--set-default</span>
</code></pre></div>  </div>
</blockquote>

<p>The <code class="language-plaintext highlighter-rouge">kw ssh --get '~/vm_mod_list'</code> command didn’t work for me, so I had to use <code class="language-plaintext highlighter-rouge">scp root@&lt;VM-IP-address&gt;:~/vm_mod_list .</code></p>

<p>Sometimes, <code class="language-plaintext highlighter-rouge">sudo virsh shutdown arm64</code> doesn’t work. In these cases I have to force it with <code class="language-plaintext highlighter-rouge">sudo virsh destroy arm64</code></p>

<h3 id="reference">Reference</h3>

<p><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></p>]]></content><author><name>Pietro Di Consolo Gregorio</name></author><category term="linux kernel" /><summary type="html"><![CDATA[tl;dr]]></summary></entry><entry><title type="html">🧪 Setting up a test environment for Linux Kernel Development</title><link href="https://pi-etro.github.io/open-source-development/linux%20kernel/2026/02/25/Setting-up-test-env.html" rel="alternate" type="text/html" title="🧪 Setting up a test environment for Linux Kernel Development" /><published>2026-02-25T19:20:00+00:00</published><updated>2026-02-25T19:20:00+00:00</updated><id>https://pi-etro.github.io/open-source-development/linux%20kernel/2026/02/25/Setting-up-test-env</id><content type="html" xml:base="https://pi-etro.github.io/open-source-development/linux%20kernel/2026/02/25/Setting-up-test-env.html"><![CDATA[<h3 id="tldr">tl;dr</h3>

<ul>
  <li>Create a virtual machine (VM) with extracted kernel and initrd</li>
  <li><code class="language-plaintext highlighter-rouge">QEMU</code> to run VMs</li>
  <li><code class="language-plaintext highlighter-rouge">libvirt</code> to manage VMs and to automate</li>
  <li>Configure SSH access from the host to the VM</li>
  <li>Fetch the list of modules loaded in the guest kernel</li>
</ul>

<h3 id="commands">Commands</h3>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>launch_vm_qemu <span class="c"># launch a VM with qemu with the extracted kernel and initrd</span>
create_vm_virsh <span class="c"># create a virsh VM with the extracted kernel and initrd</span>
<span class="nb">sudo </span>systemctl start libvirtd <span class="o">&amp;&amp;</span> systemctl status libvirtd <span class="c"># start libvirtd and check its status</span>
<span class="nb">sudo </span>virsh net-start default <span class="o">&amp;&amp;</span> <span class="nb">sudo </span>virsh net-list <span class="c"># start default network and list networks</span>
<span class="nb">sudo </span>virsh console arm64 <span class="c"># re-attach to the console of the running vm</span>
<span class="nb">sudo </span>virsh list <span class="nt">--all</span> <span class="c"># list all created VMs</span>
<span class="nb">sudo </span>virsh dominfo arm64 <span class="c"># Show detailed information about a vm</span>
<span class="nb">sudo </span>virsh start <span class="nt">--console</span> arm64 <span class="c"># start a previously created vm</span>
<span class="nb">sudo </span>virsh shutdown arm64 <span class="c"># shutdown a vm gracefully</span>
<span class="nb">sudo </span>virsh destroy arm64 <span class="c"># force shutdown a vm</span>
<span class="nb">sudo </span>virsh undefine arm64 <span class="c"># remove stopped vm</span>
</code></pre></div></div>

<h3 id="notes">Notes</h3>

<p>To keep my <code class="language-plaintext highlighter-rouge">activate.sh</code> script versioned, I structured my setup as follows:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>/home
├── lk_dev
│   ├── shared_arm64
│   └── vm
│       ├── arm64_boot
│       │   ├── initrd.img-6.1.0-43-arm64
│       │   └── vmlinuz-6.1.0-43-arm64
│       ├── arm64_img.qcow2
│       └── base_arm64_img.qcow2
└── pietro
    └── github
        └── open-source-development
            └── lk_dev
                └── activate.sh
</code></pre></div></div>

<p>The VMs had to be stored under the <code class="language-plaintext highlighter-rouge">home</code> directory for virsh access. Note that when creating the <code class="language-plaintext highlighter-rouge">/home/lk_dev</code>
directory and it’s groups, I had to restart the computer, logging out and back in wasn’t enough.</p>

<p>The Debian image from the guide wasn’t available anymore, so the version used was the <a href="http://cdimage.debian.org/cdimage/cloud/bookworm/daily/20260225-2399/debian-12-nocloud-arm64-daily-20260225-2399.qcow2">daily version 20260225-2399</a>.</p>

<blockquote>
  <p>⚠️ Remember to start <code class="language-plaintext highlighter-rouge">libvirtd</code> after restarting the computer.</p>
  <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">sudo </span>systemctl start libvirtd
systemctl status libvirtd
</code></pre></div>  </div>
</blockquote>

<p>The Debian image used doesn’t come with SSH installed, so I had to install it manually by running the VM with virsh and then executing:</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>update
<span class="nb">sudo </span>apt <span class="nb">install </span>openssh-server
</code></pre></div></div>
<p>After the setup was completed, I could access the VM successfully with SSH:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ssh root@192.168.122.135
</code></pre></div></div>

<h3 id="reference">Reference</h3>

<p><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></p>]]></content><author><name>Pietro Di Consolo Gregorio</name></author><category term="linux kernel" /><summary type="html"><![CDATA[tl;dr]]></summary></entry></feed>