Tag Archive | linux embedded poky anjuta

Poky kernel image and file system

Last post address the build process of Poky ARM SDK and how to configure Anjunta to use the toolchain for cross development; once you start building an application you  are going to need to deploy it to an target system and here is where Qemu comes to play, as you might know Qemu is an processor emulator that can be used as target platform.

The ingredients that you need are a kernel image and root file system that can be bitbaked:

source poky-init-build-env
bitbake poky-image-sato

if you are an Ubuntu hardy user like me you are going to see the next error:

ERROR:  Poky’s config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:

/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value   (as root).

I find an bug report about it, by I lost the reference, anywise you only need to set mmap_min_addr to 0:

sudo sysctl -w vm.mmap_min_addr=0

After a successful build the image and files system will be place on
[poky root path]/build/tmp/deploy/images/

the kernel image zImage-qemuarm.bin and
the file system poky-image-sato-qemuarm.ext2

However the building process my take a long time so you may prefer to download the kernel image and the root file system from http://pokylinux.org/releases/

In Anjuta poky plug-in preferences add the path for the root file system and kernel image:

You can find a screen cast on how to launch quemu, deploy your application and debug at   poky-anjuta-screencast.

Poky Anjuta plug-in

Poky provides an plug-in for developing using Anjuta IDE, follow the next steps form building the plug-in:

Checkout the latest version

svn co http://svn.o-hand.com/repos/anjuta-poky/trunk anjuta-plugin-sdk
cd anjuta-poky-plugin-sdk
sudo ./autogen.sh
sudo make
sudo make install

Listo, now the next step is to configure the plug-in to start development with Anjuta,

In Anjuta go to Edit->Preferences

Enable the plug-in:

Anjuta-Poky Enable

Configure the toolchain path:
/usr/local/poky/eabi-glibc/arm/

Anjuta-Poky preferences

At the moment we will leave the Target options as shown in further post I will deal with this.

Close the preferences dialog; Create a New Project
File->New->Project
Select an C GTK+ type.

Run Autogenerate…
Build->Run Autogenerate…

You will see messages like:

checking for arm-poky-linux-gnueabi-strip… arm-poky-linux-gnueabi-strip
checking whether to enable maintainer-specific portions of Makefiles… yes
checking for style of include used by make… GNU
checking for arm-poky-linux-gnueabi-gcc… arm-poky-linux-gnueabi-gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… yes

If not then you are not setting correctly the toolchain root path or you misspell the toolchain prefix.

Now Build->Build Project

That would place a binary your src directory.

On my next post I will go through procedure of running the previous example on Quemu as target platform, while you can start designing and coding : )

More info at anjuta-poky-sdk-plugin

Follow

Get every new post delivered to your Inbox.