Why is the Orise Tech. SPFD5408A Datasheet so darn hard to find??? Dunno, but I found it and thought I would share for anyone else who needs it as well.SPFD5408A Datasheet
Latest Entries »
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.
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.
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.
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:
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.
When it finishes, have a look in the output/images folder – These are the files of interest.
- 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.
(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.)
This quick quide aims to make it simple to setup an ARM toolchain that can then be used to cross-compile code to run on a FriendlyARM Mini2440 embedded linux board.
Firstly, you will need to download Buildroot (duh!) – This can be obtained from http://buildroot.net/downloads/. Grab the latest version and extract it.
wget http://buildroot.net/downloads/buildroot-2010.05-rc3.tar.bz2 tar jxvf buildroot-2010.05-rc3.tar.bz2 cd buildroot-2010.05-rc3
Buildroot requires various development programs to be installed on the host computer. From memory Gentoo has them all pre-installed, but on Ubuntu you will need to manually install them with the following command:
sudo apt-get install libncurses5-dev bison g++ flex gettext texinfo patch libtool autoconf
Next we need to run the Buildroot configuration system
Now we can choose what we want buildroot to do. Buildroot is normally used to build a root filesystem with various programs installed. This filesystem is then used as the base linux system that runs your Mini2440. To do that it needs to generate a toolchain that can cross-comopile code that runs on ARM cpus. Today we are only interested in the toolchain, I’ll post another blog about creating a rootfs later.
Change the “Target Archatecture” to “ARM”
Change the “Target Archatecture Variant” to “arm920t”
Under Toolchain enable “large file (files > 2 GB) support”, “IPv6″ (optional), and “WCHAR support”.
If you have a quad core processor with lots of memory (4Gb) you can increase “Number of jobs to run simultaneously” to 5 or 6 under “Build Options” which should speed things up. If running under virtualbox/vmware keep it to 3.
Exit menuconfig and make sure to save your changes as you exit (it will prompt). Now, go have a cup of coffee while the toolchain builds. On my Intel 9400 it takes about 15 mins, or 20 mins if running in virtualbox/vmware.
When it’s finished you’ll have a completed toolchain located at ./output/staging/usr/bin. To use it you just need it’s location to your PATH environment variable.
Obviously you’ll need to change to above path to whatever it is on your system.
The last step is to set the CROSS_COMPILE environment variable. This tells the computer what name to use when cross compiling programs
This is my new blog. Not too sure what I’ll put here yet, but we’ll see I guess.