Even though I work with C/C++ projects that are not related to Qt technology, QtCreator has become my main code editor. Here I explain some of the main reasons why I prefer it over other alternatives. Continue reading “My editor of choice for C/C++: QtCreator + FakeVim”
A while back I read the Working Effectively with Legacy Code by Michael C. Feathers. The book focuses on strategies and approaches to get existing untested legacy code covered by unit tests.
The book also includes more than twenty dependency-breaking techniques that can be used for new code as well to make it easily testable in the first place. Here I have picked three of the techniques that I have personally found most useful.
- Interfaces to abstract implementation
- Extract and override call
- Expose static method
Trusted platform module (TPM) is a secure element that can be used to securely generate and store keys. It has many possible uses, one of which is encryption of sensitive data. This article describes how to use TPM on Linux environment to encrypt different types of data, how to encrypt filesystem partitions and how to bind the encryption with device state.
In the true open-source spirit, the authors of some great Linux kernel books have decided to make these books freely available for everyone. They are good material for anyone interested in the Linux kernel, and also a good reference for professionals working with the kernel. At least I have personally found these books very useful.
Rootwait is a Linux kernel command line parameter that makes the kernel wait (indefinitely) for a root device to show up. This can be useful for devices that are detected asynchronously such as USB or MMC medias. This post, however, is not really about rootwait. Instead, it is about something that every programmer have and will encounter.
Continue reading “The missing rootwait”
Usually when working with USB thumb drives, memory cards and hard drives, the partitioning can be easily done just by plugging them to a Linux (or Windows) PC and using a partitioning application such as fdisk. However, with embedded devices it is sometimes more practical to write the partition table to a file instead of directly writing it to the memory device. This can be the case with embedded MMC (eMMC) memories which are soldered directly to the device and cannot be connected to a PC for partitioning.
When working with embedded systems, the software is only a part of the whole product or device. Usually there is also customized hardware involved, and some parts of the software are very low-level and hardware dependent. With embedded Linux most parts of the software can quite easily be covered by unit testing on a Linux host. Yet, there are always some parts which need to be tested with the actual physical hardware. Using the right tools this testing can also be automated.
Welcome to the the Page Fault blog!
For a while I have been thinking about starting a blog on software. Sharing things I find interesting, and also solutions to problems I encounter in my day-to-day job.
It is a good practice not to write duplicate code, and it also applies to blog writing. So, more details about the blog can be found from the About page.