Developer / Tinkerer
A Software Developer, Tinkerer and Electronics & Communication Engineer who enjoys exploring every detail of technology.
A Software Developer, Tinkerer and Electronics & Communication Engineer who enjoys exploring every detail of technology.
“Before Linux prints its first log, the CPU has already taken a long, carefully choreographed journey.” The Embedded Linux boot process is best understood by tracking where the CPU executes from at each stage. From power-on to a running kernel, execution moves through ROM → SRAM → DRAM. Kernel booting begins only when the CPU starts executing kernel code from RAM. 1. Power-on and CPU reset Everything starts with power-on or a hardware reset. ...
Overview Character devices are distinguished by the fact that they are accessed as a stream of bytes, much like a file. A character driver is responsible for implementing this behavior by mapping standard system calls to device-specific operations. Unlike block devices, which require an intermediate layer for buffering and management, character devices communicate directly with the Virtual File System (VFS). In the Linux kernel, character devices are identified by a major number (identifying the driver) and a minor number (distinguishing between specific device instances). ...
Purpose: Organize your learnings into a concise article that explains split choices, rules-of-thumb, exercise selection, and a weekly plan(for myself). Quick principles Target each major muscle group at least twice per week. Allow around 40+ hours between sessions for the same muscle group (aim for 48 hours when possible). Breath Prioritize compound movements (primary + secondary muscles) and use isolation to finish or correct imbalances. Keep the weight that much so that rep range is in between 8 to 15, not more not less. Breathe. Use progressive overload: increase reps or load when you can do the top end of the rep range Short dynamic warm-up before heavy sets; include movement prep for hips/spine/shoulders. Sleep, nutrition (adequate protein), and manageable cardio aid recovery. Which split to pick There are 2 kinds of popular slit variations: ...
Static site generators such as Hugo deliver speed, security, and simplicity by avoiding servers and databases. The challenge appears when you need a genuinely dynamic feature like user comments. This article explains how commenting systems fit into static sites, the common approaches, their trade-offs, and why the final solution—Hugo with Giscus—strikes an effective balance. The Core Issue: Static Sites Don’t Handle Dynamic Data Static sites pre-render HTML and serve it from a CDN or storage bucket. There’s no backend to: ...
The most powerful tool you can have is the ability to move information freely. Efficiently transferring files between your host machine and a QEMU‑emulated Buildroot system becomes essential when testing kernel modules, applications, or firmware artifacts. This guide explains how to enable SSH inside Buildroot, verify connectivity, and use scp to move files seamlessly from host to guest. Prerequisite Before proceeding, ensure your Buildroot filesystem includes the OpenSSH server. Inside Buildroot, enable: ...
1. Overview A kernel module provides a way to extend kernel functionality without rebuilding the entire kernel. Using the Buildroot toolchain ensures the module is ABI‑compatible with the kernel generated during your Buildroot build. QEMU then offers a convenient emulation environment to test modules without hardware. Linux kernel modules are dynamically loadable pieces of code that extend the functionality of the kernel without requiring a reboot or recompilation. They are widely used for device drivers, filesystems, and various kernel extensions. ...
Overview Buildroot is a powerful tool that automates building cross‑compilers, kernel images, bootloaders, root filesystems, and entire minimal Linux environments. Combined with QEMU, it provides a fast and fully emulated setup without needing physical hardware. Steps 0. Dependencies Before building Buildroot, ensure the following packages are installed on your host system: For Debian/Ubuntu: sudo apt install build-essential git wget cpio unzip rsync bc python3 \ qemu-system-arm qemu-system-misc qemu-utils flex bison libssl-dev For Fedora: ...
Overview When working with large graphics APIs like OpenGL ES and EGL, especially in complex systems like Android, developers face the challenge of managing hundreds of function declarations, pointers, and related metadata. A common and powerful solution is to use macro-based code generation with .in files. This approach, while adding some complexity, brings significant benefits in maintainability, consistency, and flexibility. This post explains what .in files are, how they’re used with macros, and why this pattern is so valuable in graphics stacks like OpenGL ES and EGL. We’ll also look at concrete examples and discuss the trade-offs involved. ...
Android and Linux systems rely on various communication methods for processes and threads to interact. Linux provides several IPC (Inter-Process Communication) mechanisms such as pipes, message queues, shared memory, sockets, semaphores, and signals. Android adds its own Binder IPC mechanism, which is widely used for communication between system components and apps. The Zygote process uses sockets for communication, while higher-level services (System Server, Media Server, Apps) primarily use Binder. For communication within the same process, especially between threads, Android uses the Handler message mechanism. ...
System Architecture Linux Kernel Layer Manages core system services such as security, memory management, process management, network stack, and driver model. Provides an abstraction layer between the hardware and the rest of the software stack. Start the swapper process of the kernel (pid=0): idle process. It is used to initialize process management, memory management, and load Display, Camera Driver, Binder Driver and other related tasks. Start the kthreadd process (pid=2): Create kernel worker threads kworker, soft interrupt threads ksoftirqd, thermal and other kernel daemons Hardware Abstraction Layer (HAL) Purpose: Standard interface for hardware. Structure: Multiple modules for specific hardware types (e.g., WiFi, Bluetooth). Function: Loads appropriate module when hardware access is requested. Android Runtime(ART) & System Libraries ART: Each app runs in its own VM (via DEX files). Features: Ahead-of-Time (AOT) and Just-in-Time (JIT) compilation, optimized garbage collection (GC), and debugging-related support. Native System Libraries: User space daemons, HAL, boot animation. Init Process (pid=1): Parent of all user processes. Starts daemons (ueventd, logd, healthd, installd, adbd, and lmkd) and services (servicemanager, bootanim). Starts the Zygote process (parent of all Java processes). Framework Layer Zygote Process: Forked by init (in init.rc), loads VM, preloads classes/resources, starts Zygote socket. System Server: Forked from Zygote, manages Java framework including ActivityManager, WindowManager, PackageManager, PowerManager and other services. Media Server: Forked from init, manages C++ services (AudioFlinger, CameraService, etc.). App Layer Launcher: First app process from Zygote (user’s desktop). Other Apps: Browser, Phone, Email, etc., each in its own process, all forked from Zygote. Syscall & JNI Syscall: Interface between Native (user space) and Kernel. JNI: Bridge between Java and Native (C/C++) code. Appendix JNI - Java Native Interface It defines a way for the bytecode that Android compiles from managed code (written in the Java or Kotlin programming languages) to interact with native code (written in C/C++). JNI is vendor-neutral, has support for loading code from dynamic shared libraries, and while cumbersome at times is reasonably efficient. ...