Bootstrapping CentOS rootfs for use with chroots/containers

We will see how to generate a rootfs tarball for redhat based system. Since we are targetting redhat based system, I am going to use debian based system (Ubuntu 17.10 64-bit - latest at the time of writing this post) as my host. We will generate rootfs tarball for CentOS 7 64-bit.å The below mentioned steps are validated on Ubuntu 17.10 desktop installation. Lets get started As usual the first step, install the required dependecy packages which in our case is yum. [Read More]

Bootstrapping a debian rootfs for use with chroots/containers

The aim this time is to setup a base rootfs for Ubuntu/Debian distro which can be used for setting up a chroot jail or to create a docker container base image. This blog is based on a earlier blog which I have written but forgot to publish around June, 2012. The below mentioned steps are validated on Fedora 25 Workstation installation. For setting up a debian based rootfs we need a tool called debootstrap. [Read More]

Cross Compilation Checklist

This check-list tries to document the obvious, to reduce the time spent fixing toolchain related errors while cross compiling.

  1. Export the toolchain location to the PATH environment variable
  2. Set proper --sysroot for CFLAGS, CXXFLAGS and LDFLAGS
  3. Set proper PKG_CONFIG_SYSROOT_DIR, PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR for pkg-config tool. This is important for build scripts which use pkg-config to determine the proper build flags.
Note: Use pkg-config >= 0.26 . There is bug with previous versions of pkg-config which ignores the PKG_CONFIG_SYSROOT_DIR value

A sample configuration

Note : Need to update the post on how to cross compile packages which use autoconf tools