Tag Archives: linux

Making a .deb package for CMake C/C++ project

Each time I need to package some software as .deb, I am not able to do it in one go. Because it is always a quite complex procedure that requires quite a lot of knowledge and context and you have to learn a lot of tools (million of debhelper tools, dpkg, debuild etc). It is designed to be comfortable for “large-scale” debian package maintainers who maintain a lot of packages for the Debian project, but is not very friendly for “indie” developers working on their own projects. And the process may vary a lot depending on what kind of software you need to package (what language, is it a library or shell tool or GUI etc). Also it strictly recommends that debian packaging files are stored separately from the software repo which might be somewhat inconvenient for small projects. We are going to include the debian directory into the project.

Continue reading

How to pair INA226 current and voltage sensor and Raspberry Pi using ina2xx kernel driver

INA226 is a popular microchip to measure the voltage and power consumption that uses i2c digital interface. There are a lot of articles describing how to make it work with Arduino, much fewer about how it can be connected and read using generic Linux i2c tools and seems to be none explaining how can it be paired with Linux ina2xx kernel driver so it can be manipulated via hwmon subsystem. Let’s fix ths!

Continue reading