Category: Build

Yocto Training: Essential Build Packages

build-essential is a metapackage on Debian and Ubuntu that installs the basic tools for compiling software. It typically pulls in:

  • gcc and g++ — C and C++ compilers
  • make — runs build instructions
  • libc6-dev — C library headers and development files
  • dpkg-dev — tools for building Debian packages

chrpath is a small Linux utility for inspecting and changing the RPATH/RUNPATH stored in an ELF executable or shared library. These paths tell the dynamic linker where to look for required shared libraries.

It’s commonly used during packaging to remove or adjust build-time library paths before distributing a program. Use it carefully: changing the path incorrectly can prevent the program from finding its libraries.

chrpath -l ./program # show its RPATH/RUNPATH
chrpath -d ./program # remove it
chrpath -r ‘$ORIGIN/lib’ ./program # set a relative path

cpio is both a command-line utility and a package that provides it. It creates and extracts archive files, often used for backups, packaging, and moving files while preserving metadata.

You may see it in Linux system workflows—for example, in initramfs images used during boot, or in software package archives. It’s similar in purpose to tar, though the archive formats differ.

Create an archive from files under mydir

find mydir -print | cpio -o -v -H newc > mydir.cpio

Extract it into the current directory

cpio -i -v < mydir.cpio

-o creates an archive, -i extracts one, -v lists files as they’re processed, and -H newc selects the commonly used newc archive format.

Building the Solaris Kernel in 73 Easy Steps

Everyone and their grandmother builds Linux kernels. Many people build BSD, and some brave men even compile the OS X kernel every now and then. Why not compile your own Solaris kernel for a change?There is lots of documentation scattered out there, many pieces, incomplete, outdated and over-generalized tutorials. This will walk you through installing Solaris, adding all components required for building, and actually compiling a kernel in 73 easy steps.

Read more…

Rebuild init ramdisk for your own usage.

Basically when you update your kernel whether or not compiled by yourself, related init-ramdisk copied to the boot directory as well.This init-ramdisk built at the end of the stage in kernel building. This ramdisk includes several modules which is necessary during the boot processing.Sometimes, a user wants to include several customized modules into the init-ramdisk, so do work at the initial stage. There are several ways to include modules into the init-ramdisk.

Read more…

Blogged with the Flock Browser

Writing Windows NT Device Drivers

Some of the driver samples in this book have Assembly language files (.ASM files). You cannot refer to the .ASM file directly into the SOURCES file. Instead, you have to create a directory called I386 in the directory where the source files for the drivers are kept. All the .ASM files for the drivers must be kept in the I386 directory. The BUILD.EXE utility automatically uses ML.EXE to compile these .ASM files.

Its a valuable resource to know how to use asm files with driver build.

Writing Windows NT Device Drivers

Blogged with the Flock Browser