NXP / Freescale i.MX6 as an SPI slave

Motivation Even though SPI is commonly used for controlling rather low-speed peripherals on an embedded system, it can also come handy for communicating data with an FPGA. When using the official Linux driver, the host can only be the SPI master. It means, among others, that transactions are initiated by the host: When the bursts [...]

Linux: Where the USB related kernel files are

A few notes on where to find USB related kernel files on a Linux system (kernel 3.12.20 in my case) $ lsusb [ ... ] Bus 001 Device 059: ID 046d:c52b Logitech, Inc. Now find the position in the tree. It should be device 59 under bus number 1: $ lsusb -t [ ... ] [...]

Linux kernel: /proc/iomem-like output to kernel log during boot

In order to have something similar to /proc/iomem printed out to the console (and dmesg), this piece of code can be implanted somewhere in the kernel code (in my case it was arch/arm/mach-zynq/common.c). It may be required to add #include headers, depending on the file it’s added to. The original code that produces /proc/iomem is [...]

Linux Device Tree: What those status = “okay” are about

There are a lot of “okay” assignments in the kernel’s device tree. For example, arch/arm/boot/dts/zynq-zed.dts starts with /dts-v1/; #include “zynq-7000.dtsi” and later on there’s, among others, &sdhci0 { status = “okay”; }; &uart1 { status = “okay”; }; &usb0 { status = “okay”; dr_mode = “host”; usb-phy = <&usb_phy0>; }; Let’s look on the last [...]

Linux and DVB: Failing with a Sin Hon TDH 601 / HD809 USB dongle

General These are my jots as I attempted to use an DVB USB dongle to receive digital TV in Haifa, Israel. Spoiler: I never managed to get my dongle working properly. Maybe because it was faulty to begin with, and maybe because I missed something. It seems more like the former. It says “HD809″ and [...]

Raspberry Pi 3 notes

These are messy, random notes that I took while setting up my little Raspberry Pi 3. Odds are that by the time you read this, I’ve replaced it with a mini-PC. So if you ask a question, my answer will probably be “I don’t remember”. Even though the Pi is cool, it didn’t supply what [...]

Using cgroups to force RAM swapping for implementing an Arria 10 design

The problem I needed to implement an FPGA design for an Arria 10 chip with Quartus 15 on a Linux machine. According to Altera’s requirement page, (“Memory recommendations” tab), the computer should have 28-48 GB of RAM. Or, as it says on that page, one can fake it with virtual memory. It turns out the [...]

Linux kernel hack for calming down a flood of PCIe AER messages

While working on a project involving a custom PCIe interface, Linux’ message log became flooded with messages like pcieport 0000:00:1c.6: device [8086:a116] error status/mask=00001081/00002000 pcieport 0000:00:1c.6: [ 0] Receiver Error pcieport 0000:00:1c.6: [ 7] Bad DLLP pcieport 0000:00:1c.6: [12] Replay Timer Timeout pcieport 0000:00:1c.6: Error of this Agent(00e6) is reported first pcieport 0000:02:00.0: PCIe Bus [...]

syslogd notes

A few jots on playing with the system logger (the one that writes to /var/log/messages) on an ancient CentOS 5.5. First, check the version: It says Oct 6 15:12:06 diskless syslogd 1.4.1: restart. So it’s a quite old revision of syslogd, unfortunately. There are no filter conditions to rely on. The relevant configuration file is [...]

Linux kernel compilation jots

Just a few notes to self as I compiled a kernel on a x86_64 machine, targeting an i386. Kind-of cross-compilation, but with no need for a cross compiler. Remember to update the (extra) version number in the Makefile. Also remember that there’s always $ make help and it’s very useful. After copying a known config [...]