Embedded Linux

From OK6410 wiki

Jump to: navigation, search

Contents

Embedded Linux Development

The best way to start with embedded Linux development is to start working with Linux. All the pages on this wiki use free opensource Linux software which is commonly used in embedded development. For some special functions you will need a Windows XP box, but this can be avoided.

All the tutorials described here are tested on a Ubuntu 10.10 and 11.04 system. The first thing to do is to configure all the software which will give you already a lot of practice with Ubuntu.

It is strongly recommended to run through the tutorials in a chronological way, because the further the tutorial, the more knowledge is requested!

Linux Basics

After installing the Ubuntu desktop edition you can start experimenting with the basic command line commands. Most things about the basic use of Linux can be found on the Internet by Googling around a little bit. Here you can find a tutorial about permissions and running Debian/Embedian on OK6410.

Prepare your system

First of all we'll provide our Linux system with the necessary changes to start to work with our OK6410 development board. We need to take care of some hardware and software configurations before we can start.

Hardware Setup

The basic hardware setup which is necessary to start uploading and downloading data to and from the OK6410 board. There are two major systems: DNW and OpenOCD (which uses the JLink debugger). DNW is a variant of the software provided by Samsung and is very related to the included manuals.OpenOCD is a very universal Linux debugging server, but a little bit more complex as the DNW method. OpenOCD can be used with a lot of processors and debuggers. Remember that a traditional serial port is needed for both methods! A second section to configure is the serial port. This serial port is needed to communicate with the board when the display drivers aren't loaded yet. Below you can find all the tutorials to achieve the right configurations:

Toolchain Setup

After setting up the hardware, you need some kind of cross compile toolchain to build code for your OK6410 development board. Cross compiling, to be simple, means to compile executable code for a platform (a development board for example) on another platform (a PC for instance). You have several options for choosing a toolchain:

1. Use the delivered toolchain with the OK6410 board. This uses an older GCC version, which could cause troubles when you're trying to build newer C/C++ code. Click here
2. Use the Codesourcery free toolchain. This is a complete updated toolchain which is available in a handy setup-binary. Free and easy to use. Click here
3. Use Buildroot to make a system specific toolchain. Buildroot will be explained in a later tutorial.
4. Build your own toolchain (tutorial coming later)

Building and Programming the software

Now the really fun part begins, we can build the bootloader, the kernel and the file system and burn it onto the onboard flash chip. We'll start by compiling every separate element and upload it to the board. This is necessary to understand the complete structure of an embedded system and after this step we'll combine all those things using buildroot and QT! Have Fun!

UPDATE: From now on, there will be 2 sections handeled for u-boot and the kernel: the 2.6.28 which uses the older 2.6.28 kernel and u-boot image and the 2.6.36 version which uses a newer version of u-boot and kernel 2.6.36. All the pages will be split into these two sections as quickly as possible

1. But again, First things first. To begin we need to build the U-boot bootloader. The tutorial on how to do this can be found here. Updated!
2. Next point is to compile the Linux Kernel. This tutorial can be found here. Updated!
3a. Program U-boot and the Kernel using OpenOCD. The most universal way, but takes a lot of time. Click here. Updated!
3b. Program U-boot using OpenOCD and Linux kernel using DNW. Goes much quicker but remember that DNW is a Samsung only application! Click here. Updated!
4. The last step is creating a basic rootfs by using Busybox and flash it to the board. Click here. Updated!

Buildroot

After completing every step manually, it's time to do everything with some more automation. We will use Buildroot to accomplish this. Buildroot builds a complete filesystem, u-boot and kernel image out of one configuration file.

1. Make a Basic system using Buildroot. Click here. Updated!
2. Use the Buildroot filesystem to set up a NFS server. Click here. Updated!
3. Use buildroot the setup the ALSA sound system. Click here
4. Use buildroot to create an SSH server on the OK6410 (needed for software development). Click here

Having some fun

After this have part of configuring all the hardware and software you need, it's time for some fun. You can do several things to relax and enjoy all the hard work:

  • Use the OK6410 board to play the old game Doom. Click here
  • Watch all kinds of movies on the OK6410. Click here
  • Create your own Boot logo for the Kernel Click here


Hardware development is now ready! You can start developing software for the OK6410. Software Development Section >>>

Personal tools