Embedded Linux development is a complex task. You need tools on the target and the host and its important to setup everything so we can build and debug easily. Let go over the process. You can do it yourself , just build an Embedded Linux system with QEMU Building For The Target To build code […]
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 […]
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 […]
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 […]
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 […]
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 […]
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, ….) […]
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 […]
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 […]
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) […]