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.
1. Big Endian (The “Natural” Way) MSB first & LSB last as we normally write Memory Layout for 0x12345678: Address Value 0x100 12 0x101 34 0x102 56 0x103 78 2. Little Endian (The “Reverse” Way) Little Endian stores the LSB first (at the lowest memory address). Most Intel/AMD processors (x86 architecture) use this. Memory Layout for 0x12345678: Address Value 0x100 78 0x101 56 0x102 34 0x103 12 How to Check We can inspect the first byte of an integer to see what lives there. ...
Linux Theory User space <-> Kernel space & Driver Interface What communication method i use to communicating between User space to Kernel space. How do the driver/device know which application is communicating with it. write() api in user and kernel space, what are difference in arguments. From which header write() is included. Explain ioctl calls and its handling in kernel and user space. What are the things application is dependent on to call a particular ioctl. What is systemcall table Device Tree & Platform Why and How is Devise Tree used. How is the device tree actually passed or accessed by the drivers. How is the physical device be mapped to the driver device. How is the platform bringup done? And what do we mean by platform devices. Interrupts & Deferred Processing How does interrupt is managed by the kernel? Describe each modules called which are done before calling isr and what are the propagation delay while interrupt is called. How are interrupts managed by the kernel What are arguments to a particular interrupt regestering function Top half and bottom halfs, how are the complex isr managed. Top halves and bottom halves Memory Management & DMA How kernel manages memory, like how malloc works How is the TLD used to manage physical and virtual addresses? What exactly kernel does? What is DMA and how does the driver handels it. What is DMA and how it works? Kernel Debugging & Virtual FS How will you debug kernel crash or panic? What is procfs and sysfs Synchronization & Concurrency Mutex semaphor explanation and difference Race and deadlock conditions Boot & Init Linux boot process What are init systems? Example systemd or any other init system Misc Kernel / Language Concepts Describe static and auto What is volatile used for? Can const be volatile? Write sudo code for character device driver Embedded Communication Protocols I2C Start and stop bits, the data and clock config at start and stop SPI lines Programming Theory Concurrency & OS Concepts What is the difference between Mutex and SpinLock What are mutex, threads, spinlocks Data Structures LinkList Data Structures: Stack, Queues, Heap C Language & Memory Model C Concepts: BSS, Data Segment, ReadOnly segment. Diff between structure and union and their sizes What is pass by value and pass by reference look like? Calculate the no. of elements inside of array if the array pointer is passed to a function. Function Pointers & Declarations Write declaration of An array of 5 pointers to a fucction. These functions are taking int arg and return int Program Execution & Memory Layout What exactly happens, what would be loaded in memory and which segments main(){printf("Hello World")}; cc main.c ./a.out Data Structures & Algorithms (DSA) Arrays & Searching Get the highest and 2nd most highest number from unsorted array without sorting it. int arr[10] = {5, 10, 15, 3, 9, 21, 7, 12, 2, 16} Write a program to search inside of the array in 0(n/2) time complexity. Get a number from user and count the no. of times that number is present inside the array. Bit Manipulation Convert 0x12345678 to 0x34127856 using bit operators Write a macro to toggle a given bit Get a number in hex and start and end range number from user. Write a function which sets the number from the start till the end bit. The program should be independent from the machine architecture. Count no of set bits in a number Linked List Problems Reverse a link list Solve the error occured(sig. fault) in the last question of 1st round. Write a program to find middle point of a linked list Implement Linklist, its structure size, padding, allocating and print list wrappers. Memory Management Assume you have a memory pool of 1G allocated using malloc(). Now, implement my_malloc() and my_free() which will operate on this 1G chunk of memory to service multiple threads in an application. Try to implement the APIs which can alloc/free in O(1) time complexity. Multithreading Write a program which has 2 threads, 1 will take input from the user and another thread will do some processing on that input. Program to print from 0 to 100 sequentially using 2 threads, 1st thread will print only even values and 2nd thread will print only odd values. Debugging & Miscellaneous Implement sizeof operator Write a program to print diamond pattern Print all prime numbers between 1 to 10. Follow up: Store the prime numbers in singly linked-list.
“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. ...