Search by Tags

Embedded Linux Sample Code

 

Article updated at 11 Aug 2020
Compare with Revision




Some Embedded Linux sample code can be found in the Samples folder of our file download server:

Samples

For a cross-toolchain see Build U-Boot and Linux Kernel from Source Code.

GTK+ Example

A make file project which compiles the scribble-simple.c from http://developer.gnome.org/gtk-tutorial.

Download gtk_scribble_V2.zip from our Samples page.

Makefile.ExtToolchain_Rootfs is a makefile suitable for use with an external cross-toolchain and the rootfs contained in our image.
Set OECORE_TARGET_SYSROOT and CROSS_COMPILE to your needs.

Makefile.OE_Sysroot is a makefile suitable if you have built OpenEmbedded yourself. It uses the OpenEmbedded built cross-toolchain, headers and target libraries.
Set OECORE_NATIVE_SYSROOT, OECORE_TARGET_SYSROOT and CROSS_COMPILE to your needs.

Make a symlink 'Makefile' pointed to the flavour you want to use. e.g.

ln -s Makefile.ExtToolchain_Rootfs Makefile

To use it from within eclipse:

In the Project Explorer:
- right click and chose import
- General/Existing Projects into Workspace
- Browse for the archive file gtk_scribble.zip
- Finish

In the Make Targets View you get make targets to compile for ARM and for x86.
'all' for x86 Linux,
'all.arm' for the Colibri T20.

To use it from the command line:

unzip the archive
for x86 Linux:

make CROSS_COMPILE=  all

for Colibri T20:

make all

OpenGL ES Samples

Find samples in the OpenGL ES article.