Understanding Forward Declarations in C

One of the best ways to learn systems programming is by reading real-world code. Recently, while reading the Linux kernel source, I noticed something interesting inside drivers/pinctrl/core.h: #include <linux/kref.h> #include <linux/list.h> #include <linux/mutex.h> #include <linux/radix-tree.h> #include <linux/types.h> #include <linux/pinctrl/machine.h> struct dentry; struct device; struct device_node; struct module; At first glance, these lines seem incomplete. We see declarations like struct device; but no actual definition. Where is the complete structure with all its members? Why didn’t file defining this structure isn’t included? ...

May 17, 2026 · 6 min · Ankit

Configure U-boot For Beaglebone Black

Overview U-Boot (Universal Boot Loader) is the go-to bootloader for embedded Linux systems. If you’re working with the BeagleBone Black (BBB), building U-Boot from source gives you full control over the boot process, from initializing hardware to loading your kernel. This guide walks you through cross-compiling and installing U-Boot on the BBB from scratch. This blog will explain how to compile and install U-Boot, and then either manually boot from the U-Boot prompt or use uEnv.txt to autoboot the kernel. You can also use extlinux/extlinux.conf to boot the kernel. ...

April 22, 2026 · 7 min · Ankit

Build and Install Linux Kernel For Beaglebone Black

Overview The BeagleBone Black (BBB) uses an ARM Cortex-A8 32 bit processor, so the kernel must be cross-compiled on an x86 machine and then deployed to the board. This blog will assume that you already have a os[debian/ubuntu] installed on your sd card. We’ll: set up toolchain fetch kernel source configure for BBB build kernel + modules deploy to SD card / board 1. Prerequisites Make sure you have: Ubuntu (or any Linux host) Cross compiler for ARM (arm) Install required tools: ...

April 8, 2026 · 3 min · Ankit