This is a simple quick-start guide to getting Buildroot working with a Friendly ARM Mini2440 dev board.
Buildroot requires various development programs to be installed on the host computer. From memory, Gentoo has them all pre-installed, but on Ubuntu/Debian you will need to manually install them with the following command:
sudo apt-get install libncurses5-dev bison g++ flex gettext texinfo patch git-core libtool autoconf subversion
The next step is to download the latest Git version of Buildroot. There have been some recent changes that allow the use of non-standard u-boot and kernel packages, this is why we can’t use the last release version.
Change to the directory you want to place Buildroot (git will create a new directory to place it in) and run
git clone git://git.buildroot.net/buildroot
As Buildroot downloads all it’s own packages it is handy to have a download directory that is located outside the Buildroot folder. This prevents you deleting all your downloads when you rm -rf your Buildroot folder and start again! Note that when you run “make distclean” the symbolic link is deleted, so don’t forget to replace it.
mkdir dl
cd buildroot
ln -s ../dl
Buildroot uses a menu based configuration system to change toolchain options and select packages to build. Most of the toolchain options can be a bit confusing at first, so don’t change anything until after you have a working system – you might end up going around in circles otherwise!
I have created a basic config file for a Mini2440 that builds a toolchain, basic busybox rootfs, u-boot (sort of), and a Kernel. It is not yet included in Buildroot so you will have to download it.
wget http://www.pauljones.id.au/temp/mini2440_defconfig -O ./configs/mini2440_defconfig
You will also need the Kernel config file as well. (I put this in the parent directory so it doesn’t get wiped when you do “make distclean”)
wget http://www.pauljones.id.au/temp/mini2440_kernelconfig -O ./configs/mini2440_kernelconfig
Ok, so now we are nearly ready to go. The last thing to do is configure everything – if this is your first time it should work without touching any of the settings.
make mini2440_defconfig
make menuconfig
There is one setting you need to change in the Kernel config – the screen size. This can be found in Device Drivers -> Graphics support -> Support for frame buffer devices ->LCD select (8 inch 640X480 L80 LCD)
Change it to suit your device.
make linux26-menuconfig
make
After about 40 seconds an error will occur building u-boot tools. I don’t know why this happens, but it’s trying to use the wrong compiler. Never mind, there is a work-around.
All we need to do is remove the custom Mini2440 u-boot from Buildroot and replace it with a more recent version. As this will overwrite our u-boot image we need to make a copy of it first.
cp output/images/u-boot.bin output/images/u-boot-mini2440.bin
Now run “make menuconfig” again so we can change u-boot to one of the built-in versions:
make menuconfig
Goto Bootloaders -> U-Boot
Change the board name to “smdk2410″
Change the U-Boot version to 2010.06
Now exit menuconfig (don’t forget to save your changes!) and run make again. You can now go and get a cup of coffee – This should take about 20 mins depending on the speed of your computer.
If you don’t need to build u-boot for your Mini2440 you can just make the above changes at the start. We can’t disable u-boot because Buildroot needs the program that converts the Kernel images to a u-image.
make
When it finishes, have a look in the output/images folder – These are the files of interest.
lsĀ output/images/
- rootfs.jffs2 and rootfs.tar – These contain the rootfs, as I’m sure you have guessed. Which one you need depends on how you boot your system – jffs2 if you boot from nand using u-boot, and tar if you use nfs or a flash card. Buildroot currently doesn’t have support for yaffs, so if you are still using vivi you will need to manually convert an ext2 file or just upgrade to u-boot.
- u-boot-mini2440.bin – This is the special Mini2440 version of u-boot. This is the file that you need to flash u-boot to your device
- u-boot.bin – Ignore this file, it’s built for the wrong device.
- uImage – This is the kernel image.
How you use these files is beyond the scope of this tutorial.
If you make any major changes and then find that you are getting errors, either compile or runtime, it is best to do a complete “make distclean” and start again. Make sure you save your config files first (.config for Buildroot and output/build/linux-custom/.config for the kernel) and recreate the symbolic link to the download dir.
Enjoy!
(ps. I hope to write a tutorial soon on how to build a crosstool-ng toolchain and integrate it with Buildroot – this reduces the compile time significantly.)
« Building an ARM toolchain for the mini2440 using buildroot Orise Tech. SPFD5408A Datasheet »

hi,
First of all thanks for this great tutorial.
I have a FriendlyARM board with 128MB NAND. I’ve done all above you mentioned and everything went smooth except for u-boot error, indeed I didn’t get a u-boot error when compiling buildroot so I went on.
After successfull compilation I’ve downloaded and write uImage and rootfs.jffs2 on the NAND via u-boot, kernel gave the error message below and stopped.
VFS: Cannot open root device “mtdblock3″ or unknown-block(0,0)
Please append a correct “root=” boot option; here are the available partitions:
Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I think kernel cannot find /dev/mtdblock3, like NAND driver does not work, because my u-boot
partititons are like;
MINI2440 # mtdparts
device nand0 , # parts = 4
#: name size offset mask_flags
0: u-boot 0×00040000 0×00000000 0
1: u-boot-env 0×00020000 0×00040000 0
2: kernel 0×00500000 0×00060000 0
3: root 0x07aa0000 0×00560000 0
active partition: nand0,0 – (u-boot) 0×00040000 @ 0×00000000
defaults:
mtdids : nand0=mini2440-nand
mtdparts:
and mtdblock3 corresponds to ‘root’ as expected.
I anm stuck here, any comment will be preciated.
Thanks in advance.
Two things:
1) the kernel config file that I mentioned was misnamed so I guess it wouldn’t have downloaded properly.
2) I was booting using NFS and didn’t have the MTD drivers enabled, so you are correct – the NAND driver didn’t work! Try enabling the MTD drivers in the kernel config and it should work.
Hi,
Great post, thanks…
I’ve problem when starting kernel, the message is:
VFS: Cannot open root device “nfs” or unknown-block(0,255)
Please append a correct “root=” boot option; here are the available partitions:
Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
I use nfs end boot parameter is:
bootcmd=nfs 0×31000000 192.168.0.2:/nfs/kernel/uImage ; bootm 0×31000000
bootargs=console=ttySAC0,115200 root=/dev/nfs nfsroot=192.168.0.2:/nfs/fs rw ip=192.168.0.3 mini2440=3tb
Why don’t start ?
Thanks
Luca
It seems that you don’t have NFS and NFS BOOT support in your kernel
Hi,
First of all thank you for this great tutorial and ready to run config files.
At the arm-linux-gcc error point appending arm-gcc to the PATH solves the problem (it seems for now.. compilation continues)
export PATH=$PATH:/yourpathtobuildroot/buildroot/output/staging/usr/bin/arm-linux-gcc
and then continue to make
Sorry for the typo..
it would be like this;
export PATH=$PATH:/yourpathtobuildroot/buildroot/output/staging/usr/bin/
and
Yes it solves.. fs and kernel had been created successfully with 2.6.35.6 kernel..
it is time to try..
Paul just a quick note to say thanks. I am an old hack but you saved me heaps of time. I just took delivery of a mini2440 with7″ LCD. Googled…found your blog…worked first time! Thanks again.
Now for Qtopia…
Thanks for the great guide.
The uboot compilation problem is caused by missing environment variable. I solved it by this way
$ export PATH=${HOME}/:${PATH}
$ make O=../out
Or you can go with
$ make O=../out CROSS_COMPILE=${HOME}//arm-linux-
Hi Paul,
Thank for your great job.
Can you please post another article about how to use buildroot to build the system for the micro2440 Friendly ARM board, using all the resource from the CD, rather than download from internet?
Because the micro2440 board came with an installation CD with all the necessary resource in it, so I wonder how to use them to build the system, rather than rely on the internet.
Thank you very much
hi Paul
Its really a nice article that i follow to make my Qt-4.7 RFS with demos(compiled) ..My problem is i can run the QT demo but my tslib is not working can u please guide me to make the touchscreen work..I my doing this development using Qemu-mini2440(compiled from source).
I am trying to compile the toolchain with qt support.
I added qt to the toolchain, using make menuconfig, but, after a while, when it start to compile qt, I get this error:
The tslib functionality test failed!
You might need to modify the include and library search paths by editing
QMAKE_INCDIR and QMAKE_LIBDIR in
Any ideas or clues on how to solve it?
Thanks.
Not sure. I assume you have selected tslib in menuconfig?
o you accept the terms of either license? yes
Creating qmake. Please wait…
make[1]: Entering directory `/mnt/data/buildroot/buildroot/output/build/qt-4.7.3/qmake’
make[1]: Leaving directory `/mnt/data/buildroot/buildroot/output/build/qt-4.7.3/qmake’
make[1]: Entering directory `/mnt/data/buildroot/buildroot/output/build/qt-4.7.3/config.tests/unix/endian’
rm -f endiantest.o
rm -f *~ core *.core
rm -f endiantest
rm -f Makefile
make[1]: Leaving directory `/mnt/data/buildroot/buildroot/output/build/qt-4.7.3/config.tests/unix/endian’
The system floating point format could not be detected.
This may cause data to be generated in a wrong format
Turn on verbose messaging (-v) to see the final report.
STL support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to ./configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to ./configure to continue.
make: *** [/home/ubuntu/data/buildroot/buildroot/output/build/qt-4.7.3/.stamp_configured] Error 101
ubuntu@ip-10-245-189-219:~/data/buildroot/buildroot$ make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i486-pc-linux-gnu
ubuntu@ip:~/data/buildroot/buildroot$ make -v
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i486-pc-linux-gnu
Paul do you know what the problem could be ?
ok i got it to built. but now i don’t know the login password.
i tried default with no password
It should be username: root with a blank password
Hey Paul,
When I get to the point of making the linux26-menuconfig, I get the following error -
tracy@Agamemnon:~/buildroot$ make linux26-menuconfig
mkdir -p /home/tracy/buildroot/output/target
if ! [ -d "/home/tracy/buildroot/output/target/bin" ]; then \n if [ -d "/home/tracy/buildroot/fs/skeleton" ]; then \n cp -fa /home/tracy/buildroot/fs/skeleton/* /home/tracy/buildroot/output/target/; \n fi; \n touch /home/tracy/buildroot/output/host/usr/arm-unknown-linux-uclibcgnueabi/sysroot/.fakeroot.00000; \n fi
find /home/tracy/buildroot/output/target -type d -name CVS -print0 -o -name .svn -print0 | xargs -0 rm -rf
find /home/tracy/buildroot/output/target -type f ( -name .empty -o -name ‘*~’ ) -print0 | xargs -0 rm -rf
touch /home/tracy/buildroot/output/build/.root
>>> linux custom Configuring
cp “./configs/mini2440_kernelconfig” /home/tracy/buildroot/output/build/linux-custom/arch/arm/configs/buildroot_defconfig
cp: cannot create regular file `/home/tracy/buildroot/output/build/linux-custom/arch/arm/configs/buildroot_defconfig’: No such file or directory
make: *** [/home/tracy/buildroot/output/build/linux-custom/.stamp_configured] Error 1
Seemed like a directory error but I can’t figure out what to move.
Thanks!
.