Building Embedded Linux for Use in QEMU

In the last couple of weeks, I had been reading books about building embedded Linux systems: Embedded Linux Primer and Building Embedded Linux Systems. The former is a good start to get familiar with the world of embedded Linux. While I found the latter provides more detailed technical steps to build embedded Linux systems. I have walked through the steps given in the latter book, but it was unsuccessful due to toolchain version incompatibility. Having tried to update the tool versions, I still couldn’t get it built successfully.

After googling for a while, I found this nice tutorial. By following the guide, I managed to build Linux kernel 4.4.0 and rootfs image which was populated using Busybox. They were then run on QEMU emulating Versatile Express Development Board.

arm-vexpress-4.4.0

The feeling to see the screen above for the first time was priceless.. You know what I mean 🙂

One small note about the tutorial above is that there is a change on the link of Linaro ARM compiler. The link below is that I refer to:

https://releases.linaro.org/components/toolchain/binaries/latest/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz

Also, in the steps of building the Busybox, the tutorial missed the install command which should be invoked after compile step (make -j4). So I used this command:

ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make install

The above command effectively create and populate a directory called _install, whose contents that will be copied in our root file system.

Advertisements