Category: Linux

Yocto Project Introduction

Building Embedded Linux system is a complex task, you need to choose a toolchain, configure and build bootloader, kernel, file system and applications. It becomes more complex to maintain the process over more many products. To build a system, you can use some tools like buildroot, crosstool, busybox and more Yocto project helps to solve […]

Read more

Embedded Linux – Working with QT

Qt is a great framework for building cross-platform applications. It provides a set of classes to wrap almost any OS service and you can write your application once and compile and deploy it many. Qt is also a great choice for embedded Linux system. If you need GUI, Qt is the fastest way. Write your code […]

Read more

Building Embedded Linux System with Qemu

In my Embedded Linux courses, I’m using Qemu to simulate a Linux system. Qemu simulates many boards including hardware, interrupts, networking and more. In this tutorial, I’ll cover the steps to build a complete system including kernel, filesystem, and application Qemu – Building from source You can install binary version but it is better to […]

Read more

10 Things You Can Only Do With GDB

Debugging is a complex task. Most of the work time, developers spend on debugging and it is important to be familiar with many debugging tools In Linux, the native debugger is GDB and it is command line based and looks ugly and primitive. Many developers , especially those who moved from windows and worked with tools like […]

Read more

Linux – fork system call and its pitfalls

To create a child process in Linux/Unix , you can use clone(2) or fork(2). We use clone(2) is to implement multithreading and namespaces. We use fork(2) to create a “real” (child) process, i.e. separate address space and resources In this post i will cover fork, its patterns and its pitfalls Lets start with a simple […]

Read more

Linux – Inside the Build Process

The Executable and Linking Format (ELF) is the file format standard for executables, objects, shared libraries and core dumps in Linux/Unix. The newest debug information format, compatible with ELF, is DWARF 5 If you are not writing a new compiler or debugger it is not necessary to understand every bit on those formats but there are […]

Read more

Linux – Handling Signals in a Multithreaded Application

Signals are very useful feature in linux to send notification from one process to another and from the kernel to the process. Signals are sent in some error cases (accessing wrong memory address, bus error, floating point error, …) and also to inform the user application (timer expired, child process finished, IO is ready, ….) […]

Read more

Understanding Linux Kernel Preemption

While configuring a Linux kernel, we can set some parameters that effect the system behavior. You can work with different priorities, scheduling classes and preemption models. It is very important to understand and choose the right parameters. In this post I will cover the different preemption models and how does each one effect the user and […]

Read more

Linux Control Groups

Using cgroups you can limit resource usage of processes , for example if you have a web server and you want limit its memory usage to 1GB its very easy to do with cgroups. This is also a basic building block for containers First we need to install some tools (in my example im using […]

Read more

Creating a Linux bridge

A network bridge helps you connect 2 different networks with the same characteristics (Ethernet for example). Its very easy to implement it in linux using some tools Example We run Qemu  image with tap interface – we can connect from the qemu image to the linux host but we cant access the entire network (internet) […]

Read more