Preparing to build Linux with Yaffs


This video covers the preparation needed to include Linux in Yaffs - describing the kernel build-tools needed, how to get the kernel source code and Yaffs source code. It's about 175Mb and 6m30 long.

Here's the script for the video:

Hello, today I'm going to show you the tools you need to compile Yaffs into the Linux kernel. If you've compiled Linux before, then this tutorial is not appropriate for you, and you should skip to the next one.

Yaffs is the most widely used file system which is specialised for Flash memory. It's used in millions of devices, both under Linux and other operatings systems. It's available under the GNU Public Licence – the GPL – and commercial terms. You can find out more about Yaffs at

This demo is being run on Intel x86 because the end result is available for you to experiment with under Vagrant and Virtualbox, but with some slight changes we could target another architecture – for instance ARM. If you've never used Vagrant, it provides a way to get a virtual system up and running in a few minutes. You can download the Vagrant box from the Yaffs web site.


We're starting off with a stock Ubunutu Precise 12.04 386 server. We're using 386 because it's the lowest common demoninator, so the virtualbox will run on any system capable of running Virtualbox, but this works just as well for 64 bit architecture.

Here we are at the command-line of a brand-new installation. The server has been configured for the minimum – it only has ssh, and a couple of othre things required for Vagrant. Of course there's no requirement for any of this for Yaffs.

We need git version control to download Yaffs and the kernel source

sudo apt-get install git

We need these tools to build the kernel

sudo apt-get install crash kexec-tools makedumpfile kernel-wedge

sudo apt-get install ncurses-dev libncurses5-dev

sudo apt-get install build-essential fakeroot

And we need this to automate the job of creating a debian kernel package

sudo apt-get install kernel-package

Okay, we have all the tools I'll be needing, so I'm going to go ahead and make a working directory.

mkdir kernel

cd kernel

Of course we're going to need Yaffs, so I'll go ahead and download that

git clone git://

That puts it into the Yaffs directory.


This copy of Yaffs is licensed under the GNU Public Licence – the GPL, so I must make changes available under the GPL too. We also license Yaffs under commercial terms, removing the need to make your code available to others. Check our website for details.

Now I need a copy of the kernel source code. I could have used one directly from, but because this demo is running on ubuntu, I'm going to grab the ubuntu kernel. This has the benefit of including the debian build rules.

git clone git:// source

cd source

Here it is


And that's everything necessary to build the kernel with Yaffs. In the next video we'll show you how to configure and compile the kernel with Yaffs. More information about Yaffs is available at Thanks for watching.