Marcus Folkesson

Embedded Linux Artist

What is libcamera and why should you use it?

What is libcamera and why should you use it Read out a picture from camera Once in a time, video devices was not that complex. To use a camera back then, your application software could iterated through /dev/video* devices and pick the camera that you want and then immediately start using it. You could query which pixel formats, frame rates, resolutions and all other properties that are supported by the camera. cover

TIL -Yocto bitbake-getvar

TIL - Yocto bitbake-getvar TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post Writing recipes for Yocto has recently become something I do several times a week. All tools that help you with debugging is allways appreciated, and one such tool I found recently is bitbake-getvar that came with the Honister release of Yocto.

TIL - systemd and $MAINPID

TIL - SystemD and $MAINPID TIL, Today I Learned, is more of a "I just figured this out: here are my notes, you may find them useful too" rather than a full blog post A special environmnent variable, $MAINPID, is set and is available for the .service file. The variable exposes the MainPID property of the service and could be useful if your custom services e.g. forks. This let you do

HID report descriptors and Linux

HID report descriptors and Linux HID Devices USB HID (Human Interface Device) device class is the type of computer peripherals that human interacts with, such as keyboards, mice, game controllers and touchscreens. The protocol is probably one of the most simple protocols in the USB specification. Even if HID was originally written for USB in mind, it works with several other transport layers. Your mouse and keyboard do probably use HID over USB, the touchscreen in your smartphone could use HID over I2C. cover

Industrial I/O and triggers

Industrial I/O and triggers I've maintained a couple of IIO-drivers (MCP3911 [4] and LTC1660 [5]) for some time now and it's time to give at least the MCP3911 a face-lift. This time the face lift includes support for: Buffers Triggers Make the driver interrupt driven Add support for setting Oversampling Ratio Add support for setting PGA (Pre Gain Amplifier) Also clean it up a bit by only using device managed resources. cover

Mounting with systemd and udev

Mounting with systemd and udev Systemd hasn't always been my first choice as init system for embedded system, but I cannot ignore that it has many good and handy things that other init systems don't. At the same time, that is just what I don't like with systemd, it does not follow the "Do one thing and do it well"-philosophy that I like so much. I'm very thorn about it. cover

GPLv2 and GPLv3

Open Source "Free as in freedom - not as in free beer". Free beer is nice, but freedom is even nicer. I have been working with companies from different sections including consumer electronics, military applications, automotive and aeronautics. One common question, regardless of section, is "Can we really use Open Source in our product?". The answer is usually Yes, you can, but.... One common misunderstanding is to interpret Open Source as in free beer. cover

Forge a hoof scratch

Forge a hoof scratch In this project I made a hoof scratch as a gift to a friend - made out of a horse shoe of course. I do have a few different forges depending on what to forge. The induction forge is great for thick and straight materials such like hammer heads and tongs. One of the greatest benefit is that there is only 30s startup time as it requires no preparations at all. cover

This website setup

This website setup This post is more for my own good if I have to setup my website once again. Maybe someone find it useful. Tools Hugo I use Hugo [1] to generate my website. Hugo is a fantastic tool for generate static web pages in an flexible way. All pages is written in reStructured Text [2] which is the markup syntax I strongly prefer. Docker The web server [4] and traefik [5] server is running in docker [3] containers. cover

Leather sewing machine

Leather sewing machine I have worked with leather for some time which I enjoyed a lot. Leather is so general purpose and is both robust and nice looking. So far I've made myself a wizard hat, dice bags, mug pads, bookmarks.. The majority of all leather projects involves a sewing, which is quite entertaining but really time consuming so I invested in a $60 leader sewing machine which make the whole process a lot smoother. cover