#linux



Fobnail Token - example use case

Published at May 19, 2023 · Krystian Hebel ·  11 min read

This phase focused on using Fobnail in a real-life use case, namely using it to access LUKS2 decryption key if and only if the PCR measurements are valid...

Categories: security


Minimal OS for Fobnail

Published at June 23, 2022 · Tomasz Żyjewski ·  7 min read

The Fobnail Token is an open-source hardware USB device that helps to determine the integrity of the system. The purpose of this blog post is to present the development progress of this project. During this phase, we focused on researching OS for hosting Fobnail Attester...

Categories: security



First impression on Nezha RISC-V SBC

Published at November 19, 2021 · Cezary Sobczak ·  9 min read

Nezha is a AIoT development board customized by AWOL based on Allwinner's D1 chip. It is the world's first mass-produced development board that supports 64bit RISC-V instruction set and Linux system....

Categories: firmware iot os-dev





3mdeb roadmap for August 2019

Published at August 19, 2019 · Artur Raglis · Łukasz Wcisło ·  2 min read

Thrilled about what we are doing to change the world right now? Interested in the fancy stuff we make? Check out our plan for August 2019, find out more about our recent projects and stay tuned with the most sophisticated tech-team in the neighborhood....

Categories: miscellaneous




Yocto meta-rte is now open for everyone

Published at March 13, 2019 · Marta Szelecka ·  3 min read

Yocto meta-rte is now open for everyone We are happy to announce that our 3mdeb’s Yocto meta-rte is now available on our GitHub. But let’s say briefly what the Yocto Project is and why we decided to work with it. First of all, like everything that we love the most, Yocto Project is open sourced. The project is hosted by the Linux Foundation and gives you templates, methods, and set of interoperable tools for creating OS images for embedded Linux systems....

Categories: os-dev


Quick start guide to kas - best tool for setting up the Yocto projects

Published at February 7, 2019 · Maciej Pijanowski ·  8 min read

Introduction If you are using the Yocto Project, you certainly have encountered the hassle of managing multiple layers and tracking their revisions. I’ve been using the Yocto Project for nearly 3 years by now and have mostly been using the tool for this purpose. While I’m not a huge fan of it, it is relatively simple to use and gets the job of fetching layers and controlling their revisions done properly....

Categories: os-dev


debos image for HummingBoard Edge

Published at October 10, 2018 · Maciej Pijanowski ·  8 min read

Intro In my previous posts I have shared my first experience with debos and how to run debos in a container. In today’s post, I’d like to present how can we use all of that to generate base Debian image for an ARM board. My board of choice for this particular example will be the HummingBoard Edge. The post is inspired by the feedback from the new users (such as this one) that there are no end-to-end examples how to quickly start using this tool....

Categories: os-dev


RTE for automated kernel deployment and everyday use

Published at October 3, 2018 · Piotr Król ·  9 min read

We continue our effort to enable IOMMU and as side effect I have to play with various technologies to exercise reliable development environment which base on RTE. In this blog post I would like to present semi-automated technique to debug firmware, Xen and Linux kernel. The goal is to have set of tools that help in enabling various features in Debian-based dom0. We would like: update Linux kernel which is exposed over HTTP server update rootfs provided through NFS I will use following components:...

Categories: firmware os-dev


debos in docker - the second attempt

Published at August 23, 2018 · Maciej Pijanowski ·  5 min read

Intro In the previous post, I have shared my first experience with the Debian images builder - debos. I have posted my current results on the issue but since there was no response, I’ve decided to try to move forward by myself. Just to remind - I was stuck at the following error (when building for arm64): 1 2 3 4 5 6 7 8 9 10 11 12 2018/07/26 18:36:39 Debootstrap (stage 2) | chroot: failed to run command '/debootstrap/debootstrap': Exec format error 2018/07/26 18:36:39 debootstrap....

Categories: os-dev


Our first look at debos - new Debian images generator

Published at July 27, 2018 · Maciej Pijanowski ·  8 min read

What is debos debos is quite a new tool allowing easier Debian images generation. It seems to be following current trends - it is written in Go, using YAML as an input format. The idea of taking away debootstrap shell scripts and replacing it with a single, simple YAML file looks tempting enough to give it a try. Full feature description can be found in this introductory post on Collabora’s blog....

Categories: os-dev


SWUpdate for feature-rich IoT applications

Published at May 21, 2017 · Maciej Pijanowski ·  11 min read

When you work with embedded systems long enough, sooner or later you realize that some sort of update mechanism is required. This is especially true when more complex systems, running with an operating system, are taken into account. Nowadays Linux is being picked increasingly as operating system for embedded IoT devices. In following post we will focus on those in particular. In fact, from my experience update mechanism is vital part of many embedded applications....

Categories: app-dev


Nerves project triage on BeagleBone Black Black

Published at March 10, 2017 · Piotr Król ·  6 min read

Recently one of my customers brought to my attention Nerves. It aims to simplify use of Elixir (functional language leveraging Erlang VM) in embedded systems. This system has couple interesting features that are worth of research and blog post. First is booting directly to application which is running in BEAM (Erlang VM). Nerves project replace systemd process with programming language virtual machine running application code. Concept is very interesting and I wonder if someone tried to use that with other VMs ie....

Categories: firmware os-dev


nRF51822 programming with OpenOCD under Linux

Published at January 22, 2017 · Kamil Wcisło ·  8 min read

Some time ago we bought BLE400 from Waveshare as probably one of the cheapest option to enter nRF51822 market. As our readers know, we prefer to use the Linux environment for embedded systems development. Because of that, we’re following the guide for using Waveshare nRF51822 Eval Kit: icarus-sensors. Kudos due to great post that helped us enter nRF51822 and mbed OS land under Linux. BLE400 is pretty cheap, because it hasn’t got integrated debugger/programmer....

Categories: firmware iot


Zephyr initial triage on Nucleo-64 STM32F411RE

Published at January 14, 2017 · Piotr Król ·  7 min read

As I mention in previous post Zephyr RTOS is an interesting initiative started by Intel, NXP and couple other strong organizations. With so well founded background future for this RTOS should look bright and I think it will quickly became important player on IoT arena. Because of that it is worth to dig little bit deeper in this RTOS and see what problems we faced when trying to develop for some well known development board....

Categories: firmware iot


Starting with Nucleo-F411RE and mbed OS for command line enthusiasts

Published at November 23, 2016 · Piotr Król ·  9 min read

When I first time read about mbed OS I was really sceptical, especially idea of having web browser as my IDE and compiler in the cloud seems to be very scary to me. ARM engineers proved to provide high quality products, but this was not enough to me. Then I heard very good words about mbed OS IDE from Jack Ganssle, this was still not enough. Finally customers started to ask about this RTOS and I had to look deeper....

Categories: firmware iot


Chromium GStreamer backed for i.MX6 research

Published at November 1, 2016 · Piotr Król ·  3 min read

Recently I work on i.MX6 based project that requires video hardware decoding in web browser (best case in QtWebEngine, which is entire Chromium platform in Qt). Chromium After some research it appears that Chromium is not interested in providing external support for GStreamer-backed video hardware decoding. Truly going through all discussion related to this topic was very disappointing. Typically Chromium developers just close thread when discussion started to be noisy and there mass of complaining people raised....

Categories: app-dev


Netcat - how to transfer files without scp or ftp

Published at March 12, 2016 · Piotr Król ·  2 min read

One of my recent customers provided me hardware with custom Linux system. Distribution used on this hardware was very limited there was no developers tools, file transfer applications (like scp, ftp or even tftp) or communication clients like ssh. I had to deploy some firmware files to the system without modifying it. This was i386 machine. Of course I could compile something and add this software using usb stick or other stoarge, but what if I would not have direct access to hardware ?...

Categories: app-dev


Emulate Rapberry Pi 2 in QEMU

Published at December 30, 2015 · Piotr Król ·  4 min read

In the process of planning system testing for one of my clients I found that someone from Microsoft published patches with BCM2836 support to QEMU mailing list. I thought it is very interesting, because if it is possible to setup emulated Raspberry Pi many use cases can be tested faster and in more automatic way. For example checking how application behave when running on more then one device at once, testing massive deployment process, stress testing and finally speed up debug-fix-test process....

Categories: app-dev os-dev


Linux, RPi and USB over IP updated

Published at October 27, 2015 · Piotr Król ·  4 min read

Because of increasing interesting in USB over IP topic I decided to refresh my old post. I will focus on doing the same thing with more recent version of Raspabian. If you need more information please read my previous post. Setup SD card First get recent version of Raspbian, then unzip and dd it to SD card: 1 sudo dd bs=4M if=2015-09-24-raspbian-jessie.img of=/dev/sdc If you are impatient and want to know what happen in background you can use this method of tracking dd progress:...

Categories: os-dev


Building Android 4.2 LiveSuit image for Cubietruck (Allwinner A20)

Published at September 16, 2015 · Piotr Król ·  7 min read

Treating A20 boards like outdated piece of HW by vendors makes building Android for Cubietruck not trivial task. Finding documentation, mailing list or blog post that clearly describe steps is almost impossible. Most of links to SDK are broken and instructions outdated. Because of that I decided to leave couple notes for me and all of you lost in this madness. Hopefully below steps can build foundation for future development and improvements....

Categories: os-dev


Setup for Linux kernel development on Cubietruck

Published at September 1, 2015 · Piotr Król ·  8 min read

During last couple of months I see quite big interest in building products on A20 SoC. This chip can be bought for 6USD in quantity. Most important features are: Dual-Core ARM Cortex-A7 (ARMv7) Mali-400 MP2 HDMI, VGA and LCD MMC and NAND OTG and 2 Host ports Tracking media related to low-end mobile market IMHO the hottest SoCs are Allwinner A20 and Rockchip RK3288. A20 ship with dozen development boards like Cubieboard or pcDuino series, Banana Pi, MarsBoard or Hummingbird....

Categories: os-dev


Raspberry Pi kernel repository aggregating patches for Linux mainline

Published at October 15, 2014 · Piotr Król ·  3 min read

Since several months I’m trying to find my way to embedded Linux programming. My hardware set was very limited I had only one board that can be called “embedded” and it was Raspberry Pi. Because I am more interested in firmware/OS level then hardware I tried to figure out what is going on with RPi kernel. After taking brief review of raspberrypi/linux GitHub repository I realized that close to my heart is upstreaming effort....

Categories: os-dev


virtualbox-dkms: fix alloc_netdev problems when compiling with 3.17.0-rcX headers

Published at September 20, 2014 · Piotr Król ·  4 min read

Intro Because of my bug hunting approach of using latest kernel I experienced problem with compiling VirtualBox modules with 3.17.0-rc5 version on my Debian Jessie. Issue is well known and described for examples here. Problem manifest itself with: 1 2 3 4 5 6 7 8 9 10 11 12 ------------------------------ Deleting module version: 4.3.14 completely from the DKMS tree. ------------------------------ Done. Loading new virtualbox-4.3.14 DKMS files... Building only for 3....

Categories: app-dev


How to fix backlight issue on IdeaPad y510p

Published at August 23, 2014 · Piotr Król ·  1 min read

Today I decide to switch to latest kernel (3.17-rc1) on my IdeaPad y510p. I hit only one annoying problem until now - after booting my main screen was dimmed. I tried all instructions from top google hits for all possible configurations of keywords linux, y510p, backlight issue, etc. Especially I tried all methods from Arch Wiki. Finally I found solution, by greping modinfo for my Intel graphics card: 1 2 3 4 5 [23:55:24] pietrushnic:~ $ sudo modinfo i915|grep backlight parm: invert_brightness:Invert backlight brightness (-1 force normal, \ 0 machine defaults, 1 force inversion), please report PCI device ID, subsystem \ vendor and subsystem device ID to dri-devel@lists....

Categories: os-dev


Linux, RPi and USB over IP

Published at August 18, 2014 · Piotr Król ·  10 min read

Trying to google ‘USB over IP’ doesn’t give much except some business web pages that give you it as a service. This brings some information about potential on the market IMHO. Main idea is well presented on open source project page for usbip. I really recommend to read USB/IP - a Peripheral Bus Extension for Device Sharing over IP Network technical paper it describe briefly technical details and capability. In short USB over IP is a sharing system aim to expose USB devices from server to client encapsulating USB I/O messages in TCP/IP payload....

Categories: firmware


Linux (Debian Wheezy) on Lenovo y510p

Published at May 16, 2014 · Piotr Król ·  4 min read

After long analysis I decide to buy new laptop. I had about $1000 (or 3000PLN) and most important things to me were: i7 CPU - because of performance (of course at least 4700 series) SSD - again performance 17.3” - working space no OS/FreeDos/Linux - I will not pay additional fee to M$ for system that I won’t use Full HD resolution at least 8GB RAM non-glare display First I realize that my budget is to small for such a hardware....

Categories: os-dev


0x6: Root file system for embedded system

Published at June 7, 2013 · Piotr Król ·  10 min read

Introduction To make our embedded linux work as virtual development platform we need some environment after booting. There is many approaches to get working root file system but I will use the easiest one as an exercise. I don’t want to create full embedded distribution (this is good plan for future works). Right now I will be happy with simple initramfs based on BusyBox. For all interested in creating own root filesystem there are few places where you can find information:...

Categories: os-dev


0x4: Linux kernel for embedded system

Published at June 7, 2013 · Piotr Król ·  3 min read

A little history Thinking about embedded linux probably leads to first try of porting linux to different architecture. I did google research (I know I should probably read mailing list archive) and found that there were few attempt to port linux to different platform. There is no clear information about which port of linux was first. This is probably because many hackers didn’t report their effort. Arguably earliest out-of-tree version was probably for Acron A5000 (arm), Motorola 68000 (m68k) around Spring/Summer of 1994....

Categories: os-dev


0x3: Embedded board bootloader

Published at June 7, 2013 · Piotr Król ·  3 min read

What is bootloader ? It is a program written to bring up more complex code (eg. kernel). On very simple system it can even not exist. Bootloader should prepare all required hardware that kernel or different operating software will need at its start point. It is hard to create cross platform bootloader because of variety of system requirements. Why we need bootloader ? The true is that we don’t :) because we can simply pass kernel and initramfs as parameters to QEMU, but it is not common practice for real development environment....

Categories: firmware


0x2: Toolchain for Virtual Development Board

Published at June 7, 2013 · Piotr Król ·  4 min read

Introduction This is probably the most complicated topic of all related to embedded development but we need to deal with it at the beginning. I read a lot about toolchains but still don’t know enough to explain details. I think that best answers are in crosstool-ng documentation. What is toolchain ? Toolchain as the name said is a set of tools chained together, so output of one tool is the input for different tool....

Categories: app-dev os-dev


0x1: Qemu as an environment for embedded board emulation

Published at June 7, 2013 · Piotr Król ·  2 min read

Table of contents Introduction Compilation Kudos Introduction QEMU is a CPU emulator using dynamic binary translation to convert guest CPU instructions into host CPU instructions[1]. It supports many architectures from x86, through ARM and MIPS, to MicroBlaze. According to compilation configuration target list QEMU targets 26 different softmmu types. Only for ARM it supports 33 machines (like ARM Versatile/PB (ARM926EJ-S) or Samsung NURI board (Exynos4210)) and 28 CPUs (with cortex-a9 and pxa270)....

Categories: app-dev os-dev


0x0: Intro to Virtual Development Board building

Published at June 7, 2013 · Piotr Król ·  2 min read

Preface There are many reasons why ambitious programmers should care about huge rush in embedded market. IMO there is great potential in it. I don’t want to go deep into this but take a look at all tablets, phones, smart TVs and other cool stuff like wireless in you washing machine or refrigerator (ok this two are right now only a gadgets :) ). This is all embedded. Another thing is that wages of experienced embedded developers are really high....

Categories: firmware


Yet another quick build of arm-unknown-linux-gnueabi

Published at April 3, 2013 · Piotr Król ·  3 min read

So I decide to check what is going on with crosstool-ng and refresh my old post about building arm-unknown-linux-gnueabi toolchain. Last post was pretty popular, so definitely this is direction I should follow :). I will not repeat myself, so if you encounter any problems please check last post, section with known problems in crosstool-ng doc/ directory or RTFM. Let’s begin: Get the latest crosstool-ng As usual I’m trying to use latest version possible....

Categories: app-dev os-dev


Tmux multiplexer and vi-like keys in copy-mode

Published at March 19, 2013 · Piotr Król ·  1 min read

So I tried to write second post for my new blog but to effectively work using terminal I need terminal multiplexer. I switched to tmux from screen because I reach point that I can’t do some things in it in easy way and performance was poor. Also activity of tmux developers is better than for gnu screen. I also experienced annoy buffer crashing especially after come back from lock mode or cmatrix much but after reading few articles about alternative for screen I switched to tmux....

Categories: miscellaneous


Short hint for all those who use vim and pathogen

Published at January 15, 2013 · Piotr Król ·  1 min read

Today, after updating my workspace to latest version I encounter below error during vim running. Error detected while processing function pathogen#runtime_append_all_bundles: line 1: E121, E116. Quick look on pathogen runtime_append_all_bundles function and I found...

Categories: miscellaneous


Mutt tutorial part 4 - html mails, address book and other useful features

Published at May 13, 2012 · Piotr Król ·  2 min read

How mutt can handle mails in html format ? Takling about html mail handling is talking about handling any type of Multipurpose Internet Mail Extensions. Mutt supports handling for all MIME types in one place for all programs. This place is .mailcap file. Googling a little bit I found below mailcap file configuration (kudos to Bart Nagel). 1 2 3 4 text/html; pandoc -f html -t markdown; copiousoutput; description=HTML Text; test=type pandoc >/dev/null text/html;lynx -stdin -dump -force\_html -width 70; copiousoutput; description=HTML Text; test=type lynx >/dev/null text/html; w3m -dump -T text/html -cols 70; copiousoutput; description=HTML Text; test=type w3m >/dev/null text/html; html2text -width 70; copiousoutput; description=HTML Text; test=type html2text >/dev/null Of course we need to install all applications to make mailcap work correct:...

Categories: miscellaneous


Mutt tutorial part 3 - sidebar, URLs in e-mails

Published at May 13, 2012 · Piotr Król ·  2 min read

Information in this post came from lunar linux page. Kudos to its author. In this post I want to discuss two topics: sidebar and how to open urls form inside mutt. Sidebar is mutt feature delivered in mutt-patched package in Debian. It cause to split standard mutt window in two parts. In first we can find list of folders defined in the $HOME/.muttrc file, second window is a known old window with the list of posts....

Categories: miscellaneous


Mutt tutorial part 2 - secure login

Published at May 13, 2012 · Piotr Król ·  2 min read

This is second post of mutt tutorial series. As in the previous post for below information I need to thank Kousik for posts about gpg and using it with mutt. But probably the most important to simplify this method was Fau comment here. So going to the point of secure login for mutt we need gpg. First of all we need to install it by simply: 1 sudo apt-get install gpg After that we generate our keys by:...

Categories: miscellaneous


Mutt tutorial part 1 - setup IMAP account

Published at May 13, 2012 · Piotr Król ·  3 min read

Mutt is one of those programs that make people call you a linux geek, nerd or a snob. This is because using TUI or command line tools in world of fancy GUI for most people is weird. What’s so great about mutt? I probably still have not found much of its advantages, but at first glance we can notice a few things. First, it keeps Unix convention of small programs for specific task “Make each program to one thing well” or KISS....

Categories: miscellaneous


How to download videos from videos.linux.com

Published at April 6, 2012 · Piotr Król ·  1 min read

Therefore, I’m leaving for the Easter holidays I wanted to download some lecture on embedded systems, which was presented at the 2012 Embedded Linux Conference. Although I regret I found that I could not find as good quality copy in the network as on the Linux Foundation page. It is unfortunate that linux.com site does not have the possibility of direct downloading video files. But there is a workaround. Follow below tutorial:...

Categories: miscellaneous


Quick build of arm-unknown-linux-gnueabi with crosstool-ng

Published at March 14, 2012 · Piotr Król ·  2 min read

You might be surprised at how much you have to make to correctly build arm-unknown-linux-gnueabi config based toolchain with crosstool-ng. As you can see examples of many open source projects, the man’s work is a rare resource. The result of this economic fact is that the attempt to build configuration arm-unknown-linux-gnueabi is not a simple task and during an operation you can come across many problems. Although I am not afraid of problems and effectively try to fight them and of course sharing the results of my work....

Categories: app-dev os-dev


Hostname generator

Published at February 20, 2012 · Piotr Król ·  1 min read

Many times happened that I spend time, during the installation of the new system, whether it be a virtual physical machine, wondering about it’s hostname. One day I asked myself the trouble searching for host name generator. Best I could find (currently second in the results of google) is rospo.net. It gives you the choice of category for the host name. My favorite, as a fan of fantasy is “Characters from Tolkien”....

Categories: miscellaneous


Improve productivity by tracking work environment with git - vim

Published at February 20, 2012 · Piotr Król ·  3 min read

In this post I try to describe my vim configuration procedure and how it is connected with git. The whole concept is based on keeping all the configuration files in a separate directory. These files are connected using symbolic links in places where system or application requires it....

Categories: miscellaneous


Improve productivity by tracking work environment with git - preparation

Published at February 19, 2012 · Piotr Król ·  1 min read

Update: My repository is available here. Below is first post from series in which I want to describe my experience gained in attempt to enhance my productivity by using git to control the contents of some files in my home directory. The first step to improve the productivity is good organization of working environment. It happens very often that I work on multiple machines both physical and virtual. Therefore I need a good mechanism to share knowledge, experience, code, configuration and many other things....

Categories: miscellaneous


Set irssi under debian to use freenode server

Published at February 15, 2012 · Piotr Król ·  1 min read

Very short manual on how to set up irssi to work with freenode servers. First, install irssi: 1 sudo apt-get install irssi Run: 1 irssi For freenode write: 1 /connect holmes.freenode.net Send register command for your {nickname} and add information about your {e-mail}: 1 /msg nickserv register {nickname} {e-mail} Copy and paste line, which you get from freenode registration server to your mailbox, to irssi....

Categories: miscellaneous


Tmux as screen replacement and productivity accelerator

Published at January 6, 2012 · Piotr Król ·  5 min read

As I wrote in previous post I switched from GNU screen to tmux. I use it for a few moths and have to said that I’m really impressed by simplicity, performance and community support in this project. In this post I want to discuss my configuration and useful additions for it like tmuxinator, session logging, colors or status bar configuration. Basics Debian contain tmux package but for stable and testing release it is pretty old version....

Categories: miscellaneous