jump to navigation

Mini6410 – Getting started with Free Software September 22, 2010

Posted by Florian in Devices, GPE, Linux, OpenEmbedded.
10 comments

FriendlyARM is shipping the new Mini6410 for a little while now.  It is based on a 533MHz clocked Samsung S3C6410. I do not want  to repeat all the technical details here, an English description can be found here. Lets summarize the features in a simple sentence: It is fast enough for Qt and offers lots of ports for connectivity.

Mini6410 running an OpenEmbedded built GPE Image

Mini6410 running an OpenEmbedded built GPE Image

The image pretty much illustrates what we are up to do now – but lets take a look at the software shipped with the board first. Compared to the older Mini2440 the devices official support DVD offers several more options: We have pre-compiled images based on Android, XUbuntu and Qtopia and an advanced U-Boot which comes with a kind of menu for the basic tasks.  One major problem is that currently the documentation is available in Chinese only which makes it a little bit hard to handle. But translating single paragraphs of the more than 300 pages long PDF manual using Google Translator worked pretty well. The DVD contains important sources for Android, U-Boot and Linux. The Kernel is based on 2.6.28 for the SMDK 6410 reference design and heavily patched. Some parts are quite far from mainline Linux and should be updated to latest standards – apart from the fact the whole Linux support might want some rebase on 2.6.35.

Now we have a big pile eh… DVD with stuff that runs on the board already – what does OpenEmbedded help us with here? Well all the binary stuff serves some purpose but nothing is perfect – OE helps us with to become more flexible and consistent at the same time. XUbuntu is great with its large package repository to try out things – but it has quite some requirements about flash storage, RAM and screen size. With OE you have the choice to create a full featured desktop image or to build something that fits your particular need.

So lets take a brief look into OE setup for the Mini6410 and how to install an image built with OE.

If you are new to this topic you should get familiar with OpenEmbedded first. The official getting started document is a good thing to read first. The following section assumes you have your OE set up and cares about the Mini6410 specific bits only. Make sure to use a recent org.openembedded.dev or testing branch.

First set up your local.conf to build for the Mini6410 – if you are using multiple configuration files then make sure to distribute these bits over the files correctly:

MACHINE = "mini6410"
DISTRO = "angstrom-2008.1"
LIBC = "eglibc"
GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 de_DE.UTF-8 fr_FR.UTF-8 en_US.UTF-8"

This will select the Mini6410 as a target device, Ångström distribution and eglibc – this is the combination I tested. The last line defines a limited set of libc locales to be generated.

Now let’s build a filesystem image. I built a simple GPE based filesystem image first:

bitbake x11-gpe-image

If everything is configured correctly, your harddisk is large enough and your Internet connection ok you should get filesystem and kernel image in $TMPDIR/deploy/eglibc/images/mini6410. For the impatient of you or the ones who get bored during a build (no I don not suffer from this) I have uploaded my results here.

Finally lets go ahead an install these files into the internal NAND flash. I’m using U-Boot on the boards – we want to stay open and do not rely on propitiatory software. Keep this in mind if you intend to make a product: Any component you are not able to influence has potential to cause trouble and in most cases it will do this – sooner or later.

There are several ways to install files and to configure U-Boot. Here we use a quite generic solution using TFTP to transfer the images and fixed addresses. Not the best solution but the simplest. First if you do not have a DHCP server you have to configure networking:

setenv ipaddr <some IP for the board>
setenv serverip <your server's IP>

If you have a DHCP server you can skip this step and write “dhcp” instead of “tftp” in the commands below. These will download the files and install them into the internal NAND flash:

tftp 0xc0008000 uImage-mini6410.ubi
nand erase 0x80000 0x500000
nand write 0xc0008000 0x80000 0x500000

tftp 0xc0008000 x11-gpe-image-mini6410.ubi
nand erase 0x580000
nand write 0xc0008000 0x580000 ${filesize}

Finally we configure the boot parameters to match the installed kernel + filesystem and save these:

setenv bootargs console=ttySAC0,115200 ubi.mtd=2
   root=ubi0:rootfs-mini6410 rootfstype=ubifs
saveenv

(note that the first command needs to be entered in a single line)

We do not have to pass information about the MTD partition layout to the kernel since we follow the kernel’s built-in default in this configuration. Just reset your board and check if it boots into your shiny new filesystem. If something is wrong then please drop me a mail providing information (e.g. bootlog, screenshot, configuration files…). This could help to improve this little text and OpenEmbedded support for the Mini6410.

What now?

Try more useful targets with OpenEmbedded. If you like to build an installable cross toolchain matching your filesystem you could build the meta-toolchain-gpe target for example.

Enjoy!

Advertisements

Sim.One Images with OpenEmbedded September 3, 2010

Posted by Florian in Devices, Linux, OpenEmbedded.
4 comments

It took me a while to get started with the blog again… so let’s start with something tiny: OpenEmbedded images for the Sim.One. So far we had quite some documentation about filesystems on external media but what about the internal flash? We have 8MB which is enough for a tiny filesystem we can build with OpenEmbedded.

Sim.One (OpenEmbedded booth at LinuxTag)

OE has support for the Sim.One already and I just added the parameters to build jffs2 filesystems for the internal NOR flash. In order to build jffs2 images for the Sim.One use the current org.openembedded.dev branch.

OpenEmbedded Setup
I just want to introduce the basic ideas and useful settings for these images. More generic information about how to get started with OE can be found here. For my tests I used the minimal distribution definintion in OE and built a very small image. The relevant settings for your build configuration (local.conf) are as follows:

MACHINE = "simone"
DISTRO = "minimal"
LIBC = "eglibc"
IMAGE_FSTYPES = "tar.gz jffs2"

The minimal-image is a good starting point for the internal flash. The image does not include much of functionality but leaves some free space for additional software. OE does not build the filesystem only, it builds the kernel for us as well so that we can start with a consistent set of files. Let’s give it a try and install the built results – I assume you have a U-Boot shell and network+tftp server configured already.

Install Kernel

erase 0x60080000 0x6027ffff
tftp  0x60080000 uImage-simone.bin

Install Filesystem

erase 0x602c0000 0x60800000
tftp 0x602c0000 simone.jffs2

We need to tell the kernel where to find the patitions. The actual layout we are going to use is as follows:

Device    size        name
mtd0:     000c0000 "Firmware"
mtd1: 00200000     "Kernel"
mtd2: 00540000    "Root-FS"

I have set up the configuration of U-Boot in order to minimize te effort booting from some other medium.
setenv bootargs console=ttyAM0 root=/dev/mtdblock2 rootfstype=jffs2 video=ep93xxfb
setenv bootcmd_nor 'setenv bootargs ${bootargs} ${mtdparts} ; bootm 60080000'
setenv bootcmd run bootcmd_nor
setenv mtdparts mtdparts=physmap-flash.0:768k@0(Firmware),
2048k@0xc0000(Kernel),-@0x2c0000(Root-FS)

It works… what can I do now?
Make the filesystem functional: Add useful things to the filesystem – a good candidate might be busybox httpd. Another useful target in OE is meta-toolchain which creates a cross compilation SDK for your device.

Now that you have read the whole text: If you do not want to build yourself you can take a look at my build results.

Enjoy!