Cloning the Linux Kernel repository takes time. We don’t need every commit ever for our work. But we do need multiple branches. Here are some numbers for how long it takes to do various operations.
Continue readingCategory Archives: Linux
Preparing to send a patch to LKML
It took me a couple months to get back to my patch, and in the interim, I forgot everything about formatting a patch series to LKML. Here’s what I have remembered.
Continue readingWhat Processor do I have?
dmidecode -t processor | grep Version
Version: Ampere(R) Altra(R) Processor
Version: Ampere(R) Altra(R) Processor
Why does rpmbuild perf.spec fail
The Linux Kernel git repo has a spec file that builds the Kernel RPM. However, it does not build perf or any of the other userland tools. I want to build a perf RPM using the same code as is used to build the Kernel RPM.
Here are my debugging notes.
Continue readingBuilding a Custom Fedora Based Kernel with Local Patches
How can I create a binary kernel RPM that has patches that have not yet merged into the mainline kernel? One approach to building the Kernel RPM is to use the Makefile option provided with the Kernel. While we typically do this, it does not provide us with the user land tools like perf and its libraries used to test certain patches.
An alternative approach is to take the Fedora Kernel Source RPM that matches the targeted upstream Kernel version, and modify it to apply the set of patches. Here is a walk-through of the process I just got to succeed.
Overriding %{dist} in an RPM build
Before code goes up stream, it should be rigorously tested. In order to do so, we build Kernels based on the corresponding Fedora version, as Fedora tracks Linux Stable fairly closely. However, we want to be able to distinguish between a Kernel we build with one that comes from Fedora.
Continue readingMerging Config Fragments in the Linux Kernel
If you have a config fragment that you want included in your Linux config file, you can use the make system to add it to the existing config. For example, I have a file called: kernel/configs/ampere-topic-mctp.config that looks like this:
CONFIG_MCTP_TRANSPORT_PCC=m
This tells the make system to change CONFIG_MCTP_TRANSPORT_PCC from the default (=n) to module (=m) when building. To include this config fragment, I append it to the make file command to build the config file. For example:
make olddefconfig ampere-topic-mctp.config
This can be done with multiple fragments.
Running a UEFI program upon reboot
Linux is only one of the Operating Systems that our chips need to support. While some features need a complete OS for testing, we want to make sure that features are as tested as possible before we try to debug them through Linux.
Continue readingHow Did I break my Code
Something I did in a commit broke my code. I have a git bisect that shows me the last good commit and the first bad one.
Continue readingrecvfrom system call in python
With a socket created, and a message sent, the next step in our networking journey is to receive data.
Continue reading