This procedure creates a root filesystem for an ARM Linux box, and it can be done from a non-ARM Debian-based system such as an x86 Ubuntu desktop.
In this post we will explain how you can create your own Debian rootfs with pre-installed packages of your choice, which to allow tiny Linux images to be created.
All steps below should work on any Debian host (Debian/Ubuntu etc) and are verified with Ubuntu 12.04LTS.
First of all you need to install the support packages on your pc
sudo apt-get install qemu-user-static debootstrap binfmt-support
Next you need to choose the version of Debian in this case we are building a wheezy image.
Now we will build first stage of Debian rootfs :
mkdir $targetdirsudo debootstrap --arch=armhf --foreign $distro $targetdir
Next copy the qemu-arm-static binary into the right place for the binfmt packages to find it and copy in resolv.conf from the host.
sudo cp /usr/bin/qemu-arm-static $targetdir/usr/bin/sudo cp /etc/resolv.conf $targetdir/etc
If everything is right we now have a minimal Debian Rootfs
sudo chroot $targetdir
View original post 315 more words