Post

SL Phase I - Hello Kernel!

This blog page was created with the purpose of logging my experience with the MAC0470 Free Software (SL) course. Throughout the semester, I will be making posts for each phase of the course explaining the tasks and telling about my challenges.

You can check out the actual code in this repo.

The Course

The aforementioned SL course is adopting a new structure this semester. It’s been split into two phases:

  1. Contributing to the Linux Kernel and the Kernel workflow lib
  2. Contributing to an open source project of the student’s choice

Phase I

Phase I started with theoretical lectures on free/open source software, licenses and the Linux kernel, and then moved to practical workshops following the Flusp tutorials, that serve as an introduction to modifiying and installing the Linux Kernel. In this simplified tutorials, we only made changes to the IIO subsystem of the Linux Kernel.

How it’s going

I couldn’t get libvirt to run in my machine, so I had to follow the old tutorials from Siqueira, which have a much less automated workflow to making and installing the kernel in a local VM.

The proccess (best described in the linked tutorials), consisted of

  • Setting up a local linux VM
  • Connecting to it by SSH
  • Copying the VM .config file to the Host machine
  • Compiling the kernel in the Host with the desired changes
  • Copying the compiled kernel from the VM to the Host machine
  • Installing the new Kernel in the VM, and generating a new boot with it with grub

I couldn’t compile the kernel in my host machine due to incompatibility with the kernel’s packages, since they weren’t available anymore in my package manager. To solve this, I had to manually search and install the legacy packages that fortunately were available online.

The first two steps of the tutorial were a success, and I could compile and install a new version of the kernel with simple changes.

But after that, I couldn’t get anymore changes to be made effective, and we couldn’t figure out why. So I remade the first tutorials. Since I hadn’t backed up the VM’s image between each step, I had to remake it, and some things were never the same.

Specifically, copying files from the Host to the VM sometimes yielded errors with no message other than scp: failed to upload directory.

Despite all that, I’ve just finished the first two tutorials (again).

This post is licensed under CC BY 4.0 by the author.

Trending Tags