RSSAmplifier

Blog

Blog | Javier Martinez Canillas

$ cat /dev/random

blog.dowhile0.orgRSS feed ↗10 posts

Latest posts

Creating an ESP32 based dice for chess

My kid loves chess and lately he has been playing the dice chess variant with his friends. For those unfamiliar, it is when a die roll determines which piece type can be moved (e.g., 1=Pawn, 2=Rook, 3=Knight, etc.). However, this is inconvenient because players have to remember which chess piece corresponds to each number, and the mapping has to be explained to every new player. I’ve had an idea…

Using an SPI SSD1306 OLED on Fedora with a Raspberry Pi

In a previous post I explained how to use a Solomon SSD1306 OLED display on Fedora with a Raspberry Pi, but that only covered displays that come with a I2C driving interface. The SSD1306 display controller also supports a (both 3-wire and 4-wire) SPI interface, and the ssd130x DRM driver has support for it since Linux 5.19. This blog post explains how to setup Fedora to use a SSD1306 OLED when…

Some useful Linux kernel cmdline debug parameters to troubleshoot driver issues

I have written before on how to troubleshoot drivers’ deferred probe issues in Linux . And while having a /sys/kernel/debug/devices_deferred debugfs entry is quite useful to know the list of devices whose drivers failed to probe due being deferred [0], there are also some debug command line parameters that could help with the troubleshooting. But first, an explanation of what these parameters do:…

Atomically exchange vfat files in Linux

The Linux kernel implements the POSIX renameat() system call that atomically renames a file, moving it between directories if required. If the newpath already exists, it is atomically replaced by the oldpath . This system call function signature is as follows: int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); While atomically renaming a file is useful, the system…

How to install Fedora on an HP X2 Chromebook

We have been working lately with Enric Balletbo and Dorinda Bassey to improve the support for the HP X2 Chromebook in Fedora. This post explains how to install Fedora on that Chromebook. The article ended being up being longer than I thought, so for the impatient this is the summary: Switch the Chromebook to Developer Mode . Boot from the internal disk. Go to a virtual terminal with Ctrl+Alt+F2…

Booting Fedora with sd-boot and Secure Boot enabled

Every once in a while there is a discussion in the Fedora development list about replacing the default GRUB bootloader. That latest of these threads was "future of dual booting Windows and Fedora, redux" about a month ago, but searching for GRUB in the mailing list archives one can find many similar conversations. One of the options to replace GRUB that is always mentioned is systemd-boot…

Using an I2C SSD1306 OLED on Fedora with a Raspberry Pi

Linux 5.18 version landed in Fedora 36 and it includes a new ssd130x DRM driver for the Solomon OLED display controllers. One of the supported devices is SSD1306, which seems to be a quite popular display controller for small and cheap (I bought a pack of 3 on Amazon for less than 15€) monochrome OLED panels. I do a lot of development and testing on RPi boards and found that these small OLED…

How to troubleshoot deferred probe issues in Linux

When working on the retro handheld console mentioned in a previous post , I had an issue where the LCD driver was not probed when booting a custom Linux kernel image built. To understand the problem, first some knowledge is needed about how devices and drivers are registered in the Linux kernel, how these two sets are matched (bound) and what is a probe deferral. If you are not familiar with these…

Linux drivers and devices registration, matching, aliases and modules autoloading

Every once in a while I have to explain these concepts to someone so I thought that it could be something worth to write about. Device drivers and devices registration The Linux kernel documentation covers quite well how device drivers and devices are registered and how these two are bound . But the summary is that drivers and devices are registered independently and each of these specify their…

Building a retro handheld console with Fedora and a RPi zero

I built a retro console for my kids some time ago and they asked me if they could have one but that was portable. Now that I finished the retro handheld console, thought that could be useful to share how it was done in case others wanted to replicate. The retro console running the game Doom. Hardware I used a Waveshare 128 128, 1.44inch LCD display HAT which is a good fit because it contains both…